From 0176d92184b3c3e2ea861e14fbc3f09f347ef0aa Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 29 Apr 2020 12:09:02 +0200 Subject: [PATCH] add simple remote setup to docs --- docs/basic-remote-setup.md | 97 +++++++++++++++++++++++++++++++++ docs/configuration.md | 106 ++++++++++++++++++++----------------- 2 files changed, 154 insertions(+), 49 deletions(-) create mode 100644 docs/basic-remote-setup.md diff --git a/docs/basic-remote-setup.md b/docs/basic-remote-setup.md new file mode 100644 index 0000000000..f067fc53c7 --- /dev/null +++ b/docs/basic-remote-setup.md @@ -0,0 +1,97 @@ +--- +title: "Basic Remote Setup" +date: 2020-02-27T20:35:00+01:00 +weight: 16 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs +geekdocFilePath: basic-remote-setup.md +--- + +{{< toc >}} + +Out of the box the ocis single binary and the `owncloud/ocis` docker image are configured to run on localhost for quick testing and development. + +If you need to access ocis on a VM or a remote machine e.g when testing a mobile client you need to configure ocis to run on a different host. + +## Use the binary + +If you start the ocis fullstack for the first time with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder relative to its location. This file is used to configure the clients for the built-in Identity Provider. + +{{< hint warning >}} +**Outdated version**\ +This file `identifier-registration.yml` will only be generated if there is no such file in place. You could miss updates on this file. +{{< /hint >}} + +### Add your hostname to the idp config + +Let us assume `your-host` is your remote domain name or IP adress. In this example we do not change the default port (`9200`). But this could be changed to another port. + +```yaml {linenos=table,hl_lines=["13-14",18]} +# OpenID Connect client registry. +clients: + - id: phoenix + name: ownCloud web app + application_type: web + insecure: yes + trusted: yes + redirect_uris: + - http://localhost:9100/oidc-callback.html + - http://localhost:9100/ + - https://localhost:9200/ + - https://localhost:9200/oidc-callback.html + - https://your-host:9200/ + - https://your-host:9200/oidc-callback.html + origins: + - http://localhost:9100 + - https://localhost:9200 + - https://your-host:9200/ +``` + +### Start the ocis fullstack server + +You need to configure `your-host` in some services to provide the needed public resources. oCIS currently needs a running Redis Server reachable locally on the machine at the default port (`localhost:6379`). You can change this using the following option `REVA_STORAGE_OWNCLOUD_REDIS_ADDR=some-host:6379`. + +```bash +PROXY_HTTP_ADDR=0.0.0.0:9200 \ +KONNECTD_ISS=https://your-host:9200 \ +REVA_OIDC_ISSUER=https://your-host:9200 \ +PHOENIX_OIDC_AUTHORITY=https://your-host:9200 \ +PHOENIX_WEB_CONFIG_SERVER=https://your-host:9200 \ +PHOENIX_OIDC_METADATA_URL=https://your-host:9200/.well-known/openid-configuration \ +PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \ +PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \ +KONNECTD_TLS=0 \ +./bin/ocis server +``` + +For more configuration options check the configuration secion in [ocis](https://owncloud.github.io/ocis/configuration/) and every ocis extension. + +{{< hint info >}} +**TlS Certificate**\ +In this example, we are replacing the default self signed cert with a CA signed one to avoid the certificate warning when accessing the login page. +{{< /hint >}} + +## Use Docker Compose + +We are using our [docker compose playground](https://github.com/owncloud-docker/compose-playground) as a repository to share snippets that make our test setups easier and more aligned. + +You can start oCIS with docker very easily on a different host using this snippet. + +Let us assume your local IP is `192.168.103.195` + +```bash +git clone https://github.com/owncloud-docker/compose-playground.git +cd compose-playground/ocis + +sed -i -e 's/your-url/192.168.103.195/g' config/identifier-registration.yml + +cat << EOF > .env +OCIS_BASE_URL=192.168.103.195 +OCIS_HTTP_PORT=9200 +OCIS_DOCKER_TAG=latest +EOF + +docker-compose -f ocis.yml -f ../cache/redis-ocis.yml up -d + +curl -k https://192.168.103.195:9200/status.php +``` diff --git a/docs/configuration.md b/docs/configuration.md index b9fda6d317..490f9dfab0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,6 @@ --- title: "Configuration" -date: "2020-04-14T22:00:52+0200" +date: "2020-04-29T12:08:23+0200" weight: 20 geekdocRepo: https://github.com/owncloud/ocis geekdocEditPath: edit/master/docs @@ -112,14 +112,50 @@ Usage: `ocis server [command options] [arguments...]` There are more subcommands to start the individual extensions. Please check the documentation about their usage and options in the dedicated section of the documentation. -#### ocis proxy +#### ocis graph -Start proxy server +Start graph server + +#### ocis graph-explorer + +Start graph explorer + +#### ocis phoenix + +Start phoenix server #### ocis reva-storage-oc-data Start reva oc storage dataprovider +#### ocis reva-auth-basic + +Start reva auth-basic service + +#### ocis glauth + +Start glauth server + +#### ocis reva-storage-eos-data + +Start reva eos storage dataprovider + +#### ocis hello + +Start hello server + +#### ocis ocs + +Start ocs server + +#### ocis reva-storage-eos + +Start reva eos storage + +#### ocis reva-storage-root + +Start reva root storage + #### ocis reva-auth-bearer Start reva auth-bearer service @@ -128,34 +164,10 @@ Start reva auth-bearer service Start webdav server -#### ocis reva-sharing - -Start reva sharing service - #### ocis reva-gateway Start reva gateway -#### ocis graph-explorer - -Start graph explorer - -#### ocis reva-auth-basic - -Start reva auth-basic service - -#### ocis hello - -Start hello server - -#### ocis reva-storage-home - -Start reva home storage - -#### ocis reva-storage-oc - -Start reva oc storage - #### ocis reva-frontend Start reva frontend @@ -164,35 +176,31 @@ Start reva frontend Start reva home storage dataprovider -#### ocis graph - -Start graph server - #### ocis konnectd Start konnectd server -#### ocis thumbnails - -Start thumbnails server - -#### ocis glauth - -Start glauth server - -#### ocis phoenix - -Start phoenix server - -#### ocis ocs - -Start ocs server - #### ocis reva-users Start reva users service -#### ocis reva-storage-root +#### ocis proxy -Start reva root storage +Start proxy server + +#### ocis reva-sharing + +Start reva sharing service + +#### ocis reva-storage-home + +Start reva home storage + +#### ocis reva-storage-oc + +Start reva oc storage + +#### ocis thumbnails + +Start thumbnails server