Merge remote-tracking branch 'origin/master' into rebuild-index

This commit is contained in:
Benedikt Kulmann
2020-10-24 06:38:39 +02:00
12 changed files with 92 additions and 294 deletions

View File

@@ -1347,11 +1347,11 @@ def ocisServer(storage):
#'OCIS_LOG_LEVEL': 'debug',
'STORAGE_HOME_DRIVER': '%s' % (storage),
'STORAGE_USERS_DRIVER': '%s' % (storage),
'STORAGE_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/storage/users',
'STORAGE_STORAGE_LOCAL_ROOT': '/srv/app/tmp/ocis/local/root',
'STORAGE_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/ocis/owncloud/data',
'STORAGE_DRIVER_OCIS_ROOT': '/srv/app/tmp/ocis/storage/users',
'STORAGE_DRIVER_LOCAL_ROOT': '/srv/app/tmp/ocis/local/root',
'STORAGE_METADATA_ROOT': '/srv/app/tmp/ocis/metadata',
'STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
'STORAGE_DRIVER_OWNCLOUD_DATADIR': '/srv/app/tmp/ocis/owncloud/data',
'STORAGE_DRIVER_OWNCLOUD_REDIS_ADDR': 'redis:6379',
'STORAGE_LDAP_IDP': 'https://ocis-server:9200',
'STORAGE_OIDC_ISSUER': 'https://ocis-server:9200',
'PROXY_OIDC_ISSUER': 'https://ocis-server:9200',

View File

@@ -0,0 +1,5 @@
Change: Clarify storage driver env vars
After renaming ocsi-reva to storage and combining the storage and data providers some env vars were confusingly named `STORAGE_STORAGE_...`. We are changing the prefix for driver related env vars to `STORAGE_DRIVER_...`. This makes changing the storage driver using eg.: `STORAGE_HOME_DRIVER=eos` and setting driver options using `STORAGE_DRIVER_EOS_LAYOUT=...` less confusing.
https://github.com/owncloud/ocis/pull/729

View File

@@ -158,11 +158,11 @@ For a simple docker-compose setup, you can create a volume which will be used by
The CERN eos storage has evolved with ownCloud and natively supports id based lookup, ETag propagation, subtree size accounting, sharing, trash and versions. To use it you need to change the default configuration of the `storage storage-home` command (or have a look at the Makefile ̀ eos-start` target):
```
export STORAGE_STORAGE_HOME_DRIVER=eos
export STORAGE_STORAGE_EOS_NAMESPACE=/eos
export STORAGE_STORAGE_EOS_MASTER_URL="root://eos-mgm1.eoscluster.cern.ch:1094"
export STORAGE_STORAGE_EOS_ENABLE_HOME=true
export STORAGE_STORAGE_EOS_LAYOUT="dockertest/{{.Username}}"
export STORAGE_HOME_DRIVER=eos
export STORAGE_DRIVER_EOS_NAMESPACE=/eos
export STORAGE_DRIVER_EOS_MASTER_URL="root://eos-mgm1.eoscluster.cern.ch:1094"
export STORAGE_DRIVER_EOS_ENABLE_HOME=true
export STORAGE_DRIVER_EOS_LAYOUT="dockertest/{{.Username}}"
```
Running it locally also requires the `eos` and `xrootd` binaries. Running it using `make eos-start` will use CentOS based containers that already have the necessary packages installed.

View File

@@ -1,232 +0,0 @@
---
title: "Configuration"
date: "2020-10-05T21:19:39+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: configuration.md
---
{{< toc >}}
## Configuration
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
Out of the box extensions will attempt to read configuration details from:
```console
/etc/ocis
$HOME/.ocis
./config
```
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 ...`*.
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
If you prefer to configure the service with environment variables you can see the available variables below.
### Commandline flags
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.
## Root Command
ownCloud Infinite Scale Stack
Usage: `ocis [global options] command [command options] [arguments...]`
--config-file | $OCIS_CONFIG_FILE
: Path to config file.
--log-level | $OCIS_LOG_LEVEL
: Set logging level. Default: `info`.
--log-pretty | $OCIS_LOG_PRETTY
: Enable pretty logging. Default: `true`.
--log-color | $OCIS_LOG_COLOR
: Enable colored logging. Default: `true`.
## Sub Commands
### ocis kill
Kill an extension by name
Usage: `ocis kill [command options] [arguments...]`
### ocis server
Start fullstack server
Usage: `ocis server [command options] [arguments...]`
--tracing-enabled | $OCIS_TRACING_ENABLED
: Enable sending traces.
--tracing-type | $OCIS_TRACING_TYPE
: Tracing backend type. Default: `jaeger`.
--tracing-endpoint | $OCIS_TRACING_ENDPOINT
: Endpoint for the agent. Default: `localhost:6831`.
--tracing-collector | $OCIS_TRACING_COLLECTOR
: Endpoint for the collector. Default: `http://localhost:14268/api/traces`.
--tracing-service | $OCIS_TRACING_SERVICE
: Service name for tracing. Default: `ocis`.
--debug-addr | $OCIS_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9010`.
--debug-token | $OCIS_DEBUG_TOKEN
: Token to grant metrics access.
--debug-pprof | $OCIS_DEBUG_PPROF
: Enable pprof debugging.
--debug-zpages | $OCIS_DEBUG_ZPAGES
: Enable zpages debugging.
--http-addr | $OCIS_HTTP_ADDR
: Address to bind http server. Default: `0.0.0.0:9000`.
--http-root | $OCIS_HTTP_ROOT
: Root path of http server. Default: `/`.
--grpc-addr | $OCIS_GRPC_ADDR
: Address to bind grpc server. Default: `0.0.0.0:9001`.
### ocis run
Runs an extension
Usage: `ocis run [command options] [arguments...]`
### 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`.
### ocis list
Lists running ocis extensions
Usage: `ocis list [command options] [arguments...]`
### 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.
#### ocis konnectd
Start konnectd server
#### ocis storage-frontend
Start storage frontend
#### ocis accounts
Start accounts server
#### ocis storage-storage-root
Start storage root storage
#### ocis storage-gateway
Start storage gateway
#### ocis storage-storage-home
Start storage storage service for home mount
#### ocis storage-storage-public-link
Start storage public link storage
#### ocis store
Start a go-micro store
#### ocis glauth
Start glauth server
#### ocis storage-auth-bearer
Start storage auth-bearer service
#### ocis storage-sharing
Start storage sharing service
#### ocis webdav
Start webdav server
#### ocis storage-storage-oc-data
Start storage storage data provider for oc mount
#### ocis thumbnails
Start thumbnails server
#### ocis proxy
Start proxy server
#### ocis settings
Start settings server
#### ocis storage-auth-basic
Start storage auth-basic service
#### ocis storage-storage-metadata
Start storage storage service for metadata mount
#### ocis ocs
Start ocs server
#### ocis storage-storage-eos
Start storage storage service for eos mount
#### ocis storage-storage-eos-data
Start storage storage data provider for eos mount
#### ocis storage-storage-home-data
Start storage storage data provider for home mount
#### ocis storage-storage-oc
Start storage storage service for oc mount
#### ocis storage-users
Start storage users service
#### ocis phoenix
Start phoenix server

View File

@@ -49,34 +49,59 @@ uid=20000(einstein) gid=30000(users) groups=30000(users),30001(sailing-lovers),3
If the user is not found at first you might need to wait a few more minutes in case the ocis container is still compiling.
{{< /hint >}}
We also need to restart the storage-users service, so it picks up the changed environment. Without a restart it is not able to resolve users from LDAP.
We also need to restart the storage-userprovider service, so it picks up the changed environment. Without a restart it is not able to resolve users from LDAP.
```
docker-compose exec ocis ./bin/ocis kill storage-users
docker-compose exec ocis ./bin/ocis run storage-users
docker-compose exec ocis ./bin/ocis kill storage-userprovider
docker-compose exec ocis ./bin/ocis run storage-userprovider
```
### 3. Home storage
Kill the home storage. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:
Kill the home storage. By default it uses the `ocis` storage driver. We need to switch it to the `eoshome` driver:
```
docker-compose exec ocis ./bin/ocis kill storage-storage-home
docker-compose exec -e STORAGE_STORAGE_HOME_DRIVER=eoshome -e STORAGE_STORAGE_HOME_MOUNT_ID=1284d238-aa92-42ce-bdc4-0b0000009158 ocis ./bin/ocis run storage-storage-home
docker-compose exec ocis ./bin/ocis kill storage-home
docker-compose exec -e STORAGE_HOME_DRIVER=eoshome ocis ./bin/ocis run storage-home
```
### 4. Home data provider
### 4. Users storage
Kill the home data provider. By default it uses the `owncloud` storage driver. We need to switch it to the `eoshome` driver and make it use the storage id of the eos storage provider:
Kill the users storage. By default it uses the `ocis` storage driver. We need to switch it to the `eos` driver:
```
docker-compose exec ocis ./bin/ocis kill storage-storage-home-data
docker-compose exec -e STORAGE_STORAGE_HOME_DATA_DRIVER=eoshome ocis ./bin/ocis run storage-storage-home-data
docker-compose exec ocis ./bin/ocis kill storage-users
docker-compose exec -e STORAGE_USERS_DRIVER=eos ocis ./bin/ocis run storage-users
```
### 5. Metadata storage
First we need to create the metadata root in eos and set an owner:
```
docker-compose exec ocis eos mkdir -p /eos/dockertest/ocis/metadata
docker-compose exec ocis eos chown 2:2 /eos/dockertest/ocis/metadata
```
{{< hint info >}}
The difference between the *home storage* and the *home data provider* are that the former is responsible for metadata changes while the latter is responsible for actual data transfer. The *home storage* uses the cs3 api to manage a folder hierarchy, while the *home data provider* is responsible for moving bytes to and from the storage.
The uid and gid `2` are referencing the user `daemon` inside the ocis container. That user is also configured when restarting the accounts service later. For production systems you should create a dedicated user for the metadata storage.
{{< /hint >}}
Kill the metadata storage. By default it uses the `ocis` storage driver. We need to switch it to the `eos` driver:
```
docker-compose exec ocis ./bin/ocis kill storage-metadata
docker-compose exec -e STORAGE_METADATA_DRIVER=eos -e STORAGE_METADATA_ROOT=/eos/dockertest/ocis/metadata ocis ./bin/ocis run storage-metadata
```
### 6. Accounts service
Kill the accounts service. By default it uses the `ocis` storage driver. We need to switch it to the `eos` driver:
```
docker-compose exec ocis ./bin/ocis kill accounts
docker-compose exec -e ACCOUNTS_SERVICE_USER_USERNAME=daemon -e ACCOUNTS_SERVICE_USER_UID=2 -e ACCOUNTS_SERVICE_USER_GID=2 ocis ./bin/ocis run accounts
```
## Verification
Login with `einstein / relativity`, upload a file to einsteins home and verify the file is there using
@@ -199,7 +224,7 @@ The ocis logs can be accessed using `docker-compose logs ocis`. Add `-f` for fol
1. `docker-compose exec ocis make clean build` to update the binary
2. `docker-compose exec ocis ./bin/ocis kill <service>` to kill the service
3. `docker-compose exec ocis ./bin/ocis run <service>` to start the service. Do not forget to set any env vars, eg.
`docker-compose exec -e STORAGE_STORAGE_EOS_LAYOUT="{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}" -e STORAGE_STORAGE_HOME_DRIVER=eoshome ocis ./bin/ocis run storage-storage-home`
`docker-compose exec -e STORAGE_HOME_DRIVER=eoshome -e STORAGE_DRIVER_EOS_LAYOUT="{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}" ocis ./bin/ocis run storage-home`
### Creation and upload of files does not work

View File

@@ -47,13 +47,13 @@ services:
STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200
# TODO make id the default in ocis-storage
STORAGE_STORAGE_EOS_LAYOUT: "{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}"
STORAGE_DRIVER_EOS_LAYOUT: "{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}"
STORAGE_FRONTEND_URL: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_DATAGATEWAY_URL: https://${OCIS_DOMAIN:-localhost}:9200/data
# common eos settings used for both drivers: eos and eoshome
STORAGE_STORAGE_EOS_MASTER_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
STORAGE_STORAGE_EOS_SLAVE_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
STORAGE_STORAGE_EOS_NAMESPACE: "/eos/dockertest/reva/users"
STORAGE_DRIVER_EOS_MASTER_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
STORAGE_DRIVER_EOS_SLAVE_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}
STORAGE_DRIVER_EOS_NAMESPACE: "/eos/dockertest/reva/users"
# the eos end xrdcopy binaries use this env var to find the eos mgm
EOS_MGM_URL: ${EOS_MGM_URL:-root://mgm-master.testnet:1094}

View File

@@ -15,118 +15,118 @@ func DriverEOSWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-eos-namespace",
Value: "/eos/dockertest/reva",
Usage: "Namespace for metadata operations",
EnvVars: []string{"STORAGE_STORAGE_EOS_NAMESPACE"},
EnvVars: []string{"STORAGE_DRIVER_EOS_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.Root,
},
&cli.StringFlag{
Name: "storage-eos-shadow-namespace",
// Defaults to path.Join(c.Namespace, ".shadow")
Usage: "Shadow namespace where share references are stored",
EnvVars: []string{"STORAGE_STORAGE_EOS_SHADOW_NAMESPACE"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SHADOW_NAMESPACE"},
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
},
&cli.StringFlag{
Name: "storage-eos-share-folder",
Value: "/Shares",
Usage: "name of the share folder",
EnvVars: []string{"STORAGE_STORAGE_EOS_SHARE_FOLDER"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
},
&cli.StringFlag{
Name: "storage-eos-binary",
Value: "/usr/bin/eos",
Usage: "Location of the eos binary",
EnvVars: []string{"STORAGE_STORAGE_EOS_BINARY"},
EnvVars: []string{"STORAGE_DRIVER_EOS_BINARY"},
Destination: &cfg.Reva.Storages.EOS.EosBinary,
},
&cli.StringFlag{
Name: "storage-eos-xrdcopy-binary",
Value: "/usr/bin/xrdcopy",
Usage: "Location of the xrdcopy binary",
EnvVars: []string{"STORAGE_STORAGE_EOS_XRDCOPY_BINARY"},
EnvVars: []string{"STORAGE_DRIVER_EOS_XRDCOPY_BINARY"},
Destination: &cfg.Reva.Storages.EOS.XrdcopyBinary,
},
&cli.StringFlag{
Name: "storage-eos-master-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Master EOS MGM",
EnvVars: []string{"STORAGE_STORAGE_EOS_MASTER_URL"},
EnvVars: []string{"STORAGE_DRIVER_EOS_MASTER_URL"},
Destination: &cfg.Reva.Storages.EOS.MasterURL,
},
&cli.StringFlag{
Name: "storage-eos-slave-url",
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
Usage: "URL of the Slave EOS MGM",
EnvVars: []string{"STORAGE_STORAGE_EOS_SLAVE_URL"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SLAVE_URL"},
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
},
&cli.StringFlag{
Name: "storage-eos-cache-directory",
Value: os.TempDir(),
Usage: "Location on the local fs where to store reads",
EnvVars: []string{"STORAGE_STORAGE_EOS_CACHE_DIRECTORY"},
EnvVars: []string{"STORAGE_DRIVER_EOS_CACHE_DIRECTORY"},
Destination: &cfg.Reva.Storages.EOS.CacheDirectory,
},
&cli.BoolFlag{
Name: "storage-eos-enable-logging",
Usage: "Enables logging of the commands executed",
EnvVars: []string{"STORAGE_STORAGE_EOS_ENABLE_LOGGING"},
EnvVars: []string{"STORAGE_DRIVER_EOS_ENABLE_LOGGING"},
Destination: &cfg.Reva.Storages.EOS.EnableLogging,
},
&cli.BoolFlag{
Name: "storage-eos-show-hidden-sysfiles",
Usage: "show internal EOS files like .sys.v# and .sys.a# files.",
EnvVars: []string{"STORAGE_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SHOW_HIDDEN_SYSFILES"},
Destination: &cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
},
&cli.BoolFlag{
Name: "storage-eos-force-singleuser-mode",
Usage: "force connections to EOS to use SingleUsername",
EnvVars: []string{"STORAGE_STORAGE_EOS_FORCE_SINGLEUSER_MODE"},
EnvVars: []string{"STORAGE_DRIVER_EOS_FORCE_SINGLEUSER_MODE"},
Destination: &cfg.Reva.Storages.EOS.ForceSingleUserMode,
},
&cli.BoolFlag{
Name: "storage-eos-use-keytab",
Usage: "authenticate requests by using an EOS keytab",
EnvVars: []string{"STORAGE_STORAGE_EOS_USE_KEYTAB"},
EnvVars: []string{"STORAGE_DRIVER_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"STORAGE_STORAGE_EOS_ENABLE_HOME"},
EnvVars: []string{"STORAGE_DRIVER_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Usage: "the xrootd security protocol to use between the server and EOS",
EnvVars: []string{"STORAGE_STORAGE_EOS_SEC_PROTOCOL"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SEC_PROTOCOL"},
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
},
&cli.StringFlag{
Name: "storage-eos-keytab",
Usage: "the location of the keytab to use to authenticate to EOS",
EnvVars: []string{"STORAGE_STORAGE_EOS_KEYTAB"},
EnvVars: []string{"STORAGE_DRIVER_EOS_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.Keytab,
},
&cli.StringFlag{
Name: "storage-eos-single-username",
Usage: "the username to use when SingleUserMode is enabled",
EnvVars: []string{"STORAGE_STORAGE_EOS_SINGLE_USERNAME"},
EnvVars: []string{"STORAGE_DRIVER_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{substr 0 1 .Username}}/{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"STORAGE_STORAGE_EOS_LAYOUT"},
EnvVars: []string{"STORAGE_DRIVER_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.UserLayout,
},
&cli.StringFlag{
Name: "storage-eos-gatewaysvc",
Value: "localhost:9142",
Usage: "URL to use for the storage gateway service",
EnvVars: []string{"STORAGE_STORAGE_EOS_GATEWAYSVC"},
EnvVars: []string{"STORAGE_DRIVER_EOS_GATEWAYSVC"},
Destination: &cfg.Reva.Storages.EOS.GatewaySVC,
},
}

View File

@@ -12,7 +12,7 @@ func DriverLocalWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-local-root",
Value: "/var/tmp/ocis/local",
Usage: "the path to the local storage root",
EnvVars: []string{"STORAGE_STORAGE_LOCAL_ROOT"},
EnvVars: []string{"STORAGE_DRIVER_LOCAL_ROOT"},
Destination: &cfg.Reva.Storages.Local.Root,
},
}

View File

@@ -12,21 +12,21 @@ func DriverOCISWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-ocis-root",
Value: "/var/tmp/ocis/storage/users",
Usage: "the path to the local storage root",
EnvVars: []string{"STORAGE_STORAGE_OCIS_ROOT"},
EnvVars: []string{"STORAGE_DRIVER_OCIS_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
&cli.BoolFlag{
Name: "storage-ocis-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"STORAGE_STORAGE_OCIS_ENABLE_HOME"},
EnvVars: []string{"STORAGE_DRIVER_OCIS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.Common.EnableHome,
},
&cli.StringFlag{
Name: "storage-ocis-layout",
Value: "{{.Id.OpaqueId}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.Mail}}, {{.Id.OpaqueId}}, {{.Id.Idp}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"STORAGE_STORAGE_OCIS_LAYOUT"},
EnvVars: []string{"STORAGE_DRIVER_OCIS_LAYOUT"},
Destination: &cfg.Reva.Storages.Common.UserLayout,
},
}

View File

@@ -12,49 +12,49 @@ func DriverOwnCloudWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-owncloud-datadir",
Value: "/var/tmp/ocis/owncloud",
Usage: "the path to the owncloud data directory",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_DATADIR"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_DATADIR"},
Destination: &cfg.Reva.Storages.OwnCloud.Root,
},
&cli.StringFlag{
Name: "storage-owncloud-uploadinfo-dir",
Value: "/var/tmp/ocis/uploadinfo",
Usage: "the path to the tus upload info directory",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_UPLOADINFO_DIR"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_UPLOADINFO_DIR"},
Destination: &cfg.Reva.Storages.OwnCloud.UploadInfoDir,
},
&cli.StringFlag{
Name: "storage-owncloud-share-folder",
Value: "/Shares",
Usage: "name of the shares folder",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_SHARE_FOLDER"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_SHARE_FOLDER"},
Destination: &cfg.Reva.Storages.OwnCloud.ShareFolder,
},
&cli.BoolFlag{
Name: "storage-owncloud-scan",
Value: true,
Usage: "scan files on startup to add fileids",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_SCAN"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
Usage: "the address of the redis server",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.BoolFlag{
Name: "storage-owncloud-enable-home",
Value: false,
Usage: "enable the creation of home storages",
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_ENABLE_HOME"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Id.OpaqueId}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.Mail}}, {{.Id.OpaqueId}}, {{.Id.Idp}} also supports prefixing dirs: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_LAYOUT"},
EnvVars: []string{"STORAGE_DRIVER_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.UserLayout,
},
}

View File

@@ -174,21 +174,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-home-endpoint",
Value: "localhost:9154",
Usage: "endpoint to use for the home storage",
EnvVars: []string{"STORAGE_STORAGE_HOME_ENDPOINT"},
EnvVars: []string{"STORAGE_HOME_ENDPOINT"},
Destination: &cfg.Reva.StorageHome.Endpoint,
},
&cli.StringFlag{
Name: "storage-home-mount-path",
Value: "/home",
Usage: "mount path",
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_PATH"},
EnvVars: []string{"STORAGE_HOME_MOUNT_PATH"},
Destination: &cfg.Reva.StorageHome.MountPath,
},
&cli.StringFlag{
Name: "storage-home-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009154",
Usage: "mount id",
EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"},
EnvVars: []string{"STORAGE_HOME_MOUNT_ID"},
Destination: &cfg.Reva.StorageHome.MountID,
},
@@ -222,14 +222,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "public-link-endpoint",
Value: "localhost:9178",
Usage: "endpoint to use for the public links service",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ENDPOINT"},
EnvVars: []string{"STORAGE_PUBLIC_LINK_ENDPOINT"},
Destination: &cfg.Reva.StoragePublicLink.Endpoint,
},
&cli.StringFlag{
Name: "storage-public-link-mount-path",
Value: "/public",
Usage: "mount path",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
EnvVars: []string{"STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,
},
// public-link has no mount id

View File

@@ -93,10 +93,10 @@ Usage: `storage {{ $c.Name }} [command options] [arguments...]`
You can set different storage drivers for the Storage Providers. Please check the storage provider configuration.
Example: Set the home Storage Provider to `ocis`
Example: Set the home and users Storage Provider to `ocis`
`STORAGE_STORAGE_HOME_DRIVER=ocis`
`STORAGE_STORAGE_HOME_DATA_DRIVER=ocis`
`STORAGE_HOME_DRIVER=ocis`
`STORAGE_USERS_DRIVER=ocis`
### Local Driver