头图

前言

最近项目中需要集成onlyoffice并且使用Helm3来安装,在安装过程中遇到了好多坑但都解决了,现分享给大家。

操作

查看onlyofficeKubernetes-Docs官方文档,按照它的步骤来安装。

1、引入helm repo

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
$ helm repo add nfs-server-provisioner https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner
$ helm repo add onlyoffice https://download.onlyoffice.com/charts/stable
$ helm repo update

2、安装存储

$ helm install nfs-server nfs-server-provisioner/nfs-server-provisioner \
  --set persistence.enabled=true \
  --set persistence.storageClass=PERSISTENT_STORAGE_CLASS \
  --set persistence.size=PERSISTENT_SIZE

3.安装 RabbitMQ

$ helm install rabbitmq bitnami/rabbitmq \
  --set persistence.storageClass=PERSISTENT_STORAGE_CLASS \
  --set metrics.enabled=false

4.安装 Redis

$ helm install redis bitnami/redis \
  --set architecture=standalone \
  --set master.persistence.storageClass=PERSISTENT_STORAGE_CLASS \
  --set metrics.enabled=false

5.安装postgresql或者mysql

$ helm install mysql bitnami/mysql \
  --set auth.database=onlyoffice \
  --set auth.username=onlyoffice \
  --set primary.persistence.storageClass=PERSISTENT_STORAGE_CLASS \
  --set primary.persistence.size=PERSISTENT_SIZE \
  --set metrics.enabled=false

或者

$ helm install postgresql bitnami/postgresql \
  --set auth.database=postgres \
  --set primary.persistence.storageClass=PERSISTENT_STORAGE_CLASS \
  --set primary.persistence.size=PERSISTENT_SIZE \
  --set metrics.enabled=false

提醒:
如果你是使用docker来安装就不必要安装redisrabbitmqmysql,因为docker的镜像已经集成了这些库,但是如果你使用了k8s或者helm来安装就必须要提前安装这些库,因为我是使用了阿里云并且已经安装过,所以上面的3、4、5我就略过了。

6.搜索并拉取OnlyOffice包

$ helm search repo onlyoffice
NAME                       CHART VERSION    APP VERSION    DESCRIPTION
onlyoffice/docs            4.2.1            8.1.1          Helm chart for installing ONLYOFFICE Docs in Ku...
onlyoffice/docs-example    1.0.0            7.0.1          Helm chart for installing ONLYOFFICE Docs-example
onlyoffice/docs-shards     1.0.0            8.1.1          Helm chart for installing ONLYOFFICE Docs Shard...
onlyoffice/docspace        2.3.0            2.6.0          Helm chart for installing ONLYOFFICE DocSpace i...

上面的onlyoffice/docs就是我们想要的,我们拉取到本地,并且打开values.yaml文件

helm pull onlyoffice/docs

values.yaml

clearCache:
  existingConfigmap:
    keyName: clearCache.sh
    name: ""
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    enabled: true
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
commonAnnotations: {}
commonLabels: {}
connections:
  amqpExistingSecret: rabbitmq
  amqpHost: rabbitmq
  amqpPassword: ""
  amqpPort: "5672"
  amqpProto: amqp
  amqpSecretKeyName: rabbitmq-password
  amqpType: rabbitmq
  amqpUser: user
  amqpVhost: /
  dbExistingSecret: postgresql
  dbHost: postgresql
  dbName: postgres
  dbPassword: ""
  dbPort: "5432"
  dbSecretKeyName: postgres-password
  dbType: postgres
  dbUser: postgres
  redisClusterNodes: []
  redisConnectorName: redis
  redisDBNum: "0"
  redisExistingSecret: redis
  redisHost: redis-master
  redisNoPass: false
  redisPassword: ""
  redisPort: "6379"
  redisSecretKeyName: redis-password
  redisSentinelGroupName: mymaster
  redisUser: default
converter:
  annotations: {}
  autoscaling:
    annotations: {}
    behavior: {}
    customMetricsType: []
    enabled: false
    maxReplicas: 16
    minReplicas: 2
    targetCPU:
      enabled: true
      utilizationPercentage: 70
    targetMemory:
      enabled: false
      utilizationPercentage: 70
  containerSecurityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    enabled: false
    runAsGroup: 101
    runAsNonRoot: true
    runAsUser: 101
    seccompProfile:
      type: RuntimeDefault
  customPodAntiAffinity: {}
  image:
    pullPolicy: IfNotPresent
    repository: onlyoffice/docs-converter-de
    tag: 8.1.1-1
  initContainers: []
  lifecycleHooks: {}
  nodeAffinity: {}
  nodeSelector: {}
  podAffinity: {}
  podAnnotations:
    rollme: '{{ randAlphaNum 5 | quote }}'
  replicas: 2
  resources:
    limits: {}
    requests: {}
  tolerations: []
  updateStrategy:
    type: Recreate
delete:
  existingConfigmap:
    dsStop: ""
    tblRemove:
      keyName: removetbl.sql
      name: remove-db-scripts
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    enabled: true
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
docservice:
  annotations: {}
  autoscaling:
    annotations: {}
    behavior: {}
    customMetricsType: []
    enabled: false
    maxReplicas: 4
    minReplicas: 2
    targetCPU:
      enabled: true
      utilizationPercentage: 70
    targetMemory:
      enabled: false
      utilizationPercentage: 70
  containerPorts:
    http: 8000
  containerSecurityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    enabled: false
    runAsGroup: 101
    runAsNonRoot: true
    runAsUser: 101
    seccompProfile:
      type: RuntimeDefault
  customPodAntiAffinity: {}
  image:
    pullPolicy: IfNotPresent
    repository: onlyoffice/docs-docservice-de
    tag: 8.1.1-1
  initContainers: []
  lifecycleHooks: {}
  livenessProbe:
    enabled: true
    failureThreshold: 3
    httpGet:
      path: /index.html
      port: 8000
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 3
  nodeAffinity: {}
  nodeSelector: {}
  podAffinity: {}
  podAnnotations:
    rollme: '{{ randAlphaNum 5 | quote }}'
  readinessProbe:
    enabled: true
    failureThreshold: 2
    httpGet:
      path: /index.html
      port: 8000
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 3
  replicas: 2
  resources:
    limits: {}
    requests: {}
  startupProbe:
    enabled: true
    failureThreshold: 30
    httpGet:
      path: /index.html
      port: 8000
    periodSeconds: 10
  tolerations: []
  updateStrategy:
    type: Recreate
example:
  annotations: {}
  containerPorts:
    http: 3000
  containerSecurityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    enabled: false
    runAsGroup: 1001
    runAsNonRoot: true
    runAsUser: 1001
    seccompProfile:
      type: RuntimeDefault
  customPodAntiAffinity: {}
  dsUrl: /
  enabled: false
  extraConf:
    configMap: ""
    filename: local.json
  image:
    pullPolicy: IfNotPresent
    repository: onlyoffice/docs-example
    tag: 8.1.1-1
  lifecycleHooks: {}
  nodeAffinity: {}
  nodeSelector: {}
  podAffinity: {}
  podAnnotations:
    rollme: '{{ randAlphaNum 5 | quote }}'
  resources:
    limits: {}
    requests: {}
  tolerations: []
  updateStrategy:
    type: RollingUpdate
extraConf:
  configMap: ""
  filename: local.json
extraThemes:
  configMap: ""
  filename: custom-themes.json
grafana:
  dashboard:
    enabled: false
  enabled: false
  ingress:
    annotations:
      nginx.ingress.kubernetes.io/proxy-body-size: 100m
    enabled: false
  namespace: ""
grafanaDashboard:
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
imagePullSecrets: ""
ingress:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 100m
  enabled: false
  host: ""
  ingressClassName: nginx
  path: /
  ssl:
    enabled: false
    secret: tls
install:
  existingConfigmap:
    initdb: ""
    tblCreate:
      keyName: createdb.sql
      name: init-db-scripts
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    enabled: true
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
jwt:
  enabled: true
  existingSecret: ""
  header: Authorization
  inBody: false
  inbox: {}
  outbox: {}
  secret: MYSECRET
license:
  existingClaim: ""
  existingSecret: ""
log:
  level: WARN
  pattern: '[%d] [%p] [%X{DOCID}] [%X{USERID}] %c - %.10000m'
  type: pattern
metrics:
  enabled: false
  host: statsd-exporter-prometheus-statsd-exporter
  port: "8125"
  prefix: ds.
namespaceOverride: ""
nodeSelector: {}
persistence:
  annotations: {}
  existingClaim: ""
  size: 8Gi
  storageClass: nfs
  storageS3: false
podAntiAffinity:
  topologyKey: kubernetes.io/hostname
  type: soft
  weight: "100"
podSecurityContext:
  converter:
    fsGroup: 101
  docservice:
    fsGroup: 101
  enabled: false
  example:
    fsGroup: 1001
  jobs:
    fsGroup: 101
  tests:
    fsGroup: 101
privateCluster: false
product:
  name: onlyoffice
proxy:
  accessLog: "off"
  clientMaxBodySize: 100m
  containerPorts:
    http: 8888
  containerSecurityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    enabled: false
    runAsGroup: 101
    runAsNonRoot: true
    runAsUser: 101
    seccompProfile:
      type: RuntimeDefault
  gzipProxied: "off"
  image:
    pullPolicy: IfNotPresent
    repository: onlyoffice/docs-proxy-de
    tag: 8.1.1-1
  infoAllowedExistingSecret: ""
  infoAllowedIP: []
  infoAllowedPassword: password
  infoAllowedSecretKeyName: info-auth-password
  infoAllowedUser: ""
  lifecycleHooks: {}
  livenessProbe:
    enabled: true
    failureThreshold: 3
    httpGet:
      path: /index.html
      port: 8888
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 3
  readinessProbe:
    enabled: true
    failureThreshold: 2
    httpGet:
      path: /index.html
      port: 8888
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 3
  resources:
    limits: {}
    requests: {}
  secureLinkSecret: verysecretstring
  startupProbe:
    enabled: true
    failureThreshold: 30
    httpGet:
      path: /index.html
      port: 8888
    periodSeconds: 10
  welcomePage:
    enabled: true
  workerConnections: "4096"
requestFilteringAgent:
  allowIPAddressList: []
  allowMetaIPAddress: false
  allowPrivateIPAddress: false
  denyIPAddressList: []
rollback:
  existingConfigmap:
    dsStop: ""
    tblCreate:
      keyName: createdb.sql
      name: init-db-scripts
    tblRemove:
      keyName: removetbl.sql
      name: remove-db-scripts
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    enabled: true
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
service:
  annotations: {}
  existing: ""
  port: 8888
  sessionAffinity: ""
  sessionAffinityConfig: {}
  type: ClusterIP
serviceAccount:
  annotations: {}
  automountServiceAccountToken: true
  create: false
  name: ""
sqlScripts:
  branchName: master
tests:
  annotations: {}
  containerSecurityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    enabled: false
    runAsGroup: 101
    runAsNonRoot: true
    runAsUser: 101
    seccompProfile:
      type: RuntimeDefault
  customPodAntiAffinity: {}
  enabled: true
  image:
    pullPolicy: IfNotPresent
    repository: onlyoffice/docs-utils
    tag: 8.1.1-1
  nodeAffinity: {}
  nodeSelector: {}
  podAffinity: {}
  resources:
    limits: {}
    requests: {}
  tolerations: []
tolerations: []
upgrade:
  existingConfigmap:
    dsStop: ""
    tblCreate:
      keyName: createdb.sql
      name: init-db-scripts
    tblRemove:
      keyName: removetbl.sql
      name: remove-db-scripts
  job:
    annotations: {}
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      enabled: false
      runAsGroup: 101
      runAsNonRoot: true
      runAsUser: 101
      seccompProfile:
        type: RuntimeDefault
    customPodAntiAffinity: {}
    enabled: true
    image:
      pullPolicy: IfNotPresent
      repository: onlyoffice/docs-utils
      tag: 8.1.1-1
    nodeAffinity: {}
    nodeSelector: {}
    podAffinity: {}
    podAnnotations: {}
    resources:
      limits: {}
      requests: {}
    tolerations: []
webProxy:
  enabled: false
  http: http://proxy.example.com
  https: https://proxy.example.com
  noProxy: localhost,127.0.0.1,docservice
wopi:
  enabled: false

7.配置自己的values.yaml文件

connections:
  #  amqpExistingSecret: rabbitmq
  amqpHost: your-amqpHost
  amqpPassword: your-amqpPassword
  amqpPort: "5672"
  amqpProto: amqp
  #  amqpSecretKeyName: rabbitmq-password
  amqpType: rabbitmq
  amqpUser: user
  amqpVhost: /

  #  dbExistingSecret: postgresql
  dbHost: your-dbHost
  dbName: onlyoffice
  # Database user password. If set to, it takes priority over the connections.dbExistingSecret 属性
  dbPassword: "your-dbPassword"
  dbPort: "3306"
  #  dbSecretKeyName: postgres-password
  dbType: mysql
  dbUser: your-dbUser

  #  redisClusterNodes: []
  redisConnectorName: redis
  redisDBNum: "1"
  #  redisExistingSecret: redis
  redisHost: xxx.xxx.xxx.xxx
  #  redisNoPass: false
  redisPassword: "your-redisPassword"
  redisPort: "6379"
  #  redisSecretKeyName: redis-password
  #  redisSentinelGroupName: mymaster
  redisUser: default

persistence:
  size: 20Gi
  storageClass: alibabacloud-cnfs-nas

service:
  type: NodePort

jwt:
  enabled: false

我上面是使用HTTP://IP:PORT来访问,如果你想使用使用HTTPS://DOMAIN来访问,需要设置下面的代码:

ingress:
  enabled: true
  #  apiVersion: extensions/v1beta1
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod-http01"
    kubernetes.io/tls-acme: "true"
  host: your-host
  ssl:
    enabled: true
    secret: onlyoffice-tls

7.Helm3安装OnlyOffice
设置好之后,我们就来安装一下:

kubectl create namespace onlyoffice
helm install onlyoffice onlyoffice/docs -f values.yaml --namespace onlyoffice

查看是否安装成功:

$ kubectl get all -nonlyoffice
NAME                    READY   STATUS             RESTARTS   AGE
pod/pre-install-gs9l6   0/1     ImagePullBackOff   0          12h

NAME                    COMPLETIONS   DURATION   AGE
job.batch/pre-install   0/1           12h        12h

发现发布镜像拉取失败。

8.解决安装OnlyOffice拉取镜像失败问题
从2024年5月开始各大加速平台就出现拉取dokcer镜像失败,因为我使用的是阿里云K8S,所以我提交了工单,得到了下面的回复:

以下方案您可以参考看看:
1.您需要的镜像在本地已存在或者本地可以拉取到的话,将其推送到ACR来使用 ;
2.通过企业版实例订阅海外镜像。需要注意的是,Docker 公司有很严格的流控措施,如源仓库Tag版本太多会被限流;
3.ACR制品中心也是有一些基础镜像的,可以在ACR控制台上看下;参考文档https://help.aliyun.com/zh/acr/user-guide/subscribe-to-image-tags?spm=a2c4g.11186623.0.0.20e01ecdqq3sfj
4.近期github社区对这个问题的讨论也比较多,部分社区的加速器可能还是可以使用的。如果有需的话,也可以自行搜索下github社区相关的讨论。

我看了之后,发现只有第1种方案才能解决我的问题,就是从docker上面下载镜像到本地再推送到ACR,然后在values.yaml里面设置镜像地址,因为我使用的是科学上网法,所以可以拉取到本地,下面是具体的操作流程。

8.1、设置docker加速网址

{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
    ]
}

8.2、拉取amd64镜像
我仔细查看了helm的values.yaml文件里面涉及的镜像,需要安装的有docs-utilsdocs-docservice-dedocs-proxy-dedocs-converter-de

因为我的机器是macbook pro arm64架构,所以要指定linux/amd64,你们如果是windows或者linux的amd架构的电脑就不需要这样设置

docker pull --platform linux/amd64 onlyoffice/docs-utils:8.1.1-1
docker pull --platform linux/amd64 onlyoffice/docs-docservice-de:8.1.1-1
docker pull --platform linux/amd64 onlyoffice/docs-proxy-de:8.1.1-1
docker pull --platform linux/amd64 onlyoffice/docs-converter-de:8.1.1-1

8.3、打标签

docker tag onlyoffice/docs-utils:8.1.1-1 registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils:8.1.1-1
docker tag onlyoffice/docs-converter-de:8.1.1-1 registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-converter-de:8.1.1-1
docker tag onlyoffice/docs-docservice-de:8.1.1-1 registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-docservice-de:8.1.1-1
docker tag onlyoffice/docs-proxy-de:8.1.1-1 registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-proxy-de:8.1.1-1

8.4、推送到阿里云

docker push registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils:8.1.1-1
docker push registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-converter-de:8.1.1-1
docker push registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-docservice-de:8.1.1-1
docker push registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-proxy-de:8.1.1-1

8.5、修改values.yaml文件

connections:
  #  amqpExistingSecret: rabbitmq
  amqpHost: your-amqpHost
  amqpPassword: your-amqpPassword
  amqpPort: "5672"
  amqpProto: amqp
  #  amqpSecretKeyName: rabbitmq-password
  amqpType: rabbitmq
  amqpUser: user
  amqpVhost: /

  #  dbExistingSecret: postgresql
  dbHost: your-dbHost
  dbName: onlyoffice
  # Database user password. If set to, it takes priority over the connections.dbExistingSecret 属性
  dbPassword: "your-dbPassword"
  dbPort: "3306"
  #  dbSecretKeyName: postgres-password
  dbType: mysql
  dbUser: your-dbUser

  #  redisClusterNodes: []
  redisConnectorName: redis
  redisDBNum: "1"
  #  redisExistingSecret: redis
  redisHost: xxx.xxx.xxx.xxx
  #  redisNoPass: false
  redisPassword: "your-redisPassword"
  redisPort: "6379"
  #  redisSecretKeyName: redis-password
  #  redisSentinelGroupName: mymaster
  redisUser: default

persistence:
  size: 20Gi
  storageClass: alibabacloud-cnfs-nas

service:
  type: NodePort

jwt:
  enabled: false

clearCache:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

converter:
  image:
    pullPolicy: IfNotPresent
    repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-converter-de
    tag: 8.1.1-1

delete:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

docservice:
  image:
    pullPolicy: IfNotPresent
    repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-docservice-de
    tag: 8.1.1-1

#example:
#  image:
#    pullPolicy: IfNotPresent
#    repository: onlyoffice/docs-example
#    tag: 8.1.1-1

grafanaDashboard:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

install:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

proxy:
  image:
    pullPolicy: IfNotPresent
    repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-proxy-de
    tag: 8.1.1-1

rollback:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

tests:
  image:
    pullPolicy: IfNotPresent
    repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
    tag: 8.1.1-1

upgrade:
  job:
    image:
      pullPolicy: IfNotPresent
      repository: registry.cn-hangzhou.aliyuncs.com/xxx/onlyoffice-docs-utils
      tag: 8.1.1-1

8.6、再执行helm安装

helm install onlyoffice onlyoffice/docs -f values.yaml --namespace onlyoffice

NAME: onlyoffice
LAST DEPLOYED: Thu Sep  5 10:20:35 2024
NAMESPACE: onlyoffice
STATUS: deployed
REVISION: 1
NOTES:
RELEASE VERSION: 4.2.1
APP VERSION: 8.1.1

You can test ONLYOFFICE Docs availability and access to connected dependencies using Helm test:
    $ helm test onlyoffice --namespace=onlyoffice
  To view the log of the Pod, run the following command:
    $ kubectl logs -f test-ds --namespace=onlyoffice
  Note: This testing is for informational purposes only and cannot guarantee 100% availability results

查看是否安装成功

$ kubectl get all -n onlyoffice
NAME                             READY   STATUS    RESTARTS   AGE
pod/converter-9f74db558-qrxvn    1/1     Running   0          5m5s
pod/converter-9f74db558-r852f    1/1     Running   0          5m5s
pod/docservice-cc848765f-77mlx   2/2     Running   0          5m5s
pod/docservice-cc848765f-g9mtm   2/2     Running   0          5m5s

NAME                     TYPE        CLUSTER-IP        EXTERNAL-IP   PORT(S)          AGE
service/docservice       ClusterIP   192.168.152.215   <none>        8000/TCP         5m6s
service/documentserver   NodePort    192.168.235.15    <none>        8888:31420/TCP   5m6s

NAME                         READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/converter    2/2     2            2           5m6s
deployment.apps/docservice   2/2     2            2           5m6s

NAME                                   DESIRED   CURRENT   READY   AGE
replicaset.apps/converter-9f74db558    2         2         2       5m5s
replicaset.apps/docservice-cc848765f   2         2         2       5m5s

成功!

9、打开OnlyOffice
两种方式:HTTP://IP:PORT或者HTTPS://DOMAIN来访问,如图所示:

image.png

总结

1、如果不是docker镜像拉取失败,其实安装过程挺顺利的,在ZG做开发真难
2、后面再写一篇文章:如何在Next.js网站中集成Onlyoffice吧。
3、注意onlyoffice镜像分为社区版本,企业版本和开发者版本,如下所示
image.png

其中,社区版本默认最大并发连接数是20,企业版和开发者版本是定制并发数。

引用

不再被超时困扰!解决Docker Hub镜像超时的三大妙招!


Awbeci
3.1k 声望212 粉丝

Awbeci


引用和评论

0 条评论