Skip to content

Commit

Permalink
Merge pull request owncloud#3742 from wkloucek/remove-codimd-deployme…
Browse files Browse the repository at this point in the history
…nt-example

remove codimd from deployment example
  • Loading branch information
wkloucek authored May 9, 2022
2 parents 22ef980 + 52f9938 commit b9abdab
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down
6 changes: 0 additions & 6 deletions deployments/examples/ocis_wopi/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

This file was deleted.

14 changes: 0 additions & 14 deletions deployments/examples/ocis_wopi/config/ocis/app-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
75 changes: 0 additions & 75 deletions deployments/examples/ocis_wopi/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
37 changes: 11 additions & 26 deletions docs/ocis/deployment/ocis_wopi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -26,26 +22,24 @@ 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

### Requirements

* 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
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand All @@ -162,15 +148,14 @@ 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
```

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.

Expand Down

0 comments on commit b9abdab

Please sign in to comment.