From 52f9938a3b893b4c67bd0580faeede662f62e574 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 9 May 2022 11:39:20 +0200 Subject: [PATCH] remove codimd from deployment example --- .../ocis_wopi/latest.yml | 1 - .../ocis_wopi/released.yml | 1 - .../config/ocis/entrypoint-override.sh | 2 +- deployments/examples/ocis_wopi/.env | 6 -- .../entrypoint-override.sh | 19 ----- .../ocis_wopi/config/ocis/app-registry.yaml | 14 ---- .../config/wopiserver/entrypoint-override.sh | 2 - .../examples/ocis_wopi/docker-compose.yml | 75 ------------------- docs/ocis/deployment/ocis_wopi.md | 37 +++------ 9 files changed, 12 insertions(+), 145 deletions(-) delete mode 100755 deployments/examples/ocis_wopi/config/ocis-appdriver-codimd/entrypoint-override.sh diff --git a/deployments/continuous-deployment-config/ocis_wopi/latest.yml b/deployments/continuous-deployment-config/ocis_wopi/latest.yml index d8e8f2d508..0c513b52e0 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/latest.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/latest.yml @@ -38,7 +38,6 @@ WOPISERVER_DOMAIN: wopiserver.ocis-wopi.latest.owncloud.works COLLABORA_DOMAIN: collabora.ocis-wopi.latest.owncloud.works ONLYOFFICE_DOMAIN: onlyoffice.ocis-wopi.latest.owncloud.works - CODIMD_DOMAIN: codimd.ocis-wopi.latest.owncloud.works DEMO_USERS: "true" COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml - name: monitoring diff --git a/deployments/continuous-deployment-config/ocis_wopi/released.yml b/deployments/continuous-deployment-config/ocis_wopi/released.yml index 994b071a7e..452158790b 100644 --- a/deployments/continuous-deployment-config/ocis_wopi/released.yml +++ b/deployments/continuous-deployment-config/ocis_wopi/released.yml @@ -39,7 +39,6 @@ COLLABORA_DOMAIN: collabora.ocis-wopi.released.owncloud.works ONLYOFFICE_DOMAIN: onlyoffice.ocis-wopi.released.owncloud.works DEMO_USERS: "true" - CODIMD_DOMAIN: codimd.ocis-wopi.released.owncloud.works COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml - name: monitoring git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git diff --git a/deployments/examples/ocis_keycloak/config/ocis/entrypoint-override.sh b/deployments/examples/ocis_keycloak/config/ocis/entrypoint-override.sh index 872dbad3d7..ba7fbe47e8 100644 --- a/deployments/examples/ocis_keycloak/config/ocis/entrypoint-override.sh +++ b/deployments/examples/ocis_keycloak/config/ocis/entrypoint-override.sh @@ -6,7 +6,7 @@ ocis server& sleep 10 # stop builtin IDP since we use Keycloak as a replacement -ocis kill idp +#ocis kill idp echo "##################################################" echo "change default secrets:" diff --git a/deployments/examples/ocis_wopi/.env b/deployments/examples/ocis_wopi/.env index e4647c701d..240bc6f960 100644 --- a/deployments/examples/ocis_wopi/.env +++ b/deployments/examples/ocis_wopi/.env @@ -45,12 +45,6 @@ COLLABORA_ADMIN_PASSWORD= # Domain of OnlyOffice, where you can find the frontend. Defaults to "onlyoffice.owncloud.test" ONLYOFFICE_DOMAIN= -### CodiMD settings ### -# Domain of Collabora, where you can find the frontend. Defaults to "codimd.owncloud.test" -CODIMD_DOMAIN= -# Secret which is used for the communication with the WOPI server. Must be changed in order to have a secure CodiMD. Defaults to "LoremIpsum456" -CODIMD_SECRET= - # If you want to use debugging and tracing with this stack, # you need uncomment following line. Please see documentation at # https://owncloud.dev/ocis/deployment/monitoring-tracing/ diff --git a/deployments/examples/ocis_wopi/config/ocis-appdriver-codimd/entrypoint-override.sh b/deployments/examples/ocis_wopi/config/ocis-appdriver-codimd/entrypoint-override.sh deleted file mode 100755 index 96c0a7ad33..0000000000 --- a/deployments/examples/ocis_wopi/config/ocis-appdriver-codimd/entrypoint-override.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -e - -apk add curl - -#TODO: app driver itself should try again until CodiMD is up... - -retries=10 -while [[ $retries -gt 0 ]]; do - if curl --silent --show-error --fail http://codimd:3000 > /dev/null; then - ocis app-provider server - else - echo "CodiMD is not yet available, trying again in 10 seconds" - sleep 10 - retries=$((retries - 1)) - fi -done -echo 'CodiMD was not available after 100 seconds' -exit 1 diff --git a/deployments/examples/ocis_wopi/config/ocis/app-registry.yaml b/deployments/examples/ocis_wopi/config/ocis/app-registry.yaml index a513206787..4cf4262a8e 100644 --- a/deployments/examples/ocis_wopi/config/ocis/app-registry.yaml +++ b/deployments/examples/ocis_wopi/config/ocis/app-registry.yaml @@ -56,17 +56,3 @@ app_registry: icon: '' default_app: '' allow_creation: true - - mime_type: text/markdown - extension: md - name: Markdown file - description: Markdown file - icon: '' - default_app: CodiMD - allow_creation: true - - mime_type: application/compressed-markdown - extension: zmd - name: Compressed markdown file - description: Compressed markdown file - icon: '' - default_app: CodiMD - allow_creation: false diff --git a/deployments/examples/ocis_wopi/config/wopiserver/entrypoint-override.sh b/deployments/examples/ocis_wopi/config/wopiserver/entrypoint-override.sh index 70265cf649..7d3027df61 100755 --- a/deployments/examples/ocis_wopi/config/wopiserver/entrypoint-override.sh +++ b/deployments/examples/ocis_wopi/config/wopiserver/entrypoint-override.sh @@ -3,8 +3,6 @@ set -e echo "${WOPISECRET}" > /etc/wopi/wopisecret echo "${IOPSECRET}" > /etc/wopi/iopsecret -mkdir -p /var/run/secrets -echo "$CODIMDSECRET" > /var/run/secrets/codimd_apikey cp /etc/wopi/wopiserver.conf.dist /etc/wopi/wopiserver.conf sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN}'/g' /etc/wopi/wopiserver.conf diff --git a/deployments/examples/ocis_wopi/docker-compose.yml b/deployments/examples/ocis_wopi/docker-compose.yml index 545a59992b..af3cb4a4a8 100644 --- a/deployments/examples/ocis_wopi/docker-compose.yml +++ b/deployments/examples/ocis_wopi/docker-compose.yml @@ -11,7 +11,6 @@ services: - ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} - ${COLLABORA_DOMAIN:-collabora.owncloud.test} - ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test} - - ${CODIMD_DOMAIN:-codimd.owncloud.test} command: - "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}" # letsencrypt configuration @@ -132,35 +131,6 @@ services: logging: driver: "local" restart: always - - ocis-appdriver-codimd: - image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest} - networks: - ocis-net: - user: "0" # needed for apk add in entrypoint script - entrypoint: - - /bin/sh - - /entrypoint-override.sh - #command: app-provider server - environment: - REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142} - APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164 - APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-codimd:9164 - APP_PROVIDER_DRIVER: wopi - APP_PROVIDER_WOPI_APP_NAME: CodiMD - APP_PROVIDER_WOPI_APP_API_KEY: ${CODIMD_SECRET:-LoremIpsum456} - APP_PROVIDER_WOPI_APP_ICON_URI: https://${CODIMD_DOMAIN:-codimd.owncloud.test}/favicon.png - APP_PROVIDER_WOPI_APP_URL: https://${CODIMD_DOMAIN:-codimd.owncloud.test} - APP_PROVIDER_WOPI_INSECURE: "${INSECURE:-false}" - APP_PROVIDER_WOPI_WOPI_SERVER_IOP_SECRET: ${WOPI_IOP_SECRET:-LoremIpsum123} - APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL: https://${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} - volumes: - - ./config/ocis-appdriver-codimd/entrypoint-override.sh:/entrypoint-override.sh - - ocis-config:/etc/ocis - logging: - driver: "local" - restart: always - wopiserver: image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-latest} networks: @@ -172,7 +142,6 @@ services: WOPISERVER_INSECURE: "${INSECURE:-false}" WOPISECRET: ${WOPI_JWT_SECRET:-LoremIpsum567} IOPSECRET: ${WOPI_IOP_SECRET:-LoremIpsum123} - CODIMDSECRET: ${CODIMD_SECRET:-LoremIpsum456} WOPISERVER_DOMAIN: ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test} COLLABORA_DOMAIN: ${COLLABORA_DOMAIN:-collabora.owncloud.test} volumes: @@ -234,56 +203,12 @@ services: driver: "local" restart: always - codimd: - image: gitlab-registry.cern.ch/authoring/notes/codimd:cernbox-integration - networks: - ocis-net: - environment: - CMD_DB_URL: postgres://codimd:codimd@codimd-db/codimd - CMD_AUTO_VERSION_CHECK: "false" - CMD_ALLOW_ANONYMOUS: "true" - CMD_ALLOW_ANONYMOUS_EDITS: "true" - CMD_ALLOW_ANONYMOUS_VIEWS: "true" - CMD_ALLOW_FREEURL: "true" - CMD_EMAIL: "false" - CMD_ALLOW_EMAIL_REGISTER: "false" - CMD_USESSL: "false" - NODE_TLS_REJECT_UNAUTHORIZED: 0 - CMD_APPLIANCE_MODE: "true" - CMD_SAVE_WEBHOOK: https://${WOPISERVER_DOMAIN:-wopiserver.owncloud.test}/wopi/bridge - CMD_API_KEY: ${CODIMD_SECRET:-LoremIpsum456} - labels: - - "traefik.enable=true" - - "traefik.http.routers.codimd.entrypoints=https" - - "traefik.http.routers.codimd.rule=Host(`${CODIMD_DOMAIN:-codimd.owncloud.test}`)" - - "traefik.http.routers.codimd.tls.certresolver=http" - - "traefik.http.routers.codimd.service=codimd" - - "traefik.http.services.codimd.loadbalancer.server.port=3000" - logging: - driver: "local" - restart: always - - codimd-db: - image: postgres:11.6-alpine - networks: - ocis-net: - environment: - POSTGRES_USER: codimd - POSTGRES_PASSWORD: codimd - POSTGRES_DB: codimd - volumes: - - codimd-db-data:/var/lib/postgresql/data - logging: - driver: "local" - restart: always - volumes: certs: ocis-config: ocis-data: wopi-data: wopi-logs: - codimd-db-data: networks: ocis-net: diff --git a/docs/ocis/deployment/ocis_wopi.md b/docs/ocis/deployment/ocis_wopi.md index 4c1199104d..79a8fb5787 100644 --- a/docs/ocis/deployment/ocis_wopi.md +++ b/docs/ocis/deployment/ocis_wopi.md @@ -9,15 +9,11 @@ geekdocFilePath: ocis_wopi.md {{< toc >}} -{{< hint warning >}} -OnlyOffice and CodiMD are not yet fully integrated and there are known issues. For the current state please have a look at [owncloud/ocis#2595](https://github.com/owncloud/ocis/issues/2595) -{{< /hint >}} - ## Overview -* oCIS, Wopi server, Collabora, OnlyOffice and CodiMD running behind Traefik as reverse proxy -* Collabora, OnlyOffice and CodiMD enable you to edit documents in your browser -* Wopi server acts as a bridge to make the oCIS storage accessible to Collabora, OnlyOffice and CodiMD +* oCIS, Wopi server, Collabora and OnlyOffice running behind Traefik as reverse proxy +* Collabora and OnlyOffice enable you to edit documents in your browser +* Wopi server acts as a bridge to make the oCIS storage accessible to Collabora and OnlyOffice * Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup [Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_wopi) @@ -26,9 +22,9 @@ The docker stack consists of 10 containers. One of them is Traefik, a proxy whic The next container is oCIS itself in a configuration like the [oCIS with Traefik example]({{< ref "ocis_traefik" >}}), except that for this example a custom mimetype configuration is used. -There are three oCIS app driver containers that register Collabora, OnlyOffice and CodiMD at the app registry. +There are three oCIS app driver containers that register Collabora and OnlyOffice at the app registry. -The last four containers are the WOPI server, Collabora, OnlyOffice and CodiMD. +The last four containers are the WOPI server, Collabora and OnlyOffice. ## Server Deployment @@ -36,16 +32,14 @@ The last four containers are the WOPI server, Collabora, OnlyOffice and CodiMD. * Linux server with docker and docker-compose installed * Three domains set up and pointing to your server - - ocis.* for serving oCIS - - collabora.* for serving Collabora - - onlyoffice.* for serving OnlyOffice - - codimd.* for serving CodiMD - - wopiserver.* for serving the WOPI server - - traefik.* for serving the Traefik dashboard + * ocis.* for serving oCIS + * collabora.* for serving Collabora + * onlyoffice.* for serving OnlyOffice + * wopiserver.* for serving the WOPI server + * traefik.* for serving the Traefik dashboard See also [example server setup]({{< ref "preparing_server" >}}) - ### Install oCIS and Traefik * Clone oCIS repository @@ -106,12 +100,6 @@ See also [example server setup]({{< ref "preparing_server" >}}) ### OnlyOffice settings ### # Domain of OnlyOffice, where you can find the frontend. Defaults to "onlyoffice.owncloud.test" ONLYOFFICE_DOMAIN= - - ### CodiMD settings ### - # Domain of Collabora, where you can find the frontend. Defaults to "codimd.owncloud.test" - CODIMD_DOMAIN= - # Secret which is used for the communication with the WOPI server. Must be changed in order to have a secure CodiMD. Defaults to "LoremIpsum456" - CODIMD_SECRET= ``` You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`. @@ -140,8 +128,6 @@ See also [example server setup]({{< ref "preparing_server" >}}) Next up is OnlyOffice, which also needs a domain in `ONLYOFFICE_DOMAIN=`. - The last configuration options are for CodiMD, which needs a domain in `CODIMD_DOMAIN=` and a random secret in `CODIMD_SECRET=`. - Now you have configured everything and can save the file. * Start the docker stack @@ -162,7 +148,6 @@ On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to 127.0.0.1 traefik.owncloud.test 127.0.0.1 collabora.owncloud.test 127.0.0.1 onlyoffice.owncloud.test -127.0.0.1 codimd.owncloud.test 127.0.0.1 wopiserver.owncloud.test ``` @@ -170,7 +155,7 @@ After that you're ready to start the application stack: `docker-compose up -d` -Open https://collabora.owncloud.test, https://onlyoffice.owncloud.test, https://codimd.owncloud.test and https://wopiserver.owncloud.test in your browser and accept the invalid certificate warning. +Open https://collabora.owncloud.test, https://onlyoffice.owncloud.test and https://wopiserver.owncloud.test in your browser and accept the invalid certificate warning. Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You are now able to open an office document in your browser. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.