Merge branch 'master' into make-clean-identifier

This commit is contained in:
Jörn Friedrich Dreyer
2020-04-16 13:46:05 +02:00
committed by GitHub
4 changed files with 180 additions and 134 deletions

View File

@@ -1,6 +1,6 @@
---
title: "Configuration"
date: "2020-04-03T21:39:56"
date: "2020-04-14T22:00:52+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
@@ -11,13 +11,11 @@ geekdocFilePath: configuration.md
## Configuration
## Configuration of extensions
oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files.
Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
## Configuration using config files
### Configuration using config files
Out of the box extensions will attempt to read configuration details from:
@@ -29,128 +27,172 @@ $HOME/.ocis
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*.
### Configuration file
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
## Envrionment variables
### Envrionment variables
If you prefer to configure the service with environment variables you can see the available variables below.
### Server
### Commandline flags
OCIS_TRACING_ENABLED
: Enable sending traces.
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
OCIS_TRACING_TYPE
: Tracing backend type. Default: `jaeger`.
## Root Command
OCIS_TRACING_ENDPOINT
: Endpoint for the agent.
ownCloud Infinite Scale Stack
OCIS_TRACING_COLLECTOR
: Endpoint for the collector.
Usage: `ocis [global options] command [command options] [arguments...]`
OCIS_TRACING_SERVICE
: Service name for tracing. Default: `ocis`.
OCIS_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9010`.
OCIS_DEBUG_TOKEN
: Token to grant metrics access.
OCIS_DEBUG_PPROF
: Enable pprof debugging.
OCIS_DEBUG_ZPAGES
: Enable zpages debugging.
OCIS_HTTP_ADDR
: Address to bind http server. Default: `0.0.0.0:9000`.
OCIS_HTTP_ROOT
: Root path of http server. Default: `/`.
OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### Root Command
OCIS_CONFIG_FILE
--config-file | $OCIS_CONFIG_FILE
: Path to config file.
OCIS_LOG_LEVEL
--log-level | $OCIS_LOG_LEVEL
: Set logging level. Default: `info`.
OCIS_LOG_PRETTY
--log-pretty | $OCIS_LOG_PRETTY
: Enable pretty logging. Default: `true`.
OCIS_LOG_COLOR
--log-color | $OCIS_LOG_COLOR
: Enable colored logging. Default: `true`.
### Health
## Sub Commands
OCIS_DEBUG_ADDR
### ocis health
Check health status
Usage: `ocis health [command options] [arguments...]`
--debug-addr | $OCIS_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9010`.
## Commandline flags
### ocis server
If you prefer to configure the service with commandline flags you can see the available variables below.
Start fullstack server
### Server
Usage: `ocis server [command options] [arguments...]`
--tracing-enabled
--tracing-enabled | $OCIS_TRACING_ENABLED
: Enable sending traces.
--tracing-type
--tracing-type | $OCIS_TRACING_TYPE
: Tracing backend type. Default: `jaeger`.
--tracing-endpoint
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
: Endpoint for the agent.
--tracing-collector
--tracing-collector | $OCIS_TRACING_COLLECTOR
: Endpoint for the collector.
--tracing-service
--tracing-service | $OCIS_TRACING_SERVICE
: Service name for tracing. Default: `ocis`.
--debug-addr
--debug-addr | $OCIS_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9010`.
--debug-token
--debug-token | $OCIS_DEBUG_TOKEN
: Token to grant metrics access.
--debug-pprof
--debug-pprof | $OCIS_DEBUG_PPROF
: Enable pprof debugging.
--debug-zpages
--debug-zpages | $OCIS_DEBUG_ZPAGES
: Enable zpages debugging.
--http-addr
--http-addr | $OCIS_HTTP_ADDR
: Address to bind http server. Default: `0.0.0.0:9000`.
--http-root
--http-root | $OCIS_HTTP_ROOT
: Root path of http server. Default: `/`.
--grpc-addr
--grpc-addr | $OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### Root Command
### List of available Extension subcommands
--config-file
: Path to config file.
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.
--log-level
: Set logging level. Default: `info`.
#### ocis proxy
--log-pretty
: Enable pretty logging. Default: `true`.
Start proxy server
--log-color
: Enable colored logging. Default: `true`.
#### ocis reva-storage-oc-data
### Health
Start reva oc storage dataprovider
#### ocis reva-auth-bearer
Start reva auth-bearer service
#### ocis webdav
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
#### ocis reva-storage-home-data
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
Start reva root storage
--debug-addr
: Address to debug endpoint. Default: `0.0.0.0:9010`.

2
go.mod
View File

@@ -15,7 +15,7 @@ require (
github.com/micro/go-micro/v2 v2.0.1-0.20200212105717-d76baf59de2e
github.com/micro/micro/v2 v2.0.1-0.20200210100719-f38a1d8d5348
github.com/openzipkin/zipkin-go v0.2.2
github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26
github.com/owncloud/flaex v0.2.0
github.com/owncloud/ocis-glauth v0.4.0
github.com/owncloud/ocis-graph v0.0.0-20200318175820-9a5a6e029db7
github.com/owncloud/ocis-graph-explorer v0.0.0-20200210111049-017eeb40dc0c

9
go.sum
View File

@@ -711,8 +711,8 @@ github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKG
github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8=
github.com/ory/go-convenience v0.1.0/go.mod h1:uEY/a60PL5c12nYz4V5cHY03IBmwIAEm8TWB0yn9KNs=
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ=
github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26 h1:ofIXmzOjPRH3Rr/iGaPoTXDnlIc0tsaG1kJqXB+Hb94=
github.com/owncloud/flaex v0.0.0-20200403112718-56e2e067dd26/go.mod h1:E/0AQ3JGUVeEQxf2IxZoysUXpE0IEL/O9Rrd13dVEyU=
github.com/owncloud/flaex v0.2.0 h1:3FLf8oyMgA6HLK7w4+VJ5N1oVA8G7MptLCVjfxxIaww=
github.com/owncloud/flaex v0.2.0/go.mod h1:jip86t4OVURJTf8CM/0e2qcji/Y4NG3l2lR8kex4JWw=
github.com/owncloud/ocis-accounts v0.1.0 h1:6YjvRWNW26QHOqOFONg0HeogxhxaVGS1S2AoCUgzE3M=
github.com/owncloud/ocis-accounts v0.1.0/go.mod h1:eoOPfuFCJ23n2csSMzapfjzVhG2kt8sQ2tu/9J+SwsA=
github.com/owncloud/ocis-glauth v0.4.0 h1:L+S2UzkJJv5NWBVnTIZObdFz5zvKz8L0crIWbXtTF8o=
@@ -896,7 +896,6 @@ github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRci
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
@@ -1166,6 +1165,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361 h1:RIIXAeV6GvDBuADKumTODatUqANFZ+5BPMnzsy4hulY=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
@@ -1281,8 +1281,9 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20191109101513-0171b7c15da1/go.mod h1:VJq7+38rpM4TSUbRiZX4P5UVAKK2UQpNQLZClkFQkpE=
k8s.io/apimachinery v0.0.0-20191109100837-dffb012825f2/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s=
k8s.io/apimachinery v0.0.0-20191111054156-6eb29fdf75dc/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s=

View File

@@ -1,23 +1,33 @@
---
title: "Configuration"
date: "{{ dateInZone "2006-01-02T15:04:05" (now) "UTC"}}"
date: "{{ date "2006-01-02T15:04:05-0700" now }}"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
geekdocFilePath: configuration.md
---
{{- define "options"}}
{{ $fnName := (last . ).Flags -}}
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end }}
{{`{{< toc >}}`}}
## Configuration
## Configuration of extensions
oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files.
Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
## Configuration using config files
### Configuration using config files
Out of the box extensions will attempt to read configuration details from:
@@ -29,63 +39,56 @@ $HOME/.ocis
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*.
### Configuration file
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
## Envrionment variables
### Envrionment variables
If you prefer to configure the service with environment variables you can see the available variables below.
### Server
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "ServerWithConfig"}}
{{ index .Env 0 }}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end }}
{{- end }}
{{- end }}
### Root Command
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "RootWithConfig"}}
{{ index .Env 0 }}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end }}
{{- end }}
{{- end }}
### Health
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "HealthWithConfig"}}
{{ index .Env 0 }}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end }}
{{- end }}
{{- end }}
## Commandline flags
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below.
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
{{ $options := .Options -}}
{{ range $com := .Commands }}{{ with (list $options $com) -}}
{{ $c := last . -}}
{{ if eq $c.Name "ocis" -}}
## Root Command
{{ $c.Usage }}
Usage: `ocis [global options] command [command options] [arguments...]`
{{ template "options" . -}}
## Sub Commands
{{ end -}}
{{ end -}}
{{ end -}}
{{- range $com := .Commands }}{{ with (list $options $com) -}}
{{- $c := last . }}
{{- if eq $c.Name "server" "health" -}}
{{- if ne $c.FnName "Simple" -}}
### ocis {{ $c.Name }}
{{ $c.Usage }}
Usage: `ocis {{ $c.Name }} [command options] [arguments...]`
{{ template "options" . }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
### List of available Extension subcommands
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.
{{ range $com := .Commands }}{{ with $com -}}
{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") -}}
#### ocis {{ .Name }}
{{ .Usage }}
### Server
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "ServerWithConfig"}}
--{{ .Name}}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end }}
{{- end }}
{{- end }}
### Root Command
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "RootWithConfig"}}
--{{ .Name}}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end }}
{{- end }}
{{- end }}
### Health
{{ range $opts := . }}{{ with $opts }}
{{- if eq .FnName "HealthWithConfig"}}
--{{ .Name}}
: {{ .Usage }}. {{- if .Default }} Default: `{{ .Default }}`.{{ end }}
{{ end -}}
{{- end -}}
{{- end -}}