mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 13:08:26 -05:00
Merge branch 'master' into update-bridge-docs
This commit is contained in:
@@ -20,6 +20,7 @@ oCIS deployments are super simple, yet there are many configurations possible fo
|
||||
- [oCIS setup with Traefik for SSL termination]({{< ref "ocis_traefik" >}})
|
||||
- [oCIS setup with Keycloak as identity provider]({{< ref "ocis_keycloak" >}})
|
||||
- [oCIS setup with WOPI server to open office documents in your browser]({{< ref "ocis_wopi" >}})
|
||||
- [Parallel deployment of oC10 and oCIS]({{< ref "oc10_ocis_parallel" >}})
|
||||
- [oCIS with S3 storage backend (MinIO)]({{< ref "ocis_s3" >}})
|
||||
- [oCIS with the Hello extension example]({{< ref "ocis_hello" >}})
|
||||
|
||||
@@ -45,6 +46,9 @@ You can change it by setting the `STORAGE_TRANSFER_SECRET` environment variable
|
||||
|
||||
{{< hint info >}}
|
||||
Before deleting the demo users mentioned below, you must create a new account for yourself and assign it to the administrator role.
|
||||
|
||||
To skip the generation of demo users in the first place, run the inital setup step with an additional environment variable.
|
||||
`ACCOUNTS_DEMO_USERS_AND_GROUPS=false ./bin/ocis server` generates only the admin, and one user for IDP and Reva respectively.
|
||||
{{< /hint >}}
|
||||
|
||||
oCIS ships with a few demo users besides the system users:
|
||||
|
||||
@@ -73,6 +73,24 @@ Credentials:
|
||||
- oCIS: [ocis.ocis-keycloak.released.owncloud.works](https://ocis.ocis-keycloak.released.owncloud.works)
|
||||
- Keycloak: [keycloak.ocis-keycloak.released.owncloud.works](https://keycloak.ocis-keycloak.released.owncloud.works)
|
||||
|
||||
# Parallel deployment of oC10 and oCIS
|
||||
|
||||
Credentials:
|
||||
|
||||
- oC10 / oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
|
||||
- Keycloak:
|
||||
- username: admin
|
||||
- password: admin
|
||||
- LDAP management:
|
||||
- username: cn=admin,dc=owncloud,dc=com
|
||||
- password: admin
|
||||
|
||||
## Latest
|
||||
|
||||
- oC10 / oCIS: [cloud.oc10-ocis-parallel.latest.owncloud.works](https://cloud.oc10-ocis-parallel.latest.owncloud.works)
|
||||
- LDAP management: [ldap.oc10-ocis-parallel.latest.owncloud.works](https://ldap.oc10-ocis-parallel.latest.owncloud.works)
|
||||
- Keycloak: [keycloak.oc10-ocis-parallel.latest.owncloud.works](https://keycloak.oc10-ocis-parallel.latest.owncloud.works)
|
||||
|
||||
# oCIS with Hello extension
|
||||
|
||||
Credentials:
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
---
|
||||
title: "Kubernetes"
|
||||
date: 2021-09-23T11:04:00+01:00
|
||||
weight: 25
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
geekdocFilePath: kubernetes.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## What is Kubernetes
|
||||
|
||||
Formally described as:
|
||||
|
||||
> Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
|
||||
|
||||
_[source](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/)_
|
||||
|
||||
Without getting too deep in definitions, and for the purpose of compactness, Kubernetes can be summarized as a way of managing containers that run applications to ensure that there is no downtime and a optimal usage of resources. It provides with a framework in which to run distributed systems.
|
||||
|
||||
Kubernetes provides you with:
|
||||
- **Service discovery and load balancing**: Kubernetes can expose a container using the DNS name or using their own IP address. If traffic to a container is high, Kubernetes is able to load balance and distribute the network traffic so that the deployment is stable.
|
||||
- **Storage orchestration**: Kubernetes allows you to automatically mount a storage system of your choice, such as local storages, public cloud providers, and more.
|
||||
- **Automated rollouts and rollbacks**: You can describe the desired state for your deployed containers using Kubernetes, and it can change the actual state to the desired state at a controlled rate. For example, you can automate Kubernetes to create new containers for your deployment, remove existing containers and adopt all their resources to the new container.
|
||||
- **Automatic bin packing**: You provide Kubernetes with a cluster of nodes that it can use to run containerized tasks. You tell Kubernetes how much CPU and memory (RAM) each container needs. Kubernetes can fit containers onto your nodes to make the best use of your resources.
|
||||
- **Self-healing**: Kubernetes restarts containers that fail, replaces containers, kills containers that don't respond to your user-defined health check, and doesn't advertise them to clients until they are ready to serve.
|
||||
- **Secret and configuration management**: Kubernetes lets you store and manage sensitive information, such as passwords, OAuth tokens, and SSH keys. You can deploy and update secrets and application configuration without rebuilding your container images, and without exposing secrets in your stack configuration.
|
||||
|
||||
_[extracted from k8s docs](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/#why-you-need-kubernetes-and-what-can-it-do)_
|
||||
|
||||
If that is still too abstract, [here is an ELI5 writeup](https://dev.to/miguelmota/comment/filh).
|
||||
|
||||
### References and further reads
|
||||
|
||||
- [Marcel Wunderlich's](https://github.com/Deaddy) [4 series articles](http://deaddy.net/introduction-to-kubernetes-pt-1.html) on Kubernetes clarifying its declarative nature, deep diving into ingress networking, storage and monitoring.
|
||||
|
||||
### How does oCIS fit in the Kubernetes model
|
||||
|
||||
oCIS was designed with running on Kubernetes in mind. We set up to adopt the [Twelve-Factor App](https://12factor.net/) principles regarding configuration, with almost every aspect of oCIS being modifiable via environment variables. This comes in handy when you especially have a look at how a helm chart's (we will introduce this concept shortly) [list of values](https://github.com/refs/ocis-charts/blob/d8735e3222d2050504303851d3461909c86fcc89/ocis/values.yaml) looks like.
|
||||
|
||||
## What is Minikube
|
||||
|
||||
[Minikube](https://minikube.sigs.k8s.io/docs/) lets you run a Kubernetes cluster locally. It is the most approachable way to test a deployment. It requires no extra configuration on any cloud platform, as everything runs on your local machine. For the purpose of these docs, this is the first approach we chose to run oCIS and will develop on how to set it up.
|
||||
|
||||
## What is `kubectl`
|
||||
|
||||
[kubectl](https://kubernetes.io/docs/tasks/tools/) is the command-line tool for Kubernetes. It allows users to run commands against a k8s cluster the user has access to. It supports for having multiple contexts for as many clusters as you have access to. In these docs we will setup 2 contexts, a minikube and a GCP context.
|
||||
|
||||
## What are Helm Charts, and why they are useful for oCIS
|
||||
|
||||
[Helm](https://helm.sh/) is the equivalent of a package manager for Kubernetes. It can be described as a layer on top of how you would write pods, deployments or any other k8s resource declaration.
|
||||
|
||||
### Installing Helm
|
||||
|
||||
[Follow the official installation guide](https://helm.sh/docs/intro/install/).
|
||||
|
||||
## Setting up Minikube
|
||||
|
||||
For a guide on how to set minikube up follow the [official minikube start guide](https://minikube.sigs.k8s.io/docs/start/) for your specific OS.
|
||||
|
||||
### Start minikube
|
||||
|
||||
First off, verify your installation is correct:
|
||||
|
||||
```console
|
||||
~/code/refs/ocis-charts
|
||||
❯ minikube status
|
||||
minikube
|
||||
type: Control Plane
|
||||
host: Stopped
|
||||
kubelet: Stopped
|
||||
apiserver: Stopped
|
||||
kubeconfig: Stopped
|
||||
```
|
||||
|
||||
After that, start the cluster:
|
||||
|
||||
```console
|
||||
~/code/refs/ocis-charts
|
||||
❯ minikube start
|
||||
😄 minikube v1.23.0 on Darwin 11.4
|
||||
✨ Using the docker driver based on existing profile
|
||||
👍 Starting control plane node minikube in cluster minikube
|
||||
🚜 Pulling base image ...
|
||||
🔄 Restarting existing docker container for "minikube" ...
|
||||
🐳 Preparing Kubernetes v1.22.1 on Docker 20.10.8 ...
|
||||
🔎 Verifying Kubernetes components...
|
||||
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
|
||||
🌟 Enabled addons: storage-provisioner, default-storageclass
|
||||
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
|
||||
```
|
||||
|
||||
_On these docs, we are using the Docker driver on Mac._
|
||||
|
||||
## Run a chart
|
||||
|
||||
The easiest way to run the entire package is by using the available charts on https://github.com/refs/ocis-charts. It is not the purpose of this guide to explain the inner working of Kubernetes or its resources, as Helm builds an abstraction oon top of it, letting you interact with a refined interface that roughly translates as "helm install" and "helm uninstall".
|
||||
|
||||
In order to host charts one can create a [charts repository](https://helm.sh/docs/topics/chart_repository/), but this is outside the scope of this documentation. Having said that, we will assume you have access to a cli and git.
|
||||
|
||||
### Requirements
|
||||
|
||||
1. minikube up and running.
|
||||
2. `kubectl` installed. By [default you should be able to access the minikube's cluster](https://minikube.sigs.k8s.io/docs/handbook/kubectl/). If you chose not to install `kubectl`, minikube wraps `kubectl` as `minikube kubectl`.
|
||||
3. helm cli installed.
|
||||
4. git installed.
|
||||
|
||||
### Setup
|
||||
|
||||
1. clone the charts: `git clone https://github.com/refs/ocis-charts.git /var/tmp/ocis-charts`
|
||||
2. cd into the charts root: `cd /var/tmp/ocis-charts/ocis`
|
||||
3. install the package: `helm install ocis .`
|
||||
4. verify the application is running in the cluster: `kubectl get pods`
|
||||
|
||||
```console
|
||||
❯ kubectl get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
glauth-5fb678b9cb-zs5qh 1/1 Running 3 (10m ago) 3h33m
|
||||
ocis-proxy-848f988687-g7fmb 1/1 Running 2 (10m ago) 130m
|
||||
ocs-6bb8896dd6-t4bkx 1/1 Running 3 (10m ago) 3h33m
|
||||
settings-6bf77f978d-27rdf 1/1 Running 3 (10m ago) 3h33m
|
||||
storages-6b45f9c4-2j696 10/10 Running 23 (4m43s ago) 112m
|
||||
store-cf79db94d-hvb7z 1/1 Running 3 (10m ago) 3h33m
|
||||
web-8685fdd574-tmkfb 1/1 Running 2 (10m ago) 157m
|
||||
webdav-f8d4dd7c6-vv4n7 1/1 Running 3 (10m ago) 3h33m
|
||||
```
|
||||
|
||||
5. expose the proxy as a service to the host
|
||||
|
||||
```console
|
||||
~/code/refs/ocis-charts
|
||||
❯ minikube service proxy-service --url
|
||||
🏃 Starting tunnel for service proxy-service.
|
||||
|-----------|---------------|-------------|------------------------|
|
||||
| NAMESPACE | NAME | TARGET PORT | URL |
|
||||
|-----------|---------------|-------------|------------------------|
|
||||
| default | proxy-service | | http://127.0.0.1:63633 |
|
||||
|-----------|---------------|-------------|------------------------|
|
||||
http://127.0.0.1:63633
|
||||
❗ Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
|
||||
```
|
||||
|
||||
6. attempt a `PROPFIND` WebDAV request to the storage: `curl -v -k -u einstein:relativity -H "depth: 0" -X PROPFIND https://127.0.0.1:63633/remote.php/dav/files/ | xmllint --format -`
|
||||
|
||||
If all is correctly setup, you should expect a response back:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
|
||||
<d:response>
|
||||
<d:href>/remote.php/dav/files/einstein/</d:href>
|
||||
<d:propstat>
|
||||
<d:prop>
|
||||
<oc:id>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjZlMWIyMjdmLWZmYTQtNDU4Ny1iNjQ5LWE1YjBlYzFkMTNmYw==</oc:id>
|
||||
<oc:fileid>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjZlMWIyMjdmLWZmYTQtNDU4Ny1iNjQ5LWE1YjBlYzFkMTNmYw==</oc:fileid>
|
||||
<d:getetag>"92cc7f069c8496ee2ce33ad4f29de763"</d:getetag>
|
||||
<oc:permissions>WCKDNVR</oc:permissions>
|
||||
<d:resourcetype>
|
||||
<d:collection/>
|
||||
</d:resourcetype>
|
||||
<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
|
||||
<oc:size>4096</oc:size>
|
||||
<d:getlastmodified>Tue, 14 Sep 2021 12:45:29 +0000</d:getlastmodified>
|
||||
<oc:favorite>0</oc:favorite>
|
||||
</d:prop>
|
||||
<d:status>HTTP/1.1 200 OK</d:status>
|
||||
</d:propstat>
|
||||
</d:response>
|
||||
</d:multistatus>
|
||||
```
|
||||
|
||||
## Setting up an external identity provider
|
||||
|
||||
The previous setup works because the proxy is configured to run using basic auth, but if we want to actually use the WebUI we will need an external identity provider. From here on the setup is composed of:
|
||||
|
||||
- keycloak
|
||||
- traefik
|
||||
- postgresql
|
||||
|
||||
Running on i.e: `https://keycloak.owncloud.works`. Because of this we have to adjust some of `values.yaml` key / values to:
|
||||
|
||||
```diff
|
||||
diff --git a/ocis/values.yaml b/ocis/values.yaml
|
||||
index fbc229c..5b36fbd 100644
|
||||
--- a/ocis/values.yaml
|
||||
+++ b/ocis/values.yaml
|
||||
@@ -1,9 +1,9 @@
|
||||
# when in local tunnel mode, ingressDomain is the proxy address.
|
||||
# sadly when in combination with --set, anchors are lost.
|
||||
-ingressDomain: &ingressDomain "https://stale-wasp-86.loca.lt"
|
||||
+ingressDomain: &ingressDomain "https://keycloak.owncloud.works"
|
||||
|
||||
# base ocis image
|
||||
-image: owncloud/ocis:1.0.0-rc8-linux-amd64
|
||||
+image: owncloud/ocis:1.11.0-linux-amd64
|
||||
|
||||
# set of ocis services to create deployments objects.
|
||||
services:
|
||||
@@ -22,6 +22,8 @@ services:
|
||||
value: "debug"
|
||||
- name: "PROXY_REVA_GATEWAY_ADDR"
|
||||
value: "storages-service:9142"
|
||||
+ - name: "PROXY_OIDC_ISSUER"
|
||||
+ value: "https://keycloak.ocis-keycloak.released.owncloud.works/auth/realms/oCIS"
|
||||
- name: "PROXY_ENABLE_BASIC_AUTH"
|
||||
value: "'true'" # see https://stackoverflow.com/a/44692213/2295410
|
||||
volumeMounts:
|
||||
@@ -81,34 +85,6 @@ services:
|
||||
labels:
|
||||
app: "glauth"
|
||||
args: ["glauth"]
|
||||
settings:
|
||||
metadata:
|
||||
name: "settings"
|
||||
@@ -135,11 +111,11 @@ services:
|
||||
args: ["web"]
|
||||
env:
|
||||
- name: "WEB_UI_CONFIG_SERVER"
|
||||
- value: *ingressDomain
|
||||
+ value: "https://127.0.0.1:51559/"
|
||||
- name: "WEB_OIDC_METADATA_URL"
|
||||
- value: *ingressDomain
|
||||
+ value: "https://keycloak.owncloud.works/auth/realms/oCIS/.well-known/openid-configuration"
|
||||
- name: "WEB_OIDC_AUTHORITY"
|
||||
- value: *ingressDomain
|
||||
+ value: "https://keycloak.owncloud.works/auth/realms/oCIS/.well-known/openid-configuration"
|
||||
ports:
|
||||
values:
|
||||
- name: "http"
|
||||
@@ -231,4 +207,4 @@ kubeServices:
|
||||
- protocol: TCP
|
||||
port: 9100
|
||||
targetPort: 9100
|
||||
```
|
||||
|
||||
NOTE: The IDP has to be properly configure with an oCIS realm and a `web` client configured. There are example config file that have to be adjusted depending on your environment on our [docker-compose examples](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_keycloak/config/keycloak).
|
||||
|
||||
You might still need to adjust the IDP:
|
||||
|
||||
- Valid Redirect URIs (under clients > web)
|
||||
- Web Origins (under clients > web)
|
||||
|
||||
## What is GCP
|
||||
|
||||
> Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products
|
||||
|
||||
One of such offered services are [Google Kubernetes Engines (GKE)](https://cloud.google.com/kubernetes-engine).
|
||||
|
||||
### Can Helm charts run on GCP?
|
||||
|
||||
Yes. The next logical step would be to deploy this charts on GKE. There is a pretty thorough guide [at shippable.com](http://docs.shippable.com/deploy/tutorial/deploy-to-gcp-gke-helm/) that, for the purposes of our docs, we are only interested on step 5, as we already explain the previous concepts, and provide with the Charts.
|
||||
|
||||
## TODOs
|
||||
|
||||
- While log-in works and creating folders work, uploading fails, most likely a configuration issue that has to be solved.
|
||||
@@ -31,6 +31,8 @@ For more information and how to deploy it, see [monitoring & tracing client](htt
|
||||
|
||||
## Monitoring & tracing server
|
||||
|
||||
A live version of the monitoring and tracing server for our demo instances is available here: [Grafana](https://grafana.infra.owncloud.works), [Prometheus](https://prometheus.infra.owncloud.works) and [Jaeger Query](https://jaeger.infra.owncloud.works).
|
||||
|
||||
The monitoring & tracing server is considered as shared infrastructure and is normally used for different services. This means that oCIS is not the only software whose metrics and traces are available on the monitoring server. It is also possible that data of multiple oCIS instances are available on the monitoring server.
|
||||
|
||||
Metrics are scraped, stored and can be queried with Prometheus. For the visualization of these metrics Grafana is used. Because Prometheus is scraping the metrics from the oCIS server (pull model instead of a push model), the Prometheus server must have access to the exposed endpoint of the Telegraf Prometheus output plugin.
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
---
|
||||
title: "Parallel deployment of oC10 and oCIS"
|
||||
date: 2020-10-12T14:04:00+01:00
|
||||
weight: 24
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
geekdocFilePath: oc10_ocis_parallel.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
{{< hint warning >}}
|
||||
This deployment example currently has known issues. See [github.com/owncloud/ocis/issues/2549](https://github.com/owncloud/ocis/issues/2549) for more information.
|
||||
{{< /hint >}}
|
||||
|
||||
## Overview
|
||||
|
||||
- This setup reflects [stage 6 of the oC10 to oCIS migration plan]({{< ref "migration#stage-6-parallel-deployment" >}})
|
||||
- Traefik generating self signed certificates for local setup or obtaining valid SSL certificates for a server setup
|
||||
- OpenLDAP server with demo users
|
||||
- LDAP admin interface to edit users
|
||||
- Keycloak as OpenID Connect provider in federation with the LDAP server
|
||||
- ownCloud 10 with MariaDB and Redis
|
||||
- ownCloud 10 is configured to synchronize users from the LDAP server
|
||||
- ownCloud 10 is used to use OpenID Connect for authentication with Keycloak
|
||||
- oCIS running behind Traefik as reverse proxy
|
||||
- oCIS is using the ownCloud storage driver on the same files and same database as ownCloud 10
|
||||
- oCIS is using Keycloak as OpenID Connect provider
|
||||
- oCIS is using the LDAP server as user backend
|
||||
- All requests to both oCIS and oC10 are routed through the oCIS proxy and will be routed based on an OIDC claim to one of them. Therefore admins can change on a user basis in the LDAP which backend is used.
|
||||
|
||||
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/oc10_ocis_parallel)
|
||||
|
||||
## Server Deployment
|
||||
|
||||
### Requirements
|
||||
|
||||
- Linux server with docker and docker-compose installed
|
||||
- four domains set up and pointing to your server
|
||||
- cloud.\* for serving oCIS
|
||||
- keycloak.\* for serving Keycloak
|
||||
- ldap .\* for serving the LDAP managment UI
|
||||
- traefik.\* for serving the Traefik dashboard
|
||||
|
||||
See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
### Install this example
|
||||
|
||||
- Clone oCIS repository
|
||||
|
||||
`git clone https://github.com/owncloud/ocis.git`
|
||||
|
||||
- Go to the deployment example
|
||||
|
||||
`cd ocis/deployment/examples/oc10_ocis_parallel`
|
||||
|
||||
- Open the `.env` file in a text editor
|
||||
The file by default looks like this:
|
||||
|
||||
```bash
|
||||
# If you're on a internet facing server please comment out following line.
|
||||
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
|
||||
INSECURE=true
|
||||
|
||||
### Traefik settings ###
|
||||
TRAEFIK_LOG_LEVEL=
|
||||
# Serve Treafik dashboard. Defaults to "false".
|
||||
TRAEFIK_DASHBOARD=
|
||||
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
|
||||
TRAEFIK_DOMAIN=
|
||||
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
|
||||
TRAEFIK_BASIC_AUTH_USERS=
|
||||
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
|
||||
TRAEFIK_ACME_MAIL=
|
||||
|
||||
### shared oCIS / oC10 settings ###
|
||||
# Domain of oCIS / oC10, where you can find the frontend. Defaults to "cloud.owncloud.test"
|
||||
CLOUD_DOMAIN=
|
||||
|
||||
### oCIS settings ###
|
||||
# oCIS version. Defaults to "latest"
|
||||
OCIS_DOCKER_TAG=
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
|
||||
### oCIS settings ###
|
||||
# oC10 version. Defaults to "latest"
|
||||
OC10_DOCKER_TAG=
|
||||
# client secret which the openidconnect app uses to authenticate to Keycloak. Defaults to "oc10-oidc-secret"
|
||||
OC10_OIDC_CLIENT_SECRET=
|
||||
# app which will be shown when opening the ownCloud 10 UI. Defaults to "files" but also could be set to "web"
|
||||
OWNCLOUD_DEFAULT_APP=
|
||||
# if set to "false" (default) links will be opened in the classic UI, if set to "true" ownCloud Web is used
|
||||
OWNCLOUD_WEB_REWRITE_LINKS=
|
||||
|
||||
### LDAP settings ###
|
||||
# password for the LDAP admin user "cn=admin,dc=owncloud,dc=com", defaults to "admin"
|
||||
LDAP_ADMIN_PASSWORD=
|
||||
# Domain of the LDAP management frontend. Defaults to "ldap.owncloud.test"
|
||||
LDAP_MANAGER_DOMAIN=
|
||||
|
||||
### Keycloak ###
|
||||
# Domain of Keycloak, where you can find the managment and authentication frontend. Defaults to "keycloak.owncloud.test"
|
||||
KEYCLOAK_DOMAIN=
|
||||
# Realm which to be used with oC10 and oCIS. Defaults to "owncloud"
|
||||
KEYCLOAK_REALM=
|
||||
# Admin user login name. Defaults to "admin"
|
||||
KEYCLOAK_ADMIN_USER=
|
||||
# Admin user login password. Defaults to "admin"
|
||||
KEYCLOAK_ADMIN_PASSWORD=
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` eg. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
|
||||
|
||||
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (eg. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
|
||||
|
||||
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
|
||||
|
||||
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
|
||||
|
||||
Set your domain for the oC10 and oCIS frontend in `CLOUD_DOMAIN=`, eg. `CLOUD_DOMAIN=cloud.owncloud.test`.
|
||||
|
||||
You also must override the default secrets in `STORAGE_TRANSFER_SECRET` and `OCIS_JWT_SECRET` in order to secure your oCIS instance. Choose some random strings eg. from the output of `openssl rand -base64 32`. For more information see [secure an oCIS instance]({{< ref "./#secure-an-ocis-instance" >}}).
|
||||
|
||||
By default ownCloud 10 will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OC10_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
|
||||
|
||||
You can switch the default application of ownCloud 10 by setting`OWNCLOUD_DEFAULT_APP=files` in oder to have the classic UI as frontend, which is also the default. If you prefer ownCloud Web as the default application in ownCloud 10 just set `OWNCLOUD_DEFAULT_APP=web`.
|
||||
|
||||
In oder to change the default link open action which defaults to the classic UI (`OWNCLOUD_WEB_REWRITE_LINKS=false`) you can set it to `OWNCLOUD_WEB_REWRITE_LINKS=true`. This will lead to links being opened in ownCloud Web.
|
||||
|
||||
The OpenLDAP server in this example deployment has an admin users, which is also used as bind user in order to keep theses examples simple. You can change the default password "admin" to a different one by setting it to `LDAP_ADMIN_PASSWORD=...`.
|
||||
|
||||
Set your domain for the LDAP manager UI in `LDAP_MANAGER_DOMAIN=`, eg. `ldap.owncloud.test`.
|
||||
|
||||
Set your domain for the Keycloak administration panel and authentication endpoints to `KEYCLOAK_DOMAIN=` eg. `KEYCLOAK_DOMAIN=keycloak.owncloud.test`.
|
||||
|
||||
Changing the used Keycloak realm can be done by setting `KEYCLOAK_REALM=`. This defaults to the ownCloud realm `KEYCLOAK_REALM=owncloud`. The ownCloud realm will be automatically imported on startup and includes our demo users.
|
||||
|
||||
You probably should secure your Keycloak admin account by setting `KEYCLOAK_ADMIN_USER=` and `KEYCLOAK_ADMIN_PASSWORD=` to values other than `admin`.
|
||||
|
||||
Now you have configured everything and can save the file.
|
||||
|
||||
- Start the docker stack
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
- You now can visit the cloud, oC10 or oCIS depending on the user configuration. Marie defaults to oC10 and Richard and Einstein default to oCIS, but you can change the ownCloud selector at any time in the LDAP management UI.
|
||||
|
||||
## Local setup
|
||||
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
|
||||
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
|
||||
|
||||
On Linux and macOS you can add them to your `/etc/hosts` files like this:
|
||||
|
||||
```
|
||||
127.0.0.1 cloud.owncloud.test
|
||||
127.0.0.1 keycloak.owncloud.test
|
||||
127.0.0.1 ldap.owncloud.test
|
||||
127.0.0.1 traefik.owncloud.test
|
||||
```
|
||||
|
||||
After that you're ready to start the application stack:
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
You now can visit the cloud, oC10 or oCIS depending on the user configuration. Marie defaults to oC10 and Richard and Einstein default to oCIS, but you can change the ownCloud selector at any time in the LDAP management UI.
|
||||
@@ -74,7 +74,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
OCIS_TRANSFER_SECRET=
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
|
||||
### oCIS Hello settings ###
|
||||
# oCIS Hello version. Defaults to "latest"
|
||||
@@ -103,7 +103,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
- You now can visit oCIS and are able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web.
|
||||
- You now can visit oCIS and are able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web. 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.
|
||||
|
||||
## Local setup
|
||||
|
||||
@@ -115,11 +115,11 @@ On Linux and macOS you can add them to your `/etc/hosts` files like this:
|
||||
|
||||
```
|
||||
127.0.0.1 ocis.owncloud.test
|
||||
127.0.0.1 traefik.owncloud.testt
|
||||
127.0.0.1 traefik.owncloud.test
|
||||
```
|
||||
|
||||
After that you're ready to start the application stack:
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You are now able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web.
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You are now able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web. 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.
|
||||
|
||||
@@ -19,7 +19,7 @@ geekdocFilePath: ocis_keycloak.md
|
||||
|
||||
The docker stack consists 4 containers. One of them is Traefik, a proxy which is terminating ssl and forwards the requests to oCIS in the internal docker network.
|
||||
|
||||
Keykloak add two containers: Keycloak itself and a PostgreSQL as database. Keycloak will be configured as oCIS' IDP instead of the internal IDP [LibreGraph Connect]({{< ref "../../extensions/idp" >}})
|
||||
Keycloak add two containers: Keycloak itself and a PostgreSQL as database. Keycloak will be configured as oCIS' IDP instead of the internal IDP [LibreGraph Connect]({{< ref "../../extensions/idp" >}})
|
||||
|
||||
The other container is oCIS itself running all extensions in one container. In this example oCIS uses [oCIS storage driver]({{< ref "../../extensions/storage/storages#storage-drivers" >}})
|
||||
|
||||
@@ -77,7 +77,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
OCIS_TRANSFER_SECRET=
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
|
||||
### Keycloak ###
|
||||
# Domain of Keycloak, where you can find the management and authentication frontend. Defaults to "keycloak.owncloud.test"
|
||||
@@ -119,7 +119,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
* You now can visit oCIS, Keycloak and Traefik dashboard on your configured domains
|
||||
* You now can visit oCIS, Keycloak and Traefik dashboard on your configured domains. 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.
|
||||
|
||||
## Local setup
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
@@ -139,4 +139,4 @@ After that you're ready to start the application stack:
|
||||
|
||||
Open https://keycloak.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 now can login to oCIS with the demo users.
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the demo users. 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.
|
||||
|
||||
@@ -76,7 +76,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
OCIS_TRANSFER_SECRET=
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
|
||||
### MINIO / S3 settings ###
|
||||
# Domain of MinIO where the Web UI is accessible. Defaults to "minio.owncloud.test".
|
||||
@@ -116,7 +116,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
* You now can visit oCIS and are able to use it just normally. If you log into the web UI of MinIO, you will see blobs of files you uploaded.
|
||||
* You now can visit oCIS and are able to use it just normally. If you log into the web UI of MinIO, you will see blobs of files you uploaded. 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.
|
||||
|
||||
## Local setup
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
@@ -134,4 +134,4 @@ After that you're ready to start the application stack:
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can use oCIS normally and should now upload a file. Open https://minio.owncloud.test in your browser and accept the invalid certificate warning, after that you will see blobs of files you have uploaded to oCIS.
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can use oCIS normally and should now upload a file. Open https://minio.owncloud.test in your browser and accept the invalid certificate warning, after that you will see blobs of files you have uploaded to oCIS. 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.
|
||||
|
||||
@@ -71,7 +71,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
OCIS_TRANSFER_SECRET=
|
||||
STORAGE_TRANSFER_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`.
|
||||
@@ -94,7 +94,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
* You now can visit oCIS and Traefik dashboard on your configured domains
|
||||
* You now can visit oCIS and Traefik dashboard on your configured domains. 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.
|
||||
|
||||
## Local setup
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
@@ -111,4 +111,4 @@ After that you're ready to start the application stack:
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}})
|
||||
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}}). 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.
|
||||
|
||||
@@ -79,7 +79,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
|
||||
OCIS_JWT_SECRET=
|
||||
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
|
||||
OCIS_TRANSFER_SECRET=
|
||||
STORAGE_TRANSFER_SECRET=
|
||||
|
||||
### Wopi server settings ###
|
||||
# oCIS Wopi server version. Defaults to "latest"
|
||||
@@ -135,7 +135,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
`docker-compose up -d`
|
||||
|
||||
* You now can visit oCIS and are able to open an office document in your browser.
|
||||
* You now can visit oCIS and are 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.
|
||||
|
||||
## Local setup
|
||||
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
|
||||
@@ -156,4 +156,4 @@ After that you're ready to start the application stack:
|
||||
|
||||
Open https://collabora.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.
|
||||
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.
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
title: "Systemd service"
|
||||
date: 2020-09-27T06:00:00+01:00
|
||||
weight: 16
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/deployment
|
||||
geekdocFilePath: systemd.md
|
||||
---
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Install the oCIS binary
|
||||
Download the oCIS binary of your preferred version and for your CPU architecture and operating system from [download.owncloud.com](https://download.owncloud.com/ocis/ocis).
|
||||
|
||||
Rename the downloaded binary to `ocis` and move it to `/usr/bin/`. As a next step, you need to mark it as executable with `chmod +x /usr/bin/ocis`.
|
||||
|
||||
When you now run `ocis help` on your command line, you should see the available options for the oCIS command.
|
||||
|
||||
|
||||
## Systemd service definition
|
||||
|
||||
Create the Systemd service definition for oCIS in the file `/etc/systemd/system/ocis.service` with following content:
|
||||
```
|
||||
[Unit]
|
||||
Description=OCIS server
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
EnvironmentFile=/etc/ocis/ocis.env
|
||||
ExecStart=ocis server
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
For reasons of simplicity we are using the root user and group to run oCIS which is not recommended. Please use a non-root user in production environments and modify the oCIS service definition accordingly.
|
||||
|
||||
|
||||
In the service definition we referenced `/etc/ocis/ocis.env` as our file containing environment variables for the oCIS process.
|
||||
In order to create the file we need first to create the folder `/etc/ocis/` and than we can add the actual `/etc/ocis/ocis.env` with following content:
|
||||
|
||||
```
|
||||
OCIS_URL=https://some-hostname-or-ip:9200
|
||||
PROXY_HTTP_ADDR=0.0.0.0:9200
|
||||
|
||||
OCIS_LOG_LEVEL=error
|
||||
|
||||
GLAUTH_LDAPS_CERT=/etc/ocis/ldap/ldaps.crt
|
||||
GLAUTH_LDAPS_KEY=/etc/ocis/ldap/ldaps.key
|
||||
IDP_TRANSPORT_TLS_CERT=/etc/ocis/idp/server.crt
|
||||
IDP_TRANSPORT_TLS_KEY=/etc/ocis/idp/server.key
|
||||
PROXY_TRANSPORT_TLS_CERT=/etc/ocis/proxy/server.crt
|
||||
PROXY_TRANSPORT_TLS_KEY=/etc/ocis/proxy/server.key
|
||||
```
|
||||
|
||||
Please change your `OCIS_URL` in order to reflect your actual deployment.
|
||||
|
||||
|
||||
## Starting the oCIS service
|
||||
|
||||
You can enable oCIS now by running `systemctl enable --now ocis`. It will ensure that oCIS also is restarted after a reboot of the host.
|
||||
|
||||
If you need to restart oCIS because of configuration changes in `/etc/ocis/ocis.env`, run `systemctl restart ocis`.
|
||||
|
||||
You can have a look at the logs of oCIS by issuing `journalctl -f -u ocis`.
|
||||
Reference in New Issue
Block a user