From c537f7a8e67bb746e38d80805c2c926293aa3bcf Mon Sep 17 00:00:00 2001 From: NimishKashyap Date: Sun, 10 Dec 2023 21:15:41 +0530 Subject: [PATCH 1/4] feat: onlyoffice added --- apps/onlyoffice-docserver/0.1.0/README.md | 17 +++ .../0.1.0/onlyoffice.application.yaml | 108 ++++++++++++++++++ .../0.1.0/onlyoffice.meta.yaml | 18 +++ 3 files changed, 143 insertions(+) create mode 100644 apps/onlyoffice-docserver/0.1.0/README.md create mode 100644 apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml create mode 100644 apps/onlyoffice-docserver/0.1.0/onlyoffice.meta.yaml diff --git a/apps/onlyoffice-docserver/0.1.0/README.md b/apps/onlyoffice-docserver/0.1.0/README.md new file mode 100644 index 0000000..d8bd5bc --- /dev/null +++ b/apps/onlyoffice-docserver/0.1.0/README.md @@ -0,0 +1,17 @@ +# OnlyOffice Suite + +This OAM application hosts OnlyOffice Suite on Napptive with minimal configuration. + +Resources Requirement: +- CPU: 1vCPU +- RAM: 5GB +- Storage: 3GB (can be modified) + +Steps: +1. Select application from catalog. +2. Modify parameters (if required) +3. Deploy and wait for each component to start-up +4. Open the OnlyOffice URL and start example. +5. Start using the application. + +NOTE: Backend application requires at-least 5 minutes to start diff --git a/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml b/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml new file mode 100644 index 0000000..0c30d21 --- /dev/null +++ b/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml @@ -0,0 +1,108 @@ +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: onlyoffice-deployment +spec: + components: + - name: onlyoffice-documentserver + dependsOn: + - onlyoffice-db + - onlyoffice-rabbitmq + type: webservice + properties: + image: onlyoffice/documentserver + cpu: "1" + memory: "4Gi" + ports: + - port: 80 + expose: true + - port: 443 + expose: true + env: + - name: DB_TYPE + value: postgres + - name: DB_HOST + value: onlyoffice-db + - name: DB_PORT + value: "5432" + - name: DB_NAME + value: onlyofficedb + - name: DB_USER + value: onlyoffice + - name: AMQP_URI + value: amqp://guest:guest@onlyoffice-rabbitmq + traits: + - type: lifecycle + properties: + postStart: + exec: + command: + [ + "/bin/bash", + "-c", + "sleep 30 && sudo supervisorctl start ds:example && sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf", + ] + - type: napptive-ingress + properties: + name: onlyoffice-ingress + port: 80 + path: / + - type: storage + properties: + pvc: + - name: office-log-pvc + mountPath: /var/log/onlyoffice + resources: + requests: + storage: 512Mi + - name: office-data-pvc + mountPath: /var/www/onlyoffice/Data + resources: + requests: + storage: 1Gi + - name: officelib + mountPath: /var/lib/onlyoffice + resources: + requests: + storage: 256Mi + - name: office-font + mountPath: /usr/share/fonts + resources: + requests: + storage: 100Mi + - name: onlyoffice-rabbitmq + type: webservice + properties: + image: rabbitmq + cpu: "150m" + memory: "1Gi" + ports: + - port: 5672 + expose: true + + - name: onlyoffice-db + type: webservice + properties: + image: "postgres:9.5" + cpu: "250m" + memory: "1Gi" + ports: + - port: 5432 + expose: true + env: + - name: POSTGRES_DB + value: onlyofficedb + - name: POSTGRES_USER + value: onlyoffice + - name: POSTGRES_HOST_AUTH_METHOD + value: trust + traits: + - type: storage + properties: + pvc: + - name: postgres-db-pvc + mountPath: /var/lib/postgresql/data + subPath: postgres + resources: + requests: + storage: 1Gi diff --git a/apps/onlyoffice-docserver/0.1.0/onlyoffice.meta.yaml b/apps/onlyoffice-docserver/0.1.0/onlyoffice.meta.yaml new file mode 100644 index 0000000..8b70b4c --- /dev/null +++ b/apps/onlyoffice-docserver/0.1.0/onlyoffice.meta.yaml @@ -0,0 +1,18 @@ +apiVersion: core.napptive.com/v1alpha1 +kind: ApplicationMetadata +name: "OnlyOfficeDocs" +version: 0.1.0 +description: Open source document editing tool +keywords: + - "document editing tool" + - "docx" + - "ppt" + - "csv" +license: "Apache License Version 2.0" +url: "https://www.onlyoffice.com/" +doc: "https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx" + +logo: + - src: "https://download.onlyoffice.com/assets/fb/fb_icon_325x325.jpg" + type: "image/jpg" + size: "325x325" From 8a65a17f9cdf37527c9fa60ba9fef857feff763e Mon Sep 17 00:00:00 2001 From: Nimish Kashyap <74850106+NimishKashyap@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:30:51 +0530 Subject: [PATCH 2/4] Update README.md --- apps/onlyoffice-docserver/0.1.0/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/onlyoffice-docserver/0.1.0/README.md b/apps/onlyoffice-docserver/0.1.0/README.md index d8bd5bc..0f76e05 100644 --- a/apps/onlyoffice-docserver/0.1.0/README.md +++ b/apps/onlyoffice-docserver/0.1.0/README.md @@ -1,11 +1,11 @@ # OnlyOffice Suite -This OAM application hosts OnlyOffice Suite on Napptive with minimal configuration. +This OAM application hosts OnlyOffice Suite Document Server on Napptive with minimal configuration. Resources Requirement: -- CPU: 1vCPU -- RAM: 5GB -- Storage: 3GB (can be modified) +- CPU: 2vCPU +- RAM: 7GB +- Storage: 4GB (can be modified) Steps: 1. Select application from catalog. From 991d6040b162631d58133228cad4353b7002da05 Mon Sep 17 00:00:00 2001 From: Nimish Kashyap <74850106+NimishKashyap@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:27:09 +0530 Subject: [PATCH 3/4] [Fix]: Added JWT token for integration --- .../0.1.0/onlyoffice.application.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml b/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml index 0c30d21..9fd8b3b 100644 --- a/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml +++ b/apps/onlyoffice-docserver/0.1.0/onlyoffice.application.yaml @@ -31,6 +31,14 @@ spec: value: onlyoffice - name: AMQP_URI value: amqp://guest:guest@onlyoffice-rabbitmq + - name: JWT_ENABLED + value: "true" + - name: JWT_SECRET + value: "my-secret" + - name: JWT_HEADER + value: Authorization + - name: JWT_IN_BODY + value: "true" traits: - type: lifecycle properties: From 09919bc348affc5a99eb09c7aaa25fbae34e1f41 Mon Sep 17 00:00:00 2001 From: Nimish Kashyap <74850106+NimishKashyap@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:33:04 +0530 Subject: [PATCH 4/4] [DOC]: Updated Readme --- apps/onlyoffice-docserver/0.1.0/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/onlyoffice-docserver/0.1.0/README.md b/apps/onlyoffice-docserver/0.1.0/README.md index 0f76e05..04ffe81 100644 --- a/apps/onlyoffice-docserver/0.1.0/README.md +++ b/apps/onlyoffice-docserver/0.1.0/README.md @@ -14,4 +14,4 @@ Steps: 4. Open the OnlyOffice URL and start example. 5. Start using the application. -NOTE: Backend application requires at-least 5 minutes to start +NOTE: This OAM file hosts Document Server of OnlyOffice and is required to be integrated using OnlyOffice Groups.