diff --git a/.drone.star b/.drone.star index 14088f4205..998d3a6338 100644 --- a/.drone.star +++ b/.drone.star @@ -5,7 +5,7 @@ config = { 'konnectd':'', 'ocis-phoenix':'', 'ocis-pkg':'', - 'ocis-reva':'', + 'storage':'', 'ocs':'', 'proxy':'', 'settings':'frontend', @@ -122,7 +122,7 @@ def main(ctx): pipelines['depends_on'] = [] else: pipelines = before + stages + after - + return pipelines def testPipelines(ctx): @@ -327,8 +327,8 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo 'pull': 'always', 'environment' : { 'TEST_SERVER_URL': 'https://ocis-server:9200', - 'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/reva/' if storage == 'owncloud' else ''), - 'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/reva/data/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/root/nodes/root/*'), + 'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/ocis/owncloud/' if storage == 'owncloud' else ''), + 'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/ocis/owncloud/data/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/*'), 'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton', 'TEST_OCIS':'true', 'BEHAT_FILTER_TAGS': '~@skipOnOcis-%s-Storage' % ('OC' if storage == 'owncloud' else 'OCIS'), @@ -380,8 +380,8 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n 'pull': 'always', 'environment' : { 'TEST_SERVER_URL': 'https://ocis-server:9200', - 'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/reva/' if storage == 'owncloud' else ''), - 'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/reva/data/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/root/nodes/root/*'), + 'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/ocis/owncloud/' if storage == 'owncloud' else ''), + 'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/ocis/owncloud/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/storage/users/nodes/root/*'), 'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton', 'TEST_OCIS':'true', 'BEHAT_FILTER_TAGS': '~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage', @@ -445,7 +445,7 @@ def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = '', stor 'SERVER_HOST': 'https://ocis-server:9200', 'BACKEND_HOST': 'https://ocis-server:9200', 'RUN_ON_OCIS': 'true', - 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva', + 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud', 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', 'PHOENIX_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json', 'TEST_TAGS': 'not @skipOnOCIS and not @skip', @@ -1156,22 +1156,22 @@ def ocisServer(storage): 'detach': True, 'environment' : { #'OCIS_LOG_LEVEL': 'debug', - 'REVA_STORAGE_HOME_DRIVER': '%s' % (storage), - 'REVA_STORAGE_HOME_DATA_DRIVER': '%s' % (storage), - 'REVA_STORAGE_OC_DRIVER': '%s' % (storage), - 'REVA_STORAGE_OC_DATA_DRIVER': '%s' % (storage), - 'REVA_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/', - 'REVA_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/root', - 'REVA_STORAGE_LOCAL_ROOT': '/srv/app/tmp/reva/root', - 'REVA_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/reva/data', - 'REVA_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/', - 'REVA_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379', - 'REVA_LDAP_IDP': 'https://ocis-server:9200', - 'REVA_OIDC_ISSUER': 'https://ocis-server:9200', + 'STORAGE_STORAGE_HOME_DRIVER': '%s' % (storage), + 'STORAGE_STORAGE_HOME_DATA_DRIVER': '%s' % (storage), + 'STORAGE_STORAGE_OC_DRIVER': '%s' % (storage), + 'STORAGE_STORAGE_OC_DATA_DRIVER': '%s' % (storage), + 'STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/', + '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_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/', + 'STORAGE_STORAGE_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', - 'REVA_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data', - 'REVA_DATAGATEWAY_URL': 'https://ocis-server:9200/data', - 'REVA_FRONTEND_URL': 'https://ocis-server:9200', + 'STORAGE_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data', + 'STORAGE_DATAGATEWAY_URL': 'https://ocis-server:9200/data', + 'STORAGE_FRONTEND_URL': 'https://ocis-server:9200', 'PHOENIX_WEB_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json', 'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/ocis/tests/config/drone/identifier-registration.yml', 'KONNECTD_ISS': 'https://ocis-server:9200', @@ -1180,8 +1180,8 @@ def ocisServer(storage): }, 'commands': [ 'apk add mailcap', # install /etc/mime.types - 'mkdir -p /srv/app/tmp/reva', - 'mkdir -p /srv/app/tmp/ocis/root/nodes', + 'mkdir -p /srv/app/tmp/ocis/owncloud/data/', + 'mkdir -p /srv/app/tmp/ocis/storage/users/', 'ocis/bin/ocis server' ], 'volumes': [ diff --git a/.gitignore b/.gitignore index fc765248fe..4d568dbd49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ */coverage.out -/ocis/bin -/ocis/dist +/**/config +/**/bin +/**/dist /hugo *.key *crt diff --git a/docs/extensions/ocis-reva/configuration.md b/docs/extensions/ocis-reva/configuration.md deleted file mode 100644 index a66cb1f5dc..0000000000 --- a/docs/extensions/ocis-reva/configuration.md +++ /dev/null @@ -1,656 +0,0 @@ ---- -title: "Configuration" -date: "2020-09-21T13:14:49+0200" -weight: 20 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs -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 - -Example service for Reva/oCIS - -Usage: `ocis-reva [global options] command [command options] [arguments...]` - ---config-file | $REVA_CONFIG_FILE -: Path to config file. - ---log-level | $REVA_LOG_LEVEL -: Set logging level. Default: `info`. - ---log-pretty | $REVA_LOG_PRETTY -: Enable pretty logging. - ---log-color | $REVA_LOG_COLOR -: Enable colored logging. - -## Sub Commands - -### ocis-reva auth-basic - -Start reva authprovider for basic auth - -Usage: `ocis-reva auth-basic [command options] [arguments...]` - ---debug-addr | $REVA_AUTH_BASIC_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9147`. - ---auth-driver | $REVA_AUTH_DRIVER -: auth driver: 'demo', 'json' or 'ldap'. Default: `ldap`. - ---auth-json | $REVA_AUTH_JSON -: Path to users.json file. - ---network | $REVA_AUTH_BASIC_NETWORK -: Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_AUTH_BASIC_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_AUTH_BASIC_ADDR -: Address to bind reva service. Default: `0.0.0.0:9146`. - ---url | $REVA_AUTH_BASIC_URL -: URL to use for the reva service. Default: `localhost:9146`. - -### ocis-reva frontend - -Start reva frontend service - -Usage: `ocis-reva frontend [command options] [arguments...]` - ---debug-addr | $REVA_FRONTEND_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9141`. - ---transfer-secret | $REVA_TRANSFER_SECRET -: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. - ---webdav-namespace | $WEBDAV_NAMESPACE -: Namespace prefix for the /webdav endpoint. Default: `/home/`. - ---dav-files-namespace | $DAV_FILES_NAMESPACE -: Namespace prefix for the webdav /dav/files endpoint. Default: `/oc/`. - ---network | $REVA_FRONTEND_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_FRONTEND_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. - ---addr | $REVA_FRONTEND_ADDR -: Address to bind reva service. Default: `0.0.0.0:9140`. - ---url | $REVA_FRONTEND_URL -: URL to use for the reva service. Default: `https://localhost:9200`. - ---datagateway-prefix | $REVA_FRONTEND_DATAGATEWAY_PREFIX -: datagateway prefix. Default: `data`. - ---ocdav-prefix | $REVA_FRONTEND_OCDAV_PREFIX -: owncloud webdav endpoint prefix. - ---ocs-prefix | $REVA_FRONTEND_OCS_PREFIX -: open collaboration services endpoint prefix. Default: `ocs`. - ---gateway-url | $REVA_GATEWAY_URL -: URL to use for the reva gateway service. Default: `localhost:9142`. - ---upload-disable-tus | $REVA_FRONTEND_UPLOAD_DISABLE_TUS -: Disables TUS upload mechanism. Default: `false`. - ---upload-http-method-override | $REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE -: Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH. - -### ocis-reva gateway - -Start reva gateway - -Usage: `ocis-reva gateway [command options] [arguments...]` - ---debug-addr | $REVA_GATEWAY_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9143`. - ---transfer-secret | $REVA_TRANSFER_SECRET -: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. - ---network | $REVA_GATEWAY_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_GATEWAY_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_GATEWAY_ADDR -: Address to bind reva service. Default: `0.0.0.0:9142`. - ---url | $REVA_GATEWAY_URL -: URL to use for the reva service. Default: `localhost:9142`. - ---commit-share-to-storage-grant | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT -: Commit shares to the share manager. Default: `true`. - ---commit-share-to-storage-ref | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF -: Commit shares to the storage. Default: `true`. - ---share-folder | $REVA_GATEWAY_SHARE_FOLDER -: mount shares in this folder of the home storage provider. Default: `Shares`. - ---disable-home-creation-on-login | $REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN -: Disable creation of home folder on login. - ---storage-registry-driver | $REVA_STORAGE_REGISTRY_DRIVER -: driver of the storage registry. Default: `static`. - ---storage-home-provider | $REVA_STORAGE_HOME_PROVIDER -: mount point of the storage provider for user homes in the global namespace. Default: `/home`. - ---frontend-url | $REVA_FRONTEND_URL -: URL to use for the reva service. Default: `https://localhost:9200`. - ---datagateway-url | $REVA_DATAGATEWAY_URL -: URL to use for the reva datagateway. Default: `https://localhost:9200/data`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - ---auth-basic-url | $REVA_AUTH_BASIC_URL -: URL to use for the reva service. Default: `localhost:9146`. - ---auth-bearer-url | $REVA_AUTH_BEARER_URL -: URL to use for the reva service. Default: `localhost:9148`. - ---sharing-url | $REVA_SHARING_URL -: URL to use for the reva service. Default: `localhost:9150`. - ---storage-root-url | $REVA_STORAGE_ROOT_URL -: URL to use for the reva service. Default: `localhost:9152`. - ---storage-root-mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH -: mount path. Default: `/`. - ---storage-root-mount-id | $REVA_STORAGE_ROOT_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009152`. - ---storage-home-url | $REVA_STORAGE_HOME_URL -: URL to use for the reva service. Default: `localhost:9154`. - ---storage-home-mount-path | $REVA_STORAGE_HOME_MOUNT_PATH -: mount path. Default: `/home`. - ---storage-home-mount-id | $REVA_STORAGE_HOME_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009154`. - ---storage-eos-url | $REVA_STORAGE_EOS_URL -: URL to use for the reva service. Default: `localhost:9158`. - ---storage-eos-mount-path | $REVA_STORAGE_EOS_MOUNT_PATH -: mount path. Default: `/eos`. - ---storage-eos-mount-id | $REVA_STORAGE_EOS_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. - ---storage-oc-url | $REVA_STORAGE_OC_URL -: URL to use for the reva service. Default: `localhost:9162`. - ---storage-oc-mount-path | $REVA_STORAGE_OC_MOUNT_PATH -: mount path. Default: `/oc`. - ---storage-oc-mount-id | $REVA_STORAGE_OC_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. - ---public-link-url | $REVA_STORAGE_PUBLIC_LINK_URL -: URL to use for the public links service. Default: `localhost:9178`. - ---storage-public-link-mount-path | $REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH -: mount path. Default: `/public/`. - -### ocis-reva sharing - -Start reva sharing service - -Usage: `ocis-reva sharing [command options] [arguments...]` - ---debug-addr | $REVA_SHARING_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9151`. - ---network | $REVA_SHARING_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_SHARING_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_SHARING_ADDR -: Address to bind reva service. Default: `0.0.0.0:9150`. - ---url | $REVA_SHARING_URL -: URL to use for the reva service. Default: `localhost:9150`. - ---user-driver | $REVA_SHARING_USER_DRIVER -: driver to use for the UserShareProvider. Default: `json`. - ---user-json-file | $REVA_SHARING_USER_JSON_FILE -: file used to persist shares for the UserShareProvider. Default: `/var/tmp/reva/shares.json`. - ---public-driver | $REVA_SHARING_PUBLIC_DRIVER -: driver to use for the PublicShareProvider. Default: `json`. - -### ocis-reva storage-home-data - -Start reva storage-home-data service - -Usage: `ocis-reva storage-home-data [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_HOME_DATA_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9157`. - ---network | $REVA_STORAGE_HOME_DATA_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_HOME_DATA_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. - ---addr | $REVA_STORAGE_HOME_DATA_ADDR -: Address to bind reva service. Default: `0.0.0.0:9156`. - ---url | $REVA_STORAGE_HOME_DATA_URL -: URL to use for the reva service. Default: `localhost:9156`. - ---driver | $REVA_STORAGE_HOME_DATA_DRIVER -: storage driver for home data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. - ---prefix | $REVA_STORAGE_HOME_DATA_PREFIX -: prefix for the http endpoint, without leading slash. Default: `data`. - ---temp-folder | $REVA_STORAGE_HOME_DATA_TEMP_FOLDER -: temp folder. Default: `/var/tmp/`. - ---enable-home | $REVA_STORAGE_HOME_ENABLE_HOME -: enable the creation of home directories. Default: `true`. - ---gateway-url | $REVA_GATEWAY_URL -: URL to use for the reva gateway service. Default: `localhost:9142`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - -### ocis-reva health - -Check health status - -Usage: `ocis-reva health [command options] [arguments...]` - ---debug-addr | $REVA_DEBUG_ADDR -: Address to debug endpoint. Default: `0.0.0.0:9109`. - -### ocis-reva storage-home - -Start reva storage-home service - -Usage: `ocis-reva storage-home [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_HOME_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9155`. - ---network | $REVA_STORAGE_HOME_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_HOME_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_STORAGE_HOME_ADDR -: Address to bind reva service. Default: `0.0.0.0:9154`. - ---url | $REVA_STORAGE_HOME_URL -: URL to use for the reva service. Default: `localhost:9154`. - ---driver | $REVA_STORAGE_HOME_DRIVER -: storage driver for home mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. - ---mount-path | $REVA_STORAGE_HOME_MOUNT_PATH -: mount path. Default: `/home`. - ---mount-id | $REVA_STORAGE_HOME_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. - ---expose-data-server | $REVA_STORAGE_HOME_EXPOSE_DATA_SERVER -: exposes a dedicated data server. Default: `false`. - ---data-server-url | $REVA_STORAGE_HOME_DATA_SERVER_URL -: data server url. Default: `http://localhost:9156/data`. - ---enable-home | $REVA_STORAGE_HOME_ENABLE_HOME -: enable the creation of home directories. Default: `true`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - -### ocis-reva storage-eos-data - -Start reva storage-eos-data service - -Usage: `ocis-reva storage-eos-data [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9161`. - ---network | $REVA_STORAGE_EOS_DATA_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_EOS_DATA_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. - ---addr | $REVA_STORAGE_EOS_DATA_ADDR -: Address to bind reva service. Default: `0.0.0.0:9160`. - ---url | $REVA_STORAGE_EOS_DATA_URL -: URL to use for the reva service. Default: `localhost:9160`. - ---driver | $REVA_STORAGE_EOS_DATA_DRIVER -: storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`. - ---prefix | $REVA_STORAGE_EOS_DATA_PREFIX -: prefix for the http endpoint, without leading slash. Default: `data`. - ---temp-folder | $REVA_STORAGE_EOS_DATA_TEMP_FOLDER -: temp folder. Default: `/var/tmp/`. - ---gateway-url | $REVA_GATEWAY_URL -: URL to use for the reva gateway service. Default: `localhost:9142`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - -### ocis-reva reva-storage-public-link - -Start reva storage-public-link service - -Usage: `ocis-reva reva-storage-public-link [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_PUBLIC_LINK_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9179`. - ---network | $REVA_STORAGE_PUBLIC_LINK_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_PUBLIC_LINK_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_STORAGE_PUBLIC_LINK_ADDR -: Address to bind reva service. Default: `0.0.0.0:9178`. - ---url | $REVA_STORAGE_PUBLIC_LINK_URL -: Address to bind reva service. Default: `localhost:9178`. - ---mount-path | $REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH -: mount path. Default: `/public/`. - ---gateway-url | $REVA_GATEWAY_URL -: URL to use for the reva gateway service. Default: `localhost:9142`. - -### ocis-reva users - -Start reva users service - -Usage: `ocis-reva users [command options] [arguments...]` - ---debug-addr | $REVA_SHARING_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9145`. - ---network | $REVA_USERS_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_USERS_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_USERS_ADDR -: Address to bind reva service. Default: `0.0.0.0:9144`. - ---url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - ---driver | $REVA_USERS_DRIVER -: user driver: 'demo', 'json', 'ldap', or 'rest'. Default: `ldap`. - ---json-config | $REVA_USERS_JSON -: Path to users.json file. - ---rest-client-id | $REVA_REST_CLIENT_ID -: User rest driver Client ID. - ---rest-client-secret | $REVA_REST_CLIENT_SECRET -: User rest driver Client Secret. - ---rest-redis-address | $REVA_REST_REDIS_ADDRESS -: Address for redis server. Default: `localhost:6379`. - ---rest-redis-username | $REVA_REST_REDIS_USERNAME -: Username for redis server. - ---rest-redis-password | $REVA_REST_REDIS_PASSWORD -: Password for redis server. - ---rest-id-provider | $REVA_REST_ID_PROVIDER -: The OIDC Provider. - ---rest-api-base-url | $REVA_REST_API_BASE_URL -: Base API Endpoint. - ---rest-oidc-token-endpoint | $REVA_REST_OIDC_TOKEN_ENDPOINT -: Endpoint to generate token to access the API. - ---rest-target-api | $REVA_REST_TARGET_API -: The target application. - -### ocis-reva auth-bearer - -Start reva authprovider for bearer auth - -Usage: `ocis-reva auth-bearer [command options] [arguments...]` - ---debug-addr | $REVA_AUTH_BEARER_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9149`. - ---oidc-issuer | $REVA_OIDC_ISSUER -: OIDC issuer. Default: `https://localhost:9200`. - ---oidc-insecure | $REVA_OIDC_INSECURE -: OIDC allow insecure communication. Default: `true`. - ---oidc-id-claim | $REVA_OIDC_ID_CLAIM -: OIDC id claim. Default: `preferred_username`. - ---oidc-uid-claim | $REVA_OIDC_UID_CLAIM -: OIDC uid claim. - ---oidc-gid-claim | $REVA_OIDC_GID_CLAIM -: OIDC gid claim. - ---network | $REVA_AUTH_BEARER_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_AUTH_BEARER_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_AUTH_BEARER_ADDR -: Address to bind reva service. Default: `0.0.0.0:9148`. - ---url | $REVA_AUTH_BEARER_URL -: URL to use for the reva service. Default: `localhost:9148`. - -### ocis-reva storage-eos - -Start reva storage-eos service - -Usage: `ocis-reva storage-eos [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_EOS_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9159`. - ---network | $REVA_STORAGE_EOS_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_EOS_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_STORAGE_EOS_ADDR -: Address to bind reva service. Default: `0.0.0.0:9158`. - ---url | $REVA_STORAGE_EOS_URL -: URL to use for the reva service. Default: `localhost:9158`. - ---driver | $REVA_STORAGE_EOS_DRIVER -: storage driver for eos mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`. - ---mount-path | $REVA_STORAGE_EOS_MOUNT_PATH -: mount path. Default: `/eos`. - ---mount-id | $REVA_STORAGE_EOS_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. - ---expose-data-server | $REVA_STORAGE_EOS_EXPOSE_DATA_SERVER -: exposes a dedicated data server. Default: `false`. - ---data-server-url | $REVA_STORAGE_EOS_DATA_SERVER_URL -: data server url. Default: `http://localhost:9160/data`. - -### ocis-reva storage-oc - -Start reva storage-oc service - -Usage: `ocis-reva storage-oc [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_OC_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9163`. - ---network | $REVA_STORAGE_OC_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_OC_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_STORAGE_OC_ADDR -: Address to bind reva service. Default: `0.0.0.0:9162`. - ---url | $REVA_STORAGE_OC_URL -: URL to use for the reva service. Default: `localhost:9162`. - ---driver | $REVA_STORAGE_OC_DRIVER -: storage driver for oc mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. - ---mount-path | $REVA_STORAGE_OC_MOUNT_PATH -: mount path. Default: `/oc`. - ---mount-id | $REVA_STORAGE_OC_MOUNT_ID -: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. - ---expose-data-server | $REVA_STORAGE_OC_EXPOSE_DATA_SERVER -: exposes a dedicated data server. Default: `false`. - ---data-server-url | $REVA_STORAGE_OC_DATA_SERVER_URL -: data server url. Default: `http://localhost:9164/data`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - -### ocis-reva storage-oc-data - -Start reva storage-oc-data service - -Usage: `ocis-reva storage-oc-data [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9165`. - ---network | $REVA_STORAGE_OC_DATA_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_OC_DATA_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `http`. - ---addr | $REVA_STORAGE_OC_DATA_ADDR -: Address to bind reva service. Default: `0.0.0.0:9164`. - ---url | $REVA_STORAGE_OC_DATA_URL -: URL to use for the reva service. Default: `localhost:9164`. - ---driver | $REVA_STORAGE_OC_DATA_DRIVER -: storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. - ---prefix | $REVA_STORAGE_OC_DATA_PREFIX -: prefix for the http endpoint, without leading slash. Default: `data`. - ---temp-folder | $REVA_STORAGE_OC_DATA_TEMP_FOLDER -: temp folder. Default: `/var/tmp/`. - ---gateway-url | $REVA_GATEWAY_URL -: URL to use for the reva gateway service. Default: `localhost:9142`. - ---users-url | $REVA_USERS_URL -: URL to use for the reva service. Default: `localhost:9144`. - -### ocis-reva storage-root - -Start reva storage-root service - -Usage: `ocis-reva storage-root [command options] [arguments...]` - ---debug-addr | $REVA_STORAGE_ROOT_DEBUG_ADDR -: Address to bind debug server. Default: `0.0.0.0:9153`. - ---network | $REVA_STORAGE_ROOT_NETWORK -: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. - ---protocol | $REVA_STORAGE_ROOT_PROTOCOL -: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`. - ---addr | $REVA_STORAGE_ROOT_ADDR -: Address to bind reva service. Default: `0.0.0.0:9152`. - ---url | $REVA_STORAGE_ROOT_URL -: URL to use for the reva service. Default: `localhost:9152`. - ---driver | $REVA_STORAGE_ROOT_DRIVER -: storage driver for root mount: eg. local, eos, owncloud, ocis or s3. Default: `local`. - ---mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH -: mount path. Default: `/`. - ---mount-id | $REVA_STORAGE_ROOT_MOUNT_ID -: mount id. Default: `123e4567-e89b-12d3-a456-426655440001`. - ---expose-data-server | $REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER -: exposes a dedicated data server. - ---data-server-url | $REVA_STORAGE_ROOT_DATA_SERVER_URL -: data server url. - diff --git a/docs/extensions/ocis-reva/getting-started.md b/docs/extensions/ocis-reva/getting-started.md deleted file mode 100644 index e7140676e0..0000000000 --- a/docs/extensions/ocis-reva/getting-started.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "Getting Started" -date: 2018-05-02T00:00:00+00:00 -weight: 15 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs -geekdocFilePath: getting-started.md ---- - -{{< toc >}} - -## Installation - -So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. - -### Docker - -Docker images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-reva. - -The `latest` tag always reflects the current master branch. - -```console -docker pull owncloud/ocis-reva -``` - -#### Dependencies - -- Running ocis-reva currently needs a working Redis caching server -- The default storage location in the container is `/var/tmp/reva/data`. You may want to create a volume to persist the files in the primary storage - -### Binaries - -The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-reva/ . Specific releases are organized in separate folders. They are in sync which every release tag on GitHub. The binaries from the current master branch can be found in https://download.owncloud.com/ocis/ocis-reva/testing/ - -```console -curl https://download.owncloud.com/ocis/ocis/1.0.0-beta1/ocis-reva-1.0.0-beta1-darwin-amd64 --output ocis-reva -chmod +x ocis -./ocis-reva sharing -``` - -#### Dependencies - -- Running ocis currently needs a working Redis caching server -- The default promary storage location is `/var/tmp/reva/data`. You can change that value by configuration. - -## Usage - -The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-reva --help`. - -### Health - -The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes. - -{{< highlight txt >}} -ocis-reva health --help -{{< / highlight >}} diff --git a/docs/extensions/ocis-reva/releasing.md b/docs/extensions/ocis-reva/releasing.md deleted file mode 100644 index b233ca59c6..0000000000 --- a/docs/extensions/ocis-reva/releasing.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Releasing" -date: 2020-05-22T00:00:00+00:00 -weight: 60 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs -geekdocFilePath: releasing.md ---- - -{{< toc >}} - -To release a new version of ocis-reva, you have to follow a few simple steps. - -## Preparation - -1. Before releasing, make sure that reva has been [updated to the desired version]({{< ref "updating.md" >}}) -2. Create a new branch e.g. `release-x.x.x` where `x.x.x` is the version you want to release. -3. Checkout the preparation branch. -4. Create a new changelog folder and move the unreleased snippets there. -{{< highlight txt >}} -mkdir changelog/x.x.x_yyyy-MM-dd/ # yyyy-MM-dd is the current date -mv changelog/unreleased/* changelog/x.x.x_yyyy-MM-dd/ -{{< / highlight >}} -5. Commit and push the changes -{{< highlight txt >}} -git add --all -git commit -m "prepare release x.x.x" -git push origin release-x.x.x -{{< / highlight >}} -6. Create a pull request to the master branch. - -## Release -1. After the preparation branch has been merged update your local master. -2. [Wait for CI](https://cloud.drone.io/owncloud/ocis-reva) to generate a commit for the changelog update -3. Check out master (or make sure to check out the generated changelog commit in case of subsequent merges) -{{< highlight txt >}} -git checkout master -git pull origin master -{{< / highlight >}} -4. Create a new tag (preferably signed) and replace the version number accordingly. -{{< highlight txt >}} -git tag -s vx.x.x -m "release vx.x.x" -git push origin vx.x.x -{{< / highlight >}} -5. Wait for CI and check that the GitHub release was published. - -Congratulations, you just released ocis-reva! diff --git a/docs/extensions/ocis-reva/users.md b/docs/extensions/ocis-reva/users.md deleted file mode 100644 index 475c21290f..0000000000 --- a/docs/extensions/ocis-reva/users.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Users" -date: 2020-01-16T00:00:00+00:00 -weight: 35 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs -geekdocFilePath: users.md ---- - -### Demo driver - -This is a simple user driver for testing. It contains three users: -``` -einstein:relativity -marie:radioactivty -richard:superfluidity -``` -In order to use the `demo` driver you need to export the relevant environment variable: -``` -export REVA_USERS_DRIVER=demo -``` - -### JSON driver - -In order to switch from the `ldap` driver to JSON based users you need to export the relevant environment variables: -``` -export REVA_USERS_DRIVER=json -export REVA_USERS_JSON=/path/to/users.json -``` - -For the format of the users.json have a look at the [reva examples](https://github.com/cs3org/reva/blob/master/examples/separate/users.demo.json) - -### LDAP driver - -This is the default user driver. - -If the below defaults don't match your environment change them accordingly: -``` -export REVA_LDAP_HOSTNAME=localhost -export REVA_LDAP_PORT=9126 -export REVA_LDAP_BASE_DN='dc=example,dc=org' -export REVA_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))' -export REVA_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))' -export REVA_LDAP_BIND_DN='cn=reva,ou=sysusers,dc=example,dc=org' -export REVA_LDAP_BIND_PASSWORD=reva -export REVA_LDAP_SCHEMA_UID=uid -export REVA_LDAP_SCHEMA_MAIL=mail -export REVA_LDAP_SCHEMA_DISPLAYNAME=sn -export REVA_LDAP_SCHEMA_CN=cn -``` - -Then restart the `bin/ocis-reva users` and `bin/ocis-reva auth-basic` services for the changes to take effect. diff --git a/docs/extensions/ocis-reva/_index.md b/docs/extensions/storage/_index.md similarity index 93% rename from docs/extensions/ocis-reva/_index.md rename to docs/extensions/storage/_index.md index ab942240c0..d0d0545b55 100644 --- a/docs/extensions/ocis-reva/_index.md +++ b/docs/extensions/storage/_index.md @@ -2,8 +2,8 @@ title: "Reva" date: 2018-05-02T00:00:00+00:00 weight: 10 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: _index.md --- diff --git a/docs/extensions/ocis-reva/building.md b/docs/extensions/storage/building.md similarity index 84% rename from docs/extensions/ocis-reva/building.md rename to docs/extensions/storage/building.md index cebab803f2..737937a068 100644 --- a/docs/extensions/ocis-reva/building.md +++ b/docs/extensions/storage/building.md @@ -2,16 +2,16 @@ title: "Building" date: 2018-05-02T00:00:00+00:00 weight: 30 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: building.md --- As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install).To build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources: {{< highlight txt >}} -git clone https://github.com/owncloud/ocis-reva.git -cd ocis-reva +git clone https://github.com/owncloud/ocis.git +cd ocis/storage {{< / highlight >}} All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. diff --git a/docs/extensions/storage/configuration.md b/docs/extensions/storage/configuration.md new file mode 100644 index 0000000000..f77e5bbacf --- /dev/null +++ b/docs/extensions/storage/configuration.md @@ -0,0 +1,704 @@ +--- +title: "Configuration" +date: "2020-10-05T21:57:18+0200" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage +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 + +Storage service for oCIS + +Usage: `storage [global options] command [command options] [arguments...]` + +--config-file | $STORAGE_CONFIG_FILE +: Path to config file. + +--log-level | $STORAGE_LOG_LEVEL +: Set logging level. Default: `info`. + +--log-pretty | $STORAGE_LOG_PRETTY +: Enable pretty logging. + +--log-color | $STORAGE_LOG_COLOR +: Enable colored logging. + +## Sub Commands + +### storage sharing + +Start sharing service + +Usage: `storage sharing [command options] [arguments...]` + +--debug-addr | $STORAGE_SHARING_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9151`. + +--network | $STORAGE_SHARING_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_SHARING_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_SHARING_ADDR +: Address to bind storage service. Default: `0.0.0.0:9150`. + +--url | $STORAGE_SHARING_URL +: URL to use for the storage service. Default: `localhost:9150`. + +--user-driver | $STORAGE_SHARING_USER_DRIVER +: driver to use for the UserShareProvider. Default: `json`. + +--user-json-file | $STORAGE_SHARING_USER_JSON_FILE +: file used to persist shares for the UserShareProvider. Default: `/var/tmp/ocis/shares.json`. + +--public-driver | $STORAGE_SHARING_PUBLIC_DRIVER +: driver to use for the PublicShareProvider. Default: `json`. + +### storage storage-eos + +Start storage-eos service + +Usage: `storage storage-eos [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_EOS_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9159`. + +--network | $STORAGE_STORAGE_EOS_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_EOS_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_STORAGE_EOS_ADDR +: Address to bind storage service. Default: `0.0.0.0:9158`. + +--url | $STORAGE_STORAGE_EOS_URL +: URL to use for the storage service. Default: `localhost:9158`. + +--driver | $STORAGE_STORAGE_EOS_DRIVER +: storage driver for eos mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`. + +--mount-path | $STORAGE_STORAGE_EOS_MOUNT_PATH +: mount path. Default: `/eos`. + +--mount-id | $STORAGE_STORAGE_EOS_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. + +--expose-data-server | $STORAGE_STORAGE_EOS_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `false`. + +--data-server-url | $STORAGE_STORAGE_EOS_DATA_SERVER_URL +: data server url. Default: `http://localhost:9160/data`. + +### storage users + +Start users service + +Usage: `storage users [command options] [arguments...]` + +--debug-addr | $STORAGE_SHARING_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9145`. + +--network | $STORAGE_USERS_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_USERS_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_USERS_ADDR +: Address to bind storage service. Default: `0.0.0.0:9144`. + +--url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +--driver | $STORAGE_USERS_DRIVER +: user driver: 'demo', 'json', 'ldap', or 'rest'. Default: `ldap`. + +--json-config | $STORAGE_USERS_JSON +: Path to users.json file. + +--rest-client-id | $STORAGE_REST_CLIENT_ID +: User rest driver Client ID. + +--rest-client-secret | $STORAGE_REST_CLIENT_SECRET +: User rest driver Client Secret. + +--rest-redis-address | $STORAGE_REST_REDIS_ADDRESS +: Address for redis server. Default: `localhost:6379`. + +--rest-redis-username | $STORAGE_REST_REDIS_USERNAME +: Username for redis server. + +--rest-redis-password | $STORAGE_REST_REDIS_PASSWORD +: Password for redis server. + +--rest-id-provider | $STORAGE_REST_ID_PROVIDER +: The OIDC Provider. + +--rest-api-base-url | $STORAGE_REST_API_BASE_URL +: Base API Endpoint. + +--rest-oidc-token-endpoint | $STORAGE_REST_OIDC_TOKEN_ENDPOINT +: Endpoint to generate token to access the API. + +--rest-target-api | $STORAGE_REST_TARGET_API +: The target application. + +### storage gateway + +Start gateway + +Usage: `storage gateway [command options] [arguments...]` + +--debug-addr | $STORAGE_GATEWAY_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9143`. + +--transfer-secret | $STORAGE_TRANSFER_SECRET +: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. + +--network | $STORAGE_GATEWAY_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_GATEWAY_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_GATEWAY_ADDR +: Address to bind storage service. Default: `0.0.0.0:9142`. + +--url | $STORAGE_GATEWAY_URL +: URL to use for the storage service. Default: `localhost:9142`. + +--commit-share-to-storage-grant | $STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT +: Commit shares to the share manager. Default: `true`. + +--commit-share-to-storage-ref | $STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF +: Commit shares to the storage. Default: `true`. + +--share-folder | $STORAGE_GATEWAY_SHARE_FOLDER +: mount shares in this folder of the home storage provider. Default: `Shares`. + +--disable-home-creation-on-login | $STORAGE_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN +: Disable creation of home folder on login. + +--storage-registry-driver | $STORAGE_STORAGE_REGISTRY_DRIVER +: driver of the storage registry. Default: `static`. + +--storage-home-provider | $STORAGE_STORAGE_HOME_PROVIDER +: mount point of the storage provider for user homes in the global namespace. Default: `/home`. + +--frontend-url | $STORAGE_FRONTEND_URL +: URL to use for the storage service. Default: `https://localhost:9200`. + +--datagateway-url | $STORAGE_DATAGATEWAY_URL +: URL to use for the storage datagateway. Default: `https://localhost:9200/data`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +--auth-basic-url | $STORAGE_AUTH_BASIC_URL +: URL to use for the storage service. Default: `localhost:9146`. + +--auth-bearer-url | $STORAGE_AUTH_BEARER_URL +: URL to use for the storage service. Default: `localhost:9148`. + +--sharing-url | $STORAGE_SHARING_URL +: URL to use for the storage service. Default: `localhost:9150`. + +--storage-root-url | $STORAGE_STORAGE_ROOT_URL +: URL to use for the storage service. Default: `localhost:9152`. + +--storage-root-mount-path | $STORAGE_STORAGE_ROOT_MOUNT_PATH +: mount path. Default: `/`. + +--storage-root-mount-id | $STORAGE_STORAGE_ROOT_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009152`. + +--storage-home-url | $STORAGE_STORAGE_HOME_URL +: URL to use for the storage service. Default: `localhost:9154`. + +--storage-home-mount-path | $STORAGE_STORAGE_HOME_MOUNT_PATH +: mount path. Default: `/home`. + +--storage-home-mount-id | $STORAGE_STORAGE_HOME_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009154`. + +--storage-eos-url | $STORAGE_STORAGE_EOS_URL +: URL to use for the storage service. Default: `localhost:9158`. + +--storage-eos-mount-path | $STORAGE_STORAGE_EOS_MOUNT_PATH +: mount path. Default: `/eos`. + +--storage-eos-mount-id | $STORAGE_STORAGE_EOS_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`. + +--storage-oc-url | $STORAGE_STORAGE_OC_URL +: URL to use for the storage service. Default: `localhost:9162`. + +--storage-oc-mount-path | $STORAGE_STORAGE_OC_MOUNT_PATH +: mount path. Default: `/oc`. + +--storage-oc-mount-id | $STORAGE_STORAGE_OC_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +--public-link-url | $STORAGE_STORAGE_PUBLIC_LINK_URL +: URL to use for the public links service. Default: `localhost:9178`. + +--storage-public-link-mount-path | $STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH +: mount path. Default: `/public/`. + +### storage storage + +Storage service for oCIS + +Usage: `storage storage [command options] [arguments...]` + +--config-file | $STORAGE_CONFIG_FILE +: Path to config file. + +--log-level | $STORAGE_LOG_LEVEL +: Set logging level. Default: `info`. + +--log-pretty | $STORAGE_LOG_PRETTY +: Enable pretty logging. + +--log-color | $STORAGE_LOG_COLOR +: Enable colored logging. + +### storage storage-home + +Start storage-home service + +Usage: `storage storage-home [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_HOME_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9155`. + +--network | $STORAGE_STORAGE_HOME_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_HOME_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_STORAGE_HOME_ADDR +: Address to bind storage service. Default: `0.0.0.0:9154`. + +--url | $STORAGE_STORAGE_HOME_URL +: URL to use for the storage service. Default: `localhost:9154`. + +--driver | $STORAGE_STORAGE_HOME_DRIVER +: storage driver for home mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. + +--mount-path | $STORAGE_STORAGE_HOME_MOUNT_PATH +: mount path. Default: `/home`. + +--mount-id | $STORAGE_STORAGE_HOME_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +--expose-data-server | $STORAGE_STORAGE_HOME_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `false`. + +--data-server-url | $STORAGE_STORAGE_HOME_DATA_SERVER_URL +: data server url. Default: `http://localhost:9156/data`. + +--enable-home | $STORAGE_STORAGE_HOME_ENABLE_HOME +: enable the creation of home directories. Default: `true`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +### storage storage-metadata + +Start storage-metadata service + +Usage: `storage storage-metadata [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_METADATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9217`. + +--network | $STORAGE_STORAGE_METADATA_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--provider-addr | $STORAGE_STORAGE_METADATA_PROVIDER_ADDR +: Address to bind storage service. Default: `0.0.0.0:9215`. + +--data-server-url | $STORAGE_STORAGE_METADATA_DATA_SERVER_URL +: URL of the data-server the storage-provider uses. Default: `http://localhost:9216`. + +--data-server-addr | $STORAGE_STORAGE_METADATA_DATA_SERVER_ADDR +: Address to bind the metadata data-server to. Default: `0.0.0.0:9216`. + +--storage-provider-driver | $STORAGE_STORAGE_METADATA_PROVIDER_DRIVER +: storage driver for metadata mount: eg. local, eos, owncloud, ocis or s3. Default: `local`. + +--data-provider-driver | $STORAGE_STORAGE_METADATA_DATA_PROVIDER_DRIVER +: storage driver for data-provider mount: eg. local, eos, owncloud, ocis or s3. Default: `local`. + +--storage-root | $STORAGE_STORAGE_METADATA_ROOT +: the path to the metadata storage root. Default: `/var/tmp/ocis/metadata`. + +### storage storage-oc + +Start storage-oc service + +Usage: `storage storage-oc [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_OC_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9163`. + +--network | $STORAGE_STORAGE_OC_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_OC_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_STORAGE_OC_ADDR +: Address to bind storage service. Default: `0.0.0.0:9162`. + +--url | $STORAGE_STORAGE_OC_URL +: URL to use for the storage service. Default: `localhost:9162`. + +--driver | $STORAGE_STORAGE_OC_DRIVER +: storage driver for oc mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. + +--mount-path | $STORAGE_STORAGE_OC_MOUNT_PATH +: mount path. Default: `/oc`. + +--mount-id | $STORAGE_STORAGE_OC_MOUNT_ID +: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`. + +--expose-data-server | $STORAGE_STORAGE_OC_EXPOSE_DATA_SERVER +: exposes a dedicated data server. Default: `false`. + +--data-server-url | $STORAGE_STORAGE_OC_DATA_SERVER_URL +: data server url. Default: `http://localhost:9164/data`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +### storage storage-oc-data + +Start storage-oc-data service + +Usage: `storage storage-oc-data [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_OC_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9165`. + +--network | $STORAGE_STORAGE_OC_DATA_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_OC_DATA_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $STORAGE_STORAGE_OC_DATA_ADDR +: Address to bind storage service. Default: `0.0.0.0:9164`. + +--url | $STORAGE_STORAGE_OC_DATA_URL +: URL to use for the storage service. Default: `localhost:9164`. + +--driver | $STORAGE_STORAGE_OC_DATA_DRIVER +: storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. + +--prefix | $STORAGE_STORAGE_OC_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $STORAGE_STORAGE_OC_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--gateway-url | $STORAGE_GATEWAY_URL +: URL to use for the storage gateway service. Default: `localhost:9142`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +### storage storage-public-link + +Start storage-public-link service + +Usage: `storage storage-public-link [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_PUBLIC_LINK_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9179`. + +--network | $STORAGE_STORAGE_PUBLIC_LINK_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_PUBLIC_LINK_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_STORAGE_PUBLIC_LINK_ADDR +: Address to bind storage service. Default: `0.0.0.0:9178`. + +--url | $STORAGE_STORAGE_PUBLIC_LINK_URL +: Address to bind storage service. Default: `localhost:9178`. + +--mount-path | $STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH +: mount path. Default: `/public/`. + +--gateway-url | $STORAGE_GATEWAY_URL +: URL to use for the storage gateway service. Default: `localhost:9142`. + +### storage auth-bearer + +Start authprovider for bearer auth + +Usage: `storage auth-bearer [command options] [arguments...]` + +--debug-addr | $STORAGE_AUTH_BEARER_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9149`. + +--oidc-issuer | $STORAGE_OIDC_ISSUER +: OIDC issuer. Default: `https://localhost:9200`. + +--oidc-insecure | $STORAGE_OIDC_INSECURE +: OIDC allow insecure communication. Default: `true`. + +--oidc-id-claim | $STORAGE_OIDC_ID_CLAIM +: OIDC id claim. Default: `preferred_username`. + +--oidc-uid-claim | $STORAGE_OIDC_UID_CLAIM +: OIDC uid claim. + +--oidc-gid-claim | $STORAGE_OIDC_GID_CLAIM +: OIDC gid claim. + +--network | $STORAGE_AUTH_BEARER_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_AUTH_BEARER_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_AUTH_BEARER_ADDR +: Address to bind storage service. Default: `0.0.0.0:9148`. + +--url | $STORAGE_AUTH_BEARER_URL +: URL to use for the storage service. Default: `localhost:9148`. + +### storage frontend + +Start frontend service + +Usage: `storage frontend [command options] [arguments...]` + +--debug-addr | $STORAGE_FRONTEND_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9141`. + +--transfer-secret | $STORAGE_TRANSFER_SECRET +: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`. + +--webdav-namespace | $WEBDAV_NAMESPACE +: Namespace prefix for the /webdav endpoint. Default: `/home/`. + +--dav-files-namespace | $DAV_FILES_NAMESPACE +: Namespace prefix for the webdav /dav/files endpoint. Default: `/oc/`. + +--network | $STORAGE_FRONTEND_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_FRONTEND_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $STORAGE_FRONTEND_ADDR +: Address to bind storage service. Default: `0.0.0.0:9140`. + +--url | $STORAGE_FRONTEND_URL +: URL to use for the storage service. Default: `https://localhost:9200`. + +--datagateway-prefix | $STORAGE_FRONTEND_DATAGATEWAY_PREFIX +: datagateway prefix. Default: `data`. + +--ocdav-prefix | $STORAGE_FRONTEND_OCDAV_PREFIX +: owncloud webdav endpoint prefix. + +--ocs-prefix | $STORAGE_FRONTEND_OCS_PREFIX +: open collaboration services endpoint prefix. Default: `ocs`. + +--gateway-url | $STORAGE_GATEWAY_URL +: URL to use for the storage gateway service. Default: `localhost:9142`. + +--upload-disable-tus | $STORAGE_FRONTEND_UPLOAD_DISABLE_TUS +: Disables TUS upload mechanism. Default: `false`. + +--upload-http-method-override | $STORAGE_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE +: Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH. + +### storage auth-basic + +Start authprovider for basic auth + +Usage: `storage auth-basic [command options] [arguments...]` + +--debug-addr | $STORAGE_AUTH_BASIC_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9147`. + +--auth-driver | $STORAGE_AUTH_DRIVER +: auth driver: 'demo', 'json' or 'ldap'. Default: `ldap`. + +--auth-json | $STORAGE_AUTH_JSON +: Path to users.json file. + +--network | $STORAGE_AUTH_BASIC_NETWORK +: Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_AUTH_BASIC_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_AUTH_BASIC_ADDR +: Address to bind storage service. Default: `0.0.0.0:9146`. + +--url | $STORAGE_AUTH_BASIC_URL +: URL to use for the storage service. Default: `localhost:9146`. + +### storage health + +Check health status + +Usage: `storage health [command options] [arguments...]` + +--debug-addr | $STORAGE_DEBUG_ADDR +: Address to debug endpoint. Default: `0.0.0.0:9109`. + +### storage storage-eos-data + +Start storage-eos-data service + +Usage: `storage storage-eos-data [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_OC_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9161`. + +--network | $STORAGE_STORAGE_EOS_DATA_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_EOS_DATA_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $STORAGE_STORAGE_EOS_DATA_ADDR +: Address to bind storage service. Default: `0.0.0.0:9160`. + +--url | $STORAGE_STORAGE_EOS_DATA_URL +: URL to use for the storage service. Default: `localhost:9160`. + +--driver | $STORAGE_STORAGE_EOS_DATA_DRIVER +: storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`. + +--prefix | $STORAGE_STORAGE_EOS_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $STORAGE_STORAGE_EOS_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--gateway-url | $STORAGE_GATEWAY_URL +: URL to use for the storage gateway service. Default: `localhost:9142`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +### storage storage-home-data + +Start storage-home-data service + +Usage: `storage storage-home-data [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_HOME_DATA_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9157`. + +--network | $STORAGE_STORAGE_HOME_DATA_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_HOME_DATA_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `http`. + +--addr | $STORAGE_STORAGE_HOME_DATA_ADDR +: Address to bind storage service. Default: `0.0.0.0:9156`. + +--url | $STORAGE_STORAGE_HOME_DATA_URL +: URL to use for the storage service. Default: `localhost:9156`. + +--driver | $STORAGE_STORAGE_HOME_DATA_DRIVER +: storage driver for home data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`. + +--prefix | $STORAGE_STORAGE_HOME_DATA_PREFIX +: prefix for the http endpoint, without leading slash. Default: `data`. + +--temp-folder | $STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER +: temp folder. Default: `/var/tmp/`. + +--enable-home | $STORAGE_STORAGE_HOME_ENABLE_HOME +: enable the creation of home directories. Default: `true`. + +--gateway-url | $STORAGE_GATEWAY_URL +: URL to use for the storage gateway service. Default: `localhost:9142`. + +--users-url | $STORAGE_USERS_URL +: URL to use for the storage service. Default: `localhost:9144`. + +### storage storage-root + +Start storage-root service + +Usage: `storage storage-root [command options] [arguments...]` + +--debug-addr | $STORAGE_STORAGE_ROOT_DEBUG_ADDR +: Address to bind debug server. Default: `0.0.0.0:9153`. + +--network | $STORAGE_STORAGE_ROOT_NETWORK +: Network to use for the storage service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`. + +--protocol | $STORAGE_STORAGE_ROOT_PROTOCOL +: protocol for storage service, can be 'http' or 'grpc'. Default: `grpc`. + +--addr | $STORAGE_STORAGE_ROOT_ADDR +: Address to bind storage service. Default: `0.0.0.0:9152`. + +--url | $STORAGE_STORAGE_ROOT_URL +: URL to use for the storage service. Default: `localhost:9152`. + +--driver | $STORAGE_STORAGE_ROOT_DRIVER +: storage driver for root mount: eg. local, eos, owncloud, ocis or s3. Default: `local`. + +--mount-path | $STORAGE_STORAGE_ROOT_MOUNT_PATH +: mount path. Default: `/`. + +--mount-id | $STORAGE_STORAGE_ROOT_MOUNT_ID +: mount id. Default: `123e4567-e89b-12d3-a456-426655440001`. + +--expose-data-server | $STORAGE_STORAGE_ROOT_EXPOSE_DATA_SERVER +: exposes a dedicated data server. + +--data-server-url | $STORAGE_STORAGE_ROOT_DATA_SERVER_URL +: data server url. + diff --git a/docs/extensions/ocis-reva/license.md b/docs/extensions/storage/license.md similarity index 75% rename from docs/extensions/ocis-reva/license.md rename to docs/extensions/storage/license.md index 84210633a6..6852e63faf 100644 --- a/docs/extensions/ocis-reva/license.md +++ b/docs/extensions/storage/license.md @@ -2,8 +2,8 @@ title: "License" date: 2018-05-02T00:00:00+00:00 weight: 40 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: license.md --- diff --git a/docs/extensions/storage/releasing.md b/docs/extensions/storage/releasing.md new file mode 100644 index 0000000000..c0f0b4416d --- /dev/null +++ b/docs/extensions/storage/releasing.md @@ -0,0 +1,31 @@ +--- +title: "Releasing" +date: 2020-05-22T00:00:00+00:00 +weight: 60 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage +geekdocFilePath: releasing.md +--- + +{{< toc >}} + +To release a new version of the storage submodule, you have to follow a few simple steps. + +## Preparation + +1. Before releasing, make sure that reva has been [updated to the desired version]({{< ref "updating.md" >}}) + +## Release +1. Check out master +{{< highlight txt >}} +git checkout master +git pull origin master +{{< / highlight >}} +2. Create a new tag (preferably signed) and replace the version number accordingly. Prefix the tag with the submodule `storage/v`. +{{< highlight txt >}} +git tag -s storage/vx.x.x -m "release vx.x.x" +git push origin storage/vx.x.x +{{< / highlight >}} +5. Wait for CI and check that the GitHub release was published. + +Congratulations, you just released the storage submodule! diff --git a/docs/extensions/ocis-reva/storages.md b/docs/extensions/storage/storages.md similarity index 83% rename from docs/extensions/ocis-reva/storages.md rename to docs/extensions/storage/storages.md index bc623d0650..50d55b30bc 100644 --- a/docs/extensions/ocis-reva/storages.md +++ b/docs/extensions/storage/storages.md @@ -2,18 +2,18 @@ title: "Storages" date: 2020-04-27T18:46:00+01:00 weight: 37 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: storages.md --- ## Storage commands -`ocis-reva` has multiple storage provider commands to preconfigure different default configurations for the reva *storage provider* service. While you could rerun `ocis-reva storage-oc` multiple times with different flags to get multiple instances we are giving the different commands the necessary default configuration to allow the `ocis` binary to simply start them and not deal with configuration. +`storage` has multiple storage provider commands to preconfigure different default configurations for the reva *storage provider* service. While you could rerun `storage storage-oc` multiple times with different flags to get multiple instances we are giving the different commands the necessary default configuration to allow the `ocis` binary to simply start them and not deal with configuration. ## Storage providers -To manage the file tree ocis uses reva *storage providers* that are accessing the underlying storage using a *storage driver*. The driver can be used to change the implementation of a storage aspect to better reflect the actual underlying storage capabilities. As an example a move operation on a POSIX filesystem ([theoretically](https://danluu.com/deconstruct-files/)) is an atomic operation. When trying to implement a file tree on top of S3 there is no native move operation that can be used. A naive implementation might fall back on a COPY and DELETE. Some S3 implementations provide a COPY operation that uses an existing key as the source, so the file at least does not need to be reuploaded. In the worst case scenario, which is renaming a folder with hundreds of thousands of objects, a reupload for every file has to be made. Instead of hiding this complexity a better choice might be to disable renaming of files or at least folders on S3. There are however implementations of filesystems on top of S3 that store the tree metadata in dedicated objects or use a completely different persistence mechanism like a distributed key value store to implement the file tree aspect of a storage. +To manage the file tree ocis uses storage *storage providers* that are accessing the underlying storage using a *storage driver*. The driver can be used to change the implementation of a storage aspect to better reflect the actual underlying storage capabilities. As an example a move operation on a POSIX filesystem ([theoretically](https://danluu.com/deconstruct-files/)) is an atomic operation. When trying to implement a file tree on top of S3 there is no native move operation that can be used. A naive implementation might fall back on a COPY and DELETE. Some S3 implementations provide a COPY operation that uses an existing key as the source, so the file at least does not need to be reuploaded. In the worst case scenario, which is renaming a folder with hundreds of thousands of objects, a reupload for every file has to be made. Instead of hiding this complexity a better choice might be to disable renaming of files or at least folders on S3. There are however implementations of filesystems on top of S3 that store the tree metadata in dedicated objects or use a completely different persistence mechanism like a distributed key value store to implement the file tree aspect of a storage. {{< hint info >}} @@ -120,7 +120,7 @@ To provide the other storage aspects we plan to implement a FUSE overlay filesys This is the current default storage driver. While it implements the file tree (using redis, including id based lookup), ETag propagation, trash, versions and sharing (including expiry) using the data directory layout of ownCloud 10 it has [known limitations](https://github.com/owncloud/core/issues/28095) that cannot be fixed without changing the actual layout on disk. To setup it up properly in a distributed fashion, the storage-home and the storage-oc need to share the same underlying FS. Their "data" counterparts also need access to the same shared FS. -For a simple docker-compose setup, you can create a volume which will be used by the "ocis-reva-storage-home", "ocis-reva-storage-home-data", "ocis-reva-storage-oc" and "ocis-reva-storage-oc-data" containers. Using the `owncloud/ocis-reva` docker image, the volume would need to be hooked in the `/var/tmp/reva` folder insde the containers. +For a simple docker-compose setup, you can create a volume which will be used by the "storage-storage-home", "storage-storage-home-data", "storage-storage-oc" and "storage-storage-oc-data" containers. Using the `owncloud/ocis` docker image, the volume would need to be hooked in the `/var/tmp/ocis` folder insde the containers. - tree provided by a POSIX filesystem - file layout is mapped to the old ownCloud 10 layout @@ -155,20 +155,20 @@ For a simple docker-compose setup, you can create a volume which will be used by ### EOS Storage Driver -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 `ocis-reva storage-home` command (or have a look at the Makefile ̀ eos-start` target): +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 REVA_STORAGE_HOME_DRIVER=eos -export REVA_STORAGE_EOS_NAMESPACE=/eos -export REVA_STORAGE_EOS_MASTER_URL="root://eos-mgm1.eoscluster.cern.ch:1094" -export REVA_STORAGE_EOS_ENABLE_HOME=true -export REVA_STORAGE_EOS_LAYOUT="dockertest/{{.Username}}" +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}}" ``` 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. {{< hint info >}} -Pull requests to add explicit `reva storage-(s3|custom|...)` commands with working defaults are welcome. +Pull requests to add explicit `storage storage-(s3|custom|...)` commands with working defaults are welcome. {{< /hint >}} ### S3 Storage Driver @@ -177,7 +177,7 @@ A naive driver that treats the keys in an S3 capable storage as `/` delimited pa ## Data Providers -Clients using the CS3 API use an [InitiateFileDownload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileDownloadRequest) and ]InitiateUpload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileUploadRequest) request at the [reva gateway](https://cs3org.github.io/cs3apis/#cs3.gateway.v1beta1.GatewayAPI) to obtain a URL endpoint that can be used to either GET the file content or upload content using the resumable [tus.io](https://tus.io) protocol. +Clients using the CS3 API use an [InitiateFileDownload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileDownloadRequest) and ]InitiateUpload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileUploadRequest) request at the [storage gateway](https://cs3org.github.io/cs3apis/#cs3.gateway.v1beta1.GatewayAPI) to obtain a URL endpoint that can be used to either GET the file content or upload content using the resumable [tus.io](https://tus.io) protocol. The *data provider* uses the same *storage driver* as the *storage provider* but can be scaled independently. diff --git a/docs/extensions/ocis-reva/testing.md b/docs/extensions/storage/testing.md similarity index 82% rename from docs/extensions/ocis-reva/testing.md rename to docs/extensions/storage/testing.md index 2c03fd2a18..6bdf38fe25 100644 --- a/docs/extensions/ocis-reva/testing.md +++ b/docs/extensions/storage/testing.md @@ -2,8 +2,8 @@ title: "Testing" date: 2018-05-02T00:00:00+00:00 weight: 37 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: testing.md --- @@ -41,37 +41,37 @@ File versions need a redis server. Start one with docker by using: ### Run ocis-reva with that ldap server -`ocis-reva` provides multiple subcommands. To configure them all via env vars you can export these environment variables. +`storage` provides multiple subcommands. To configure them all via env vars you can export these environment variables. ``` -export REVA_USERS_DRIVER=ldap -export REVA_LDAP_HOSTNAME=localhost -export REVA_LDAP_PORT=636 -export REVA_LDAP_BASE_DN='dc=owncloud,dc=com' -export REVA_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))' -export REVA_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))' -export REVA_LDAP_BIND_DN='cn=admin,dc=owncloud,dc=com' -export REVA_LDAP_BIND_PASSWORD=admin -export REVA_LDAP_SCHEMA_UID=uid -export REVA_LDAP_SCHEMA_MAIL=mail -export REVA_LDAP_SCHEMA_DISPLAYNAME=displayName -export REVA_LDAP_SCHEMA_CN=cn -export REVA_FRONTEND_URL=http://localhost:9140 # needed because the proxy is not started -export REVA_DATAGATEWAY_URL=http://localhost:9140/data # needed because the proxy is not started +export STORAGE_USERS_DRIVER=ldap +export STORAGE_LDAP_HOSTNAME=localhost +export STORAGE_LDAP_PORT=636 +export STORAGE_LDAP_BASE_DN='dc=owncloud,dc=com' +export STORAGE_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))' +export STORAGE_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))' +export STORAGE_LDAP_BIND_DN='cn=admin,dc=owncloud,dc=com' +export STORAGE_LDAP_BIND_PASSWORD=admin +export STORAGE_LDAP_SCHEMA_UID=uid +export STORAGE_LDAP_SCHEMA_MAIL=mail +export STORAGE_LDAP_SCHEMA_DISPLAYNAME=displayName +export STORAGE_LDAP_SCHEMA_CN=cn +export STORAGE_FRONTEND_URL=http://localhost:9140 # needed because the proxy is not started +export STORAGE_DATAGATEWAY_URL=http://localhost:9140/data # needed because the proxy is not started ``` Then you need to start the ocis-reva services ``` -bin/ocis-reva frontend & \ -bin/ocis-reva gateway & \ -bin/ocis-reva auth-basic & \ -bin/ocis-reva auth-bearer & \ -bin/ocis-reva sharing & \ -bin/ocis-reva storage-home & \ -bin/ocis-reva storage-home-data & \ -bin/ocis-reva storage-oc & \ -bin/ocis-reva storage-oc-data & \ -bin/ocis-reva users & +bin/storage frontend & \ +bin/storage gateway & \ +bin/storage auth-basic & \ +bin/storage auth-bearer & \ +bin/storage sharing & \ +bin/storage storage-home & \ +bin/storage storage-home-data & \ +bin/storage storage-oc & \ +bin/storage storage-oc-data & \ +bin/storage users & ``` ### Run the API acceptance tests @@ -141,7 +141,7 @@ If you want to work on a specific issue 9. make a PR that has the fixed code, relevant lines removed from the expected failures file and bug demonstration tests deleted. If the changes also affect the `ocis` repository make sure the changes get ported over there. - That will need the fixed code in `ocis-reva` to be applied to `ocis` along with the test-related changes. + That will need the fixed code in `storage` to be applied to `ocis` along with the test-related changes. ### Notes - in a normal case the test-code cleans up users after the test-run, but if a test-run is interrupted (e.g. by CTRL+C) users might have been left on the LDAP server. In that case rerunning the tests requires wiping the users in the ldap server, otherwise the tests will fail when trying to populate the users. This can be done by simply running `docker stop docker-slapd && docker rm docker-slapd` and [restarting the LDAP server container](#run-a-ldap-server-in-a-docker-container) diff --git a/docs/extensions/ocis-reva/updating.md b/docs/extensions/storage/updating.md similarity index 68% rename from docs/extensions/ocis-reva/updating.md rename to docs/extensions/storage/updating.md index 569c646f35..0afd434941 100644 --- a/docs/extensions/ocis-reva/updating.md +++ b/docs/extensions/storage/updating.md @@ -2,8 +2,8 @@ title: "Updating reva" date: 2020-05-22T00:00:00+00:00 weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: updating.md --- @@ -15,5 +15,5 @@ geekdocFilePath: updating.md 2. Create a changelog entry containing changes that were done in [reva](https://github.com/cs3org/reva/commits/master) 3. Create a Pull Request to ocis-reva master with those changes 4. If test issues appear, you might need to [adjust the tests]({{< ref "testing.md" >}}) -5. After the PR is merged, consider doing a [release of ocis-reva]({{< ref "releasing.md" >}}) +5. After the PR is merged, consider doing a [release of the storage submodule]({{< ref "releasing.md" >}}) diff --git a/docs/extensions/storage/users.md b/docs/extensions/storage/users.md new file mode 100644 index 0000000000..6284b913ae --- /dev/null +++ b/docs/extensions/storage/users.md @@ -0,0 +1,52 @@ +--- +title: "Users" +date: 2020-01-16T00:00:00+00:00 +weight: 35 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage +geekdocFilePath: users.md +--- + +### Demo driver + +This is a simple user driver for testing. It contains three users: +``` +einstein:relativity +marie:radioactivty +richard:superfluidity +``` +In order to use the `demo` driver you need to export the relevant environment variable: +``` +export STORAGE_USERS_DRIVER=demo +``` + +### JSON driver + +In order to switch from the `ldap` driver to JSON based users you need to export the relevant environment variables: +``` +export STORAGE_USERS_DRIVER=json +export STORAGE_USERS_JSON=/path/to/users.json +``` + +For the format of the users.json have a look at the [reva examples](https://github.com/cs3org/reva/blob/master/examples/separate/users.demo.json) + +### LDAP driver + +This is the default user driver. + +If the below defaults don't match your environment change them accordingly: +``` +export STORAGE_LDAP_HOSTNAME=localhost +export STORAGE_LDAP_PORT=9126 +export STORAGE_LDAP_BASE_DN='dc=example,dc=org' +export STORAGE_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))' +export STORAGE_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))' +export STORAGE_LDAP_BIND_DN='cn=reva,ou=sysusers,dc=example,dc=org' +export STORAGE_LDAP_BIND_PASSWORD=reva +export STORAGE_LDAP_SCHEMA_UID=uid +export STORAGE_LDAP_SCHEMA_MAIL=mail +export STORAGE_LDAP_SCHEMA_DISPLAYNAME=sn +export STORAGE_LDAP_SCHEMA_CN=cn +``` + +Then restart the `bin/storage users` and `bin/storage auth-basic` services for the changes to take effect. diff --git a/docs/ocis/configuration.md b/docs/ocis/configuration.md index 807f92149e..7da299cbf2 100644 --- a/docs/ocis/configuration.md +++ b/docs/ocis/configuration.md @@ -1,9 +1,9 @@ --- title: "Configuration" -date: "2020-09-21T13:14:56+0200" +date: "2020-10-05T21:19:39+0200" weight: 20 geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs +geekdocEditPath: edit/master/docs/ocis geekdocFilePath: configuration.md --- @@ -43,28 +43,25 @@ ownCloud Infinite Scale Stack Usage: `ocis [global options] command [command options] [arguments...]` ---config-file | $OCIS_CONFIG_FILE +--config-file | $OCIS_CONFIG_FILE : Path to config file. ---log-level | $OCIS_LOG_LEVEL +--log-level | $OCIS_LOG_LEVEL : Set logging level. Default: `info`. ---log-pretty | $OCIS_LOG_PRETTY +--log-pretty | $OCIS_LOG_PRETTY : Enable pretty logging. Default: `true`. ---log-color | $OCIS_LOG_COLOR +--log-color | $OCIS_LOG_COLOR : Enable colored logging. Default: `true`. ## Sub Commands -### ocis health +### ocis kill -Check health status +Kill an extension by name -Usage: `ocis health [command options] [arguments...]` - ---debug-addr | $OCIS_DEBUG_ADDR -: Address to debug endpoint. Default: `0.0.0.0:9010`. +Usage: `ocis kill [command options] [arguments...]` ### ocis server @@ -72,42 +69,63 @@ Start fullstack server Usage: `ocis server [command options] [arguments...]` ---tracing-enabled | $OCIS_TRACING_ENABLED +--tracing-enabled | $OCIS_TRACING_ENABLED : Enable sending traces. ---tracing-type | $OCIS_TRACING_TYPE +--tracing-type | $OCIS_TRACING_TYPE : Tracing backend type. Default: `jaeger`. ---tracing-endpoint | $OCIS_TRACING_ENDPOINT +--tracing-endpoint | $OCIS_TRACING_ENDPOINT : Endpoint for the agent. Default: `localhost:6831`. ---tracing-collector | $OCIS_TRACING_COLLECTOR +--tracing-collector | $OCIS_TRACING_COLLECTOR : Endpoint for the collector. Default: `http://localhost:14268/api/traces`. ---tracing-service | $OCIS_TRACING_SERVICE +--tracing-service | $OCIS_TRACING_SERVICE : Service name for tracing. Default: `ocis`. ---debug-addr | $OCIS_DEBUG_ADDR +--debug-addr | $OCIS_DEBUG_ADDR : Address to bind debug server. Default: `0.0.0.0:9010`. ---debug-token | $OCIS_DEBUG_TOKEN +--debug-token | $OCIS_DEBUG_TOKEN : Token to grant metrics access. ---debug-pprof | $OCIS_DEBUG_PPROF +--debug-pprof | $OCIS_DEBUG_PPROF : Enable pprof debugging. ---debug-zpages | $OCIS_DEBUG_ZPAGES +--debug-zpages | $OCIS_DEBUG_ZPAGES : Enable zpages debugging. ---http-addr | $OCIS_HTTP_ADDR +--http-addr | $OCIS_HTTP_ADDR : Address to bind http server. Default: `0.0.0.0:9000`. ---http-root | $OCIS_HTTP_ROOT +--http-root | $OCIS_HTTP_ROOT : Root path of http server. Default: `/`. ---grpc-addr | $OCIS_GRPC_ADDR +--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. @@ -116,9 +134,29 @@ There are more subcommands to start the individual extensions. Please check the Start konnectd server -#### ocis run +#### ocis storage-frontend -Runs an extension +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 @@ -128,95 +166,67 @@ Start a go-micro store Start glauth server -#### ocis ocs +#### ocis storage-auth-bearer -Start ocs server +Start storage auth-bearer service -#### ocis reva-storage-eos-data +#### ocis storage-sharing -Start reva storage data provider for eos mount - -#### ocis reva-storage-home-data - -Start reva storage data provider for home mount - -#### ocis kill - -Kill an extension by name - -#### ocis proxy - -Start proxy server - -#### ocis reva-auth-bearer - -Start reva auth-bearer service - -#### ocis reva-storage-oc-data - -Start reva storage data provider for oc mount - -#### ocis settings - -Start settings server - -#### ocis accounts - -Start accounts server - -#### ocis phoenix - -Start phoenix server - -#### ocis reva-storage-eos - -Start reva storage service for eos mount - -#### ocis reva-storage-home - -Start reva storage service for home mount - -#### ocis reva-storage-oc - -Start reva storage service for oc mount - -#### ocis reva-storage-root - -Start reva root storage - -#### ocis reva-gateway - -Start reva gateway - -#### ocis reva-sharing - -Start reva sharing service - -#### ocis reva-users - -Start reva users service - -#### ocis list - -Lists running ocis extensions - -#### ocis reva-auth-basic - -Start reva auth-basic service - -#### ocis reva-frontend - -Start reva frontend - -#### ocis reva-storage-public-link - -Start reva public link storage - -#### ocis thumbnails - -Start thumbnails server +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 + diff --git a/ocis/go.mod b/ocis/go.mod index 598986960b..2d124d781a 100644 --- a/ocis/go.mod +++ b/ocis/go.mod @@ -21,7 +21,7 @@ require ( github.com/owncloud/ocis/konnectd v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/ocis-phoenix v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/ocis-pkg v0.1.0 - github.com/owncloud/ocis/ocis-reva v0.0.0-00010101000000-000000000000 + github.com/owncloud/ocis/storage v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/proxy v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/settings v0.0.0-20200918114005-1a0ddd2190ee @@ -40,7 +40,7 @@ replace ( github.com/owncloud/ocis/konnectd => ../konnectd github.com/owncloud/ocis/ocis-phoenix => ../ocis-phoenix github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg - github.com/owncloud/ocis/ocis-reva => ../ocis-reva + github.com/owncloud/ocis/storage => ../storage github.com/owncloud/ocis/ocs => ../ocs github.com/owncloud/ocis/proxy => ../proxy github.com/owncloud/ocis/settings => ../settings diff --git a/ocis/go.sum b/ocis/go.sum index 65eb5011ed..1650c10e9f 100644 --- a/ocis/go.sum +++ b/ocis/go.sum @@ -868,6 +868,7 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5 h1:FdBGmSkD2QpQzRWup//SGObvWf2nq89zj9+ta9OvI3A= github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= diff --git a/ocis/pkg/command/proxy.go b/ocis/pkg/command/proxy.go index 8402a6dd6b..8422a39e10 100644 --- a/ocis/pkg/command/proxy.go +++ b/ocis/pkg/command/proxy.go @@ -48,8 +48,8 @@ func configureProxy(cfg *config.Config) *svcconfig.Config { cfg.Proxy.Tracing.Service = cfg.Tracing.Service } - if cfg.Reva.Reva.JWTSecret != "" { - cfg.Proxy.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret + if cfg.Storage.Reva.JWTSecret != "" { + cfg.Proxy.TokenManager.JWTSecret = cfg.Storage.Reva.JWTSecret } return cfg.Proxy diff --git a/ocis/pkg/command/revaauthbasic.go b/ocis/pkg/command/revaauthbasic.go deleted file mode 100644 index a48c177e13..0000000000 --- a/ocis/pkg/command/revaauthbasic.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaAuthBasicCommand is the entrypoint for the reva-auth-basic command. -func RevaAuthBasicCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-auth-basic", - Usage: "Start reva auth-basic service", - Category: "Extensions", - Flags: flagset.AuthBasicWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaAuthBasic(cfg) - - return cli.HandleAction( - command.AuthBasic(scfg).Action, - c, - ) - }, - } -} - -func configureRevaAuthBasic(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaAuthBasicCommand) -} diff --git a/ocis/pkg/command/revaauthbearer.go b/ocis/pkg/command/revaauthbearer.go deleted file mode 100644 index da15afcbe6..0000000000 --- a/ocis/pkg/command/revaauthbearer.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaAuthBearerCommand is the entrypoint for the reva-auth-bearer command. -func RevaAuthBearerCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-auth-bearer", - Usage: "Start reva auth-bearer service", - Category: "Extensions", - Flags: flagset.AuthBearerWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaAuthBearer(cfg) - - return cli.HandleAction( - command.AuthBearer(scfg).Action, - c, - ) - }, - } -} - -func configureRevaAuthBearer(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaAuthBearerCommand) -} diff --git a/ocis/pkg/command/revafrontend.go b/ocis/pkg/command/revafrontend.go deleted file mode 100644 index 8e28b5647e..0000000000 --- a/ocis/pkg/command/revafrontend.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaFrontendCommand is the entrypoint for the reva-frontend command. -func RevaFrontendCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-frontend", - Usage: "Start reva frontend", - Category: "Extensions", - Flags: flagset.FrontendWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaFrontend(cfg) - - return cli.HandleAction( - command.Frontend(scfg).Action, - c, - ) - }, - } -} - -func configureRevaFrontend(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaFrontendCommand) -} diff --git a/ocis/pkg/command/revagateway.go b/ocis/pkg/command/revagateway.go deleted file mode 100644 index ea0d377144..0000000000 --- a/ocis/pkg/command/revagateway.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaGatewayCommand is the entrypoint for the reva-gateway command. -func RevaGatewayCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-gateway", - Usage: "Start reva gateway", - Category: "Extensions", - Flags: flagset.GatewayWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaGateway(cfg) - - return cli.HandleAction( - command.Gateway(scfg).Action, - c, - ) - }, - } -} - -func configureRevaGateway(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaGatewayCommand) -} diff --git a/ocis/pkg/command/revasharing.go b/ocis/pkg/command/revasharing.go deleted file mode 100644 index 582843251a..0000000000 --- a/ocis/pkg/command/revasharing.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaSharingCommand is the entrypoint for the reva-sharing command. -func RevaSharingCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-sharing", - Usage: "Start reva sharing service", - Category: "Extensions", - Flags: flagset.SharingWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaSharing(cfg) - - return cli.HandleAction( - command.Sharing(scfg).Action, - c, - ) - }, - } -} - -func configureRevaSharing(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaSharingCommand) -} diff --git a/ocis/pkg/command/revastorageeos.go b/ocis/pkg/command/revastorageeos.go deleted file mode 100644 index 3c858aace4..0000000000 --- a/ocis/pkg/command/revastorageeos.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageEOSCommand is the entrypoint for the reva-storage-oc command. -func RevaStorageEOSCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-eos", - Usage: "Start reva storage service for eos mount", - Category: "Extensions", - Flags: flagset.StorageEOSWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageEOS(cfg) - - return cli.HandleAction( - command.StorageEOS(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageEOS(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageEOSCommand) -} diff --git a/ocis/pkg/command/revastorageeosdata.go b/ocis/pkg/command/revastorageeosdata.go deleted file mode 100644 index 1abb391183..0000000000 --- a/ocis/pkg/command/revastorageeosdata.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command. -func RevaStorageEOSDataCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-eos-data", - Usage: "Start reva storage data provider for eos mount", - Category: "Extensions", - Flags: flagset.StorageEOSDataWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageEOSData(cfg) - - return cli.HandleAction( - command.StorageEOSData(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageEOSData(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageEOSDataCommand) -} diff --git a/ocis/pkg/command/revastoragehome.go b/ocis/pkg/command/revastoragehome.go deleted file mode 100644 index 6fe7388b9c..0000000000 --- a/ocis/pkg/command/revastoragehome.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageHomeCommand is the entrypoint for the reva-storage-home command. -func RevaStorageHomeCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-home", - Usage: "Start reva storage service for home mount", - Category: "Extensions", - Flags: flagset.StorageHomeWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageHome(cfg) - - return cli.HandleAction( - command.StorageHome(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageHome(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageHomeCommand) -} diff --git a/ocis/pkg/command/revastoragehomedata.go b/ocis/pkg/command/revastoragehomedata.go deleted file mode 100644 index b55cf0fd52..0000000000 --- a/ocis/pkg/command/revastoragehomedata.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageHomeDataCommand is the entrypoint for the reva-storage-home-data command. -func RevaStorageHomeDataCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-home-data", - Usage: "Start reva storage data provider for home mount", - Category: "Extensions", - Flags: flagset.StorageHomeDataWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageHomeData(cfg) - - return cli.HandleAction( - command.StorageHomeData(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageHomeData(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageHomeDataCommand) -} diff --git a/ocis/pkg/command/revastoragemetadata.go b/ocis/pkg/command/revastoragemetadata.go deleted file mode 100644 index 61c7af1125..0000000000 --- a/ocis/pkg/command/revastoragemetadata.go +++ /dev/null @@ -1,49 +0,0 @@ -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageMetadataCommand is the entrypoint for the reva-storage-metadata command. -func RevaStorageMetadataCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-metadata", - Usage: "Start reva storage service for metadata mount", - Category: "Extensions", - Flags: flagset.StorageMetadata(cfg.Reva), - Action: func(c *cli.Context) error { - revaStorageMetadataCommand := command.StorageMetadata(configureRevaStorageMetadata(cfg)) - - if err := revaStorageMetadataCommand.Before(c); err != nil { - return err - } - - return cli.HandleAction(revaStorageMetadataCommand.Action, c) - }, - } -} - -func configureRevaStorageMetadata(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageMetadataCommand) -} diff --git a/ocis/pkg/command/revastorageoc.go b/ocis/pkg/command/revastorageoc.go deleted file mode 100644 index 419b4dd646..0000000000 --- a/ocis/pkg/command/revastorageoc.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageOCCommand is the entrypoint for the reva-storage-oc command. -func RevaStorageOCCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-oc", - Usage: "Start reva storage service for oc mount", - Category: "Extensions", - Flags: flagset.StorageOCWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageOC(cfg) - - return cli.HandleAction( - command.StorageOC(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageOC(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageOCCommand) -} diff --git a/ocis/pkg/command/revastorageocdata.go b/ocis/pkg/command/revastorageocdata.go deleted file mode 100644 index 0590dfff18..0000000000 --- a/ocis/pkg/command/revastorageocdata.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command. -func RevaStorageOCDataCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-oc-data", - Usage: "Start reva storage data provider for oc mount", - Category: "Extensions", - Flags: flagset.StorageOCDataWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageOCData(cfg) - - return cli.HandleAction( - command.StorageOCData(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageOCData(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageOCDataCommand) -} diff --git a/ocis/pkg/command/revastoragepubliclink.go b/ocis/pkg/command/revastoragepubliclink.go deleted file mode 100644 index 292f7927a0..0000000000 --- a/ocis/pkg/command/revastoragepubliclink.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command. -func RevaStoragePublicLinkCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-public-link", - Usage: "Start reva public link storage", - Category: "Extensions", - Flags: flagset.StoragePublicLink(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStoragePublicLink(cfg) - - return cli.HandleAction( - command.StoragePublicLink(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStoragePublicLink(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStoragePublicLinkCommand) -} diff --git a/ocis/pkg/command/revastorageroot.go b/ocis/pkg/command/revastorageroot.go deleted file mode 100644 index 1dcc51deb0..0000000000 --- a/ocis/pkg/command/revastorageroot.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaStorageRootCommand is the entrypoint for the reva-storage-root command. -func RevaStorageRootCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-storage-root", - Usage: "Start reva root storage", - Category: "Extensions", - Flags: flagset.StorageRootWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaStorageRoot(cfg) - - return cli.HandleAction( - command.StorageRoot(scfg).Action, - c, - ) - }, - } -} - -func configureRevaStorageRoot(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaStorageRootCommand) -} diff --git a/ocis/pkg/command/revausers.go b/ocis/pkg/command/revausers.go deleted file mode 100644 index 1e3953eac5..0000000000 --- a/ocis/pkg/command/revausers.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build !simple - -package command - -import ( - "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/command" - svcconfig "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" -) - -// RevaUsersCommand is the entrypoint for the reva-users command. -func RevaUsersCommand(cfg *config.Config) *cli.Command { - return &cli.Command{ - Name: "reva-users", - Usage: "Start reva users service", - Category: "Extensions", - Flags: flagset.UsersWithConfig(cfg.Reva), - Action: func(c *cli.Context) error { - scfg := configureRevaUsers(cfg) - - return cli.HandleAction( - command.Users(scfg).Action, - c, - ) - }, - } -} - -func configureRevaUsers(cfg *config.Config) *svcconfig.Config { - cfg.Reva.Log.Level = cfg.Log.Level - cfg.Reva.Log.Pretty = cfg.Log.Pretty - cfg.Reva.Log.Color = cfg.Log.Color - - if cfg.Tracing.Enabled { - cfg.Reva.Tracing.Enabled = cfg.Tracing.Enabled - cfg.Reva.Tracing.Type = cfg.Tracing.Type - cfg.Reva.Tracing.Endpoint = cfg.Tracing.Endpoint - cfg.Reva.Tracing.Collector = cfg.Tracing.Collector - cfg.Reva.Tracing.Service = cfg.Tracing.Service - } - - return cfg.Reva -} - -func init() { - register.AddCommand(RevaUsersCommand) -} diff --git a/ocis/pkg/command/settings.go b/ocis/pkg/command/settings.go index 38944a687b..df1af102be 100644 --- a/ocis/pkg/command/settings.go +++ b/ocis/pkg/command/settings.go @@ -4,12 +4,12 @@ package command import ( "github.com/micro/cli/v2" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" "github.com/owncloud/ocis/ocis/pkg/version" "github.com/owncloud/ocis/settings/pkg/command" svcconfig "github.com/owncloud/ocis/settings/pkg/config" "github.com/owncloud/ocis/settings/pkg/flagset" - "github.com/owncloud/ocis/ocis/pkg/config" - "github.com/owncloud/ocis/ocis/pkg/register" ) // SettingsCommand is the entry point for the settings command. @@ -48,8 +48,8 @@ func configureSettings(cfg *config.Config) *svcconfig.Config { cfg.Settings.Tracing.Service = cfg.Tracing.Service } - if cfg.Reva.Reva.JWTSecret != "" { - cfg.Settings.TokenManager.JWTSecret = cfg.Reva.Reva.JWTSecret + if cfg.Storage.Reva.JWTSecret != "" { + cfg.Settings.TokenManager.JWTSecret = cfg.Storage.Reva.JWTSecret } return cfg.Settings diff --git a/ocis/pkg/command/storageauthbasic.go b/ocis/pkg/command/storageauthbasic.go new file mode 100644 index 0000000000..a2f7fb5908 --- /dev/null +++ b/ocis/pkg/command/storageauthbasic.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" +) + +// StorageAuthBasicCommand is the entrypoint for the reva-auth-basic command. +func StorageAuthBasicCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-auth-basic", + Usage: "Start storage auth-basic service", + Category: "Extensions", + Flags: flagset.AuthBasicWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageAuthBasic(cfg) + + return cli.HandleAction( + command.AuthBasic(scfg).Action, + c, + ) + }, + } +} + +func configureStorageAuthBasic(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageAuthBasicCommand) +} diff --git a/ocis/pkg/command/storageauthbearer.go b/ocis/pkg/command/storageauthbearer.go new file mode 100644 index 0000000000..a1c2cfd962 --- /dev/null +++ b/ocis/pkg/command/storageauthbearer.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageAuthBearerCommand is the entrypoint for the reva-auth-bearer command. +func StorageAuthBearerCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-auth-bearer", + Usage: "Start storage auth-bearer service", + Category: "Extensions", + Flags: flagset.AuthBearerWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageAuthBearer(cfg) + + return cli.HandleAction( + command.AuthBearer(scfg).Action, + c, + ) + }, + } +} + +func configureStorageAuthBearer(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageAuthBearerCommand) +} diff --git a/ocis/pkg/command/storagefrontend.go b/ocis/pkg/command/storagefrontend.go new file mode 100644 index 0000000000..699abb4d05 --- /dev/null +++ b/ocis/pkg/command/storagefrontend.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageFrontendCommand is the entrypoint for the reva-frontend command. +func StorageFrontendCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-frontend", + Usage: "Start storage frontend", + Category: "Extensions", + Flags: flagset.FrontendWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageFrontend(cfg) + + return cli.HandleAction( + command.Frontend(scfg).Action, + c, + ) + }, + } +} + +func configureStorageFrontend(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageFrontendCommand) +} diff --git a/ocis/pkg/command/storagegateway.go b/ocis/pkg/command/storagegateway.go new file mode 100644 index 0000000000..ad120a62e3 --- /dev/null +++ b/ocis/pkg/command/storagegateway.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageGatewayCommand is the entrypoint for the reva-gateway command. +func StorageGatewayCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-gateway", + Usage: "Start storage gateway", + Category: "Extensions", + Flags: flagset.GatewayWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageGateway(cfg) + + return cli.HandleAction( + command.Gateway(scfg).Action, + c, + ) + }, + } +} + +func configureStorageGateway(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageGatewayCommand) +} diff --git a/ocis/pkg/command/storagesharing.go b/ocis/pkg/command/storagesharing.go new file mode 100644 index 0000000000..1b3dd60c32 --- /dev/null +++ b/ocis/pkg/command/storagesharing.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageSharingCommand is the entrypoint for the reva-sharing command. +func StorageSharingCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-sharing", + Usage: "Start storage sharing service", + Category: "Extensions", + Flags: flagset.SharingWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageSharing(cfg) + + return cli.HandleAction( + command.Sharing(scfg).Action, + c, + ) + }, + } +} + +func configureStorageSharing(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageSharingCommand) +} diff --git a/ocis/pkg/command/storagestorageeos.go b/ocis/pkg/command/storagestorageeos.go new file mode 100644 index 0000000000..06edff5e75 --- /dev/null +++ b/ocis/pkg/command/storagestorageeos.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" +) + +// StorageStorageEOSCommand is the entrypoint for the reva-storage-oc command. +func StorageStorageEOSCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-eos", + Usage: "Start storage storage service for eos mount", + Category: "Extensions", + Flags: flagset.StorageEOSWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageEOS(cfg) + + return cli.HandleAction( + command.StorageEOS(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageEOS(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageEOSCommand) +} diff --git a/ocis/pkg/command/storagestorageeosdata.go b/ocis/pkg/command/storagestorageeosdata.go new file mode 100644 index 0000000000..057a62bd9d --- /dev/null +++ b/ocis/pkg/command/storagestorageeosdata.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageEOSDataCommand is the entrypoint for the reva-storage-eos-data command. +func StorageStorageEOSDataCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-eos-data", + Usage: "Start storage storage data provider for eos mount", + Category: "Extensions", + Flags: flagset.StorageEOSDataWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageEOSData(cfg) + + return cli.HandleAction( + command.StorageEOSData(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageEOSData(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageEOSDataCommand) +} diff --git a/ocis/pkg/command/storagestoragehome.go b/ocis/pkg/command/storagestoragehome.go new file mode 100644 index 0000000000..b065c1eb2a --- /dev/null +++ b/ocis/pkg/command/storagestoragehome.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageHomeCommand is the entrypoint for the reva-storage-home command. +func StorageStorageHomeCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-home", + Usage: "Start storage storage service for home mount", + Category: "Extensions", + Flags: flagset.StorageHomeWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageHome(cfg) + + return cli.HandleAction( + command.StorageHome(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageHome(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageHomeCommand) +} diff --git a/ocis/pkg/command/storagestoragehomedata.go b/ocis/pkg/command/storagestoragehomedata.go new file mode 100644 index 0000000000..ac63adbc3f --- /dev/null +++ b/ocis/pkg/command/storagestoragehomedata.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageHomeDataCommand is the entrypoint for the reva-storage-home-data command. +func StorageStorageHomeDataCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-home-data", + Usage: "Start storage storage data provider for home mount", + Category: "Extensions", + Flags: flagset.StorageHomeDataWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageHomeData(cfg) + + return cli.HandleAction( + command.StorageHomeData(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageHomeData(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageHomeDataCommand) +} diff --git a/ocis/pkg/command/storagestoragemetadata.go b/ocis/pkg/command/storagestoragemetadata.go new file mode 100644 index 0000000000..d55716830e --- /dev/null +++ b/ocis/pkg/command/storagestoragemetadata.go @@ -0,0 +1,49 @@ +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageMetadataCommand is the entrypoint for the reva-storage-metadata command. +func StorageStorageMetadataCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-metadata", + Usage: "Start storage storage service for metadata mount", + Category: "Extensions", + Flags: flagset.StorageMetadata(cfg.Storage), + Action: func(c *cli.Context) error { + revaStorageMetadataCommand := command.StorageMetadata(configureStorageStorageMetadata(cfg)) + + if err := revaStorageMetadataCommand.Before(c); err != nil { + return err + } + + return cli.HandleAction(revaStorageMetadataCommand.Action, c) + }, + } +} + +func configureStorageStorageMetadata(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageMetadataCommand) +} diff --git a/ocis/pkg/command/storagestorageoc.go b/ocis/pkg/command/storagestorageoc.go new file mode 100644 index 0000000000..c2c187bf54 --- /dev/null +++ b/ocis/pkg/command/storagestorageoc.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageOCCommand is the entrypoint for the reva-storage-oc command. +func StorageStorageOCCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-oc", + Usage: "Start storage storage service for oc mount", + Category: "Extensions", + Flags: flagset.StorageOCWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageOC(cfg) + + return cli.HandleAction( + command.StorageOC(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageOC(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageOCCommand) +} diff --git a/ocis/pkg/command/storagestorageocdata.go b/ocis/pkg/command/storagestorageocdata.go new file mode 100644 index 0000000000..089b303b7e --- /dev/null +++ b/ocis/pkg/command/storagestorageocdata.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageOCDataCommand is the entrypoint for the reva-storage-oc-data command. +func StorageStorageOCDataCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-oc-data", + Usage: "Start storage storage data provider for oc mount", + Category: "Extensions", + Flags: flagset.StorageOCDataWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageOCData(cfg) + + return cli.HandleAction( + command.StorageOCData(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageOCData(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageOCDataCommand) +} diff --git a/ocis/pkg/command/storagestoragepubliclink.go b/ocis/pkg/command/storagestoragepubliclink.go new file mode 100644 index 0000000000..e35d84a736 --- /dev/null +++ b/ocis/pkg/command/storagestoragepubliclink.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStoragePublicLinkCommand is the entrypoint for the reva-storage-oc command. +func StorageStoragePublicLinkCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-public-link", + Usage: "Start storage public link storage", + Category: "Extensions", + Flags: flagset.StoragePublicLink(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStoragePublicLink(cfg) + + return cli.HandleAction( + command.StoragePublicLink(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStoragePublicLink(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStoragePublicLinkCommand) +} diff --git a/ocis/pkg/command/storagestorageroot.go b/ocis/pkg/command/storagestorageroot.go new file mode 100644 index 0000000000..5a5a485779 --- /dev/null +++ b/ocis/pkg/command/storagestorageroot.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageStorageRootCommand is the entrypoint for the reva-storage-root command. +func StorageStorageRootCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-storage-root", + Usage: "Start storage root storage", + Category: "Extensions", + Flags: flagset.StorageRootWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageStorageRoot(cfg) + + return cli.HandleAction( + command.StorageRoot(scfg).Action, + c, + ) + }, + } +} + +func configureStorageStorageRoot(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageStorageRootCommand) +} diff --git a/ocis/pkg/command/storageusers.go b/ocis/pkg/command/storageusers.go new file mode 100644 index 0000000000..d5ade5cbc7 --- /dev/null +++ b/ocis/pkg/command/storageusers.go @@ -0,0 +1,50 @@ +// +build !simple + +package command + +import ( + "github.com/micro/cli/v2" + "github.com/owncloud/ocis/storage/pkg/command" + svcconfig "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/ocis/pkg/config" + "github.com/owncloud/ocis/ocis/pkg/register" +) + +// StorageUsersCommand is the entrypoint for the reva-users command. +func StorageUsersCommand(cfg *config.Config) *cli.Command { + return &cli.Command{ + Name: "storage-users", + Usage: "Start storage users service", + Category: "Extensions", + Flags: flagset.UsersWithConfig(cfg.Storage), + Action: func(c *cli.Context) error { + scfg := configureStorageUsers(cfg) + + return cli.HandleAction( + command.Users(scfg).Action, + c, + ) + }, + } +} + +func configureStorageUsers(cfg *config.Config) *svcconfig.Config { + cfg.Storage.Log.Level = cfg.Log.Level + cfg.Storage.Log.Pretty = cfg.Log.Pretty + cfg.Storage.Log.Color = cfg.Log.Color + + if cfg.Tracing.Enabled { + cfg.Storage.Tracing.Enabled = cfg.Tracing.Enabled + cfg.Storage.Tracing.Type = cfg.Tracing.Type + cfg.Storage.Tracing.Endpoint = cfg.Tracing.Endpoint + cfg.Storage.Tracing.Collector = cfg.Tracing.Collector + cfg.Storage.Tracing.Service = cfg.Tracing.Service + } + + return cfg.Storage +} + +func init() { + register.AddCommand(StorageUsersCommand) +} diff --git a/ocis/pkg/config/config.go b/ocis/pkg/config/config.go index 06c0778d2c..339eefe00a 100644 --- a/ocis/pkg/config/config.go +++ b/ocis/pkg/config/config.go @@ -1,17 +1,17 @@ package config import ( - accounts "github.com/owncloud/ocis/accounts/pkg/config" - glauth "github.com/owncloud/ocis/glauth/pkg/config" graphExplorer "github.com/owncloud/ocis-graph-explorer/pkg/config" graph "github.com/owncloud/ocis-graph/pkg/config" hello "github.com/owncloud/ocis-hello/pkg/config" + accounts "github.com/owncloud/ocis/accounts/pkg/config" + glauth "github.com/owncloud/ocis/glauth/pkg/config" konnectd "github.com/owncloud/ocis/konnectd/pkg/config" - ocs "github.com/owncloud/ocis/ocs/pkg/config" phoenix "github.com/owncloud/ocis/ocis-phoenix/pkg/config" + ocs "github.com/owncloud/ocis/ocs/pkg/config" proxy "github.com/owncloud/ocis/proxy/pkg/config" - reva "github.com/owncloud/ocis/ocis-reva/pkg/config" settings "github.com/owncloud/ocis/settings/pkg/config" + storage "github.com/owncloud/ocis/storage/pkg/config" store "github.com/owncloud/ocis/store/pkg/config" thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config" webdav "github.com/owncloud/ocis/webdav/pkg/config" @@ -71,7 +71,7 @@ type Config struct { OCS *ocs.Config Phoenix *phoenix.Config Proxy *proxy.Config - Reva *reva.Config + Storage *storage.Config Thumbnails *thumbnails.Config WebDAV *webdav.Config Settings *settings.Config @@ -90,7 +90,7 @@ func New() *Config { OCS: ocs.New(), Phoenix: phoenix.New(), WebDAV: webdav.New(), - Reva: reva.New(), + Storage: storage.New(), GLAuth: glauth.New(), Proxy: proxy.New(), Thumbnails: thumbnails.New(), diff --git a/ocis/pkg/runtime/runtime.go b/ocis/pkg/runtime/runtime.go index 0733b8ee0e..3f5c4943bb 100644 --- a/ocis/pkg/runtime/runtime.go +++ b/ocis/pkg/runtime/runtime.go @@ -38,19 +38,19 @@ var ( "graph-explorer", "ocs", "webdav", - "reva-frontend", - "reva-gateway", - "reva-users", - "reva-auth-basic", - "reva-auth-bearer", - "reva-storage-home", - "reva-storage-home-data", - "reva-storage-eos", - "reva-storage-eos-data", - "reva-storage-oc", - "reva-storage-oc-data", - "reva-storage-public-link", - "reva-storage-metadata", + "storage-frontend", + "storage-gateway", + "storage-users", + "storage-auth-basic", + "storage-auth-bearer", + "storage-storage-home", + "storage-storage-home-data", + "storage-storage-eos", + "storage-storage-eos-data", + "storage-storage-oc", + "storage-storage-oc-data", + "storage-storage-public-link", + "storage-storage-metadata", "glauth", "konnectd", "thumbnails", @@ -59,7 +59,7 @@ var ( // There seem to be a race condition when reva-sharing needs to read the sharing.json file and the parent folder is not present. dependants = []string{ "accounts", - "reva-sharing", + "storage-sharing", } // Maximum number of retries until getting a connection to the rpc runtime service. diff --git a/ocis/templates/CONFIGURATION.tmpl b/ocis/templates/CONFIGURATION.tmpl index f25878eaff..463df0150e 100644 --- a/ocis/templates/CONFIGURATION.tmpl +++ b/ocis/templates/CONFIGURATION.tmpl @@ -3,7 +3,7 @@ title: "Configuration" date: "{{ date "2006-01-02T15:04:05-0700" now }}" weight: 20 geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs +geekdocEditPath: edit/master/docs/ocis geekdocFilePath: configuration.md --- {{- define "options"}} @@ -11,7 +11,7 @@ geekdocFilePath: configuration.md {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +--{{ $o.Name }} | ${{ index $o.Env 0 }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -66,7 +66,7 @@ Usage: `ocis [global options] command [command options] [arguments...]` {{ end -}} {{- range $com := .Commands }}{{ with (list $options $com) -}} {{- $c := last . }} -{{- if eq $c.Name "server" "health" -}} +{{- if eq $c.Name "server" "health" "kill" "list" "run" -}} {{- if ne $c.FnName "Simple" -}} ### ocis {{ $c.Name }} @@ -84,11 +84,11 @@ Usage: `ocis {{ $c.Name }} [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. {{ range $com := .Commands }}{{ with $com -}} -{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") -}} +{{ if and (ne .Name "health") (ne .Name "server") (ne .Name "ocis") (ne .Name "kill") (ne .Name "list") (ne .Name "run") -}} #### ocis {{ .Name }} {{ .Usage }} {{ end -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/ocis-reva/.dockerignore b/storage/.dockerignore similarity index 100% rename from ocis-reva/.dockerignore rename to storage/.dockerignore diff --git a/ocis-reva/CHANGELOG.md b/storage/CHANGELOG.md similarity index 100% rename from ocis-reva/CHANGELOG.md rename to storage/CHANGELOG.md diff --git a/ocis-reva/LICENSE b/storage/LICENSE similarity index 100% rename from ocis-reva/LICENSE rename to storage/LICENSE diff --git a/ocis-reva/Makefile b/storage/Makefile similarity index 99% rename from ocis-reva/Makefile rename to storage/Makefile index fcc182efca..ced3a3b7c6 100644 --- a/ocis-reva/Makefile +++ b/storage/Makefile @@ -1,5 +1,5 @@ SHELL := bash -NAME := ocis-reva +NAME := storage IMPORT := github.com/owncloud/ocis/$(NAME) BIN := bin DIST := dist diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/76.md b/storage/changelog/0.1.0_2020-03-23/76.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/76.md rename to storage/changelog/0.1.0_2020-03-23/76.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/change-default-namespace.md b/storage/changelog/0.1.0_2020-03-23/change-default-namespace.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/change-default-namespace.md rename to storage/changelog/0.1.0_2020-03-23/change-default-namespace.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/fix-typos.md b/storage/changelog/0.1.0_2020-03-23/fix-typos.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/fix-typos.md rename to storage/changelog/0.1.0_2020-03-23/fix-typos.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/initial-release.md b/storage/changelog/0.1.0_2020-03-23/initial-release.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/initial-release.md rename to storage/changelog/0.1.0_2020-03-23/initial-release.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/issue-6.md b/storage/changelog/0.1.0_2020-03-23/issue-6.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/issue-6.md rename to storage/changelog/0.1.0_2020-03-23/issue-6.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/issue-87.md b/storage/changelog/0.1.0_2020-03-23/issue-87.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/issue-87.md rename to storage/changelog/0.1.0_2020-03-23/issue-87.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/issue-89.md b/storage/changelog/0.1.0_2020-03-23/issue-89.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/issue-89.md rename to storage/changelog/0.1.0_2020-03-23/issue-89.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/new-ocis-config.md b/storage/changelog/0.1.0_2020-03-23/new-ocis-config.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/new-ocis-config.md rename to storage/changelog/0.1.0_2020-03-23/new-ocis-config.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/pull-77.md b/storage/changelog/0.1.0_2020-03-23/pull-77.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/pull-77.md rename to storage/changelog/0.1.0_2020-03-23/pull-77.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/pull-91.md b/storage/changelog/0.1.0_2020-03-23/pull-91.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/pull-91.md rename to storage/changelog/0.1.0_2020-03-23/pull-91.md diff --git a/ocis-reva/changelog/0.1.0_2020-03-23/user-sharing-driver-json.md b/storage/changelog/0.1.0_2020-03-23/user-sharing-driver-json.md similarity index 100% rename from ocis-reva/changelog/0.1.0_2020-03-23/user-sharing-driver-json.md rename to storage/changelog/0.1.0_2020-03-23/user-sharing-driver-json.md diff --git a/ocis-reva/changelog/0.1.1_2020-03-31/fix-eos-config.md b/storage/changelog/0.1.1_2020-03-31/fix-eos-config.md similarity index 100% rename from ocis-reva/changelog/0.1.1_2020-03-31/fix-eos-config.md rename to storage/changelog/0.1.1_2020-03-31/fix-eos-config.md diff --git a/ocis-reva/changelog/0.10.0_2020-07-10/make-frontend-prefixes-configurable.md b/storage/changelog/0.10.0_2020-07-10/make-frontend-prefixes-configurable.md similarity index 100% rename from ocis-reva/changelog/0.10.0_2020-07-10/make-frontend-prefixes-configurable.md rename to storage/changelog/0.10.0_2020-07-10/make-frontend-prefixes-configurable.md diff --git a/ocis-reva/changelog/0.10.0_2020-07-10/update-reva-to-20200703.md b/storage/changelog/0.10.0_2020-07-10/update-reva-to-20200703.md similarity index 100% rename from ocis-reva/changelog/0.10.0_2020-07-10/update-reva-to-20200703.md rename to storage/changelog/0.10.0_2020-07-10/update-reva-to-20200703.md diff --git a/ocis-reva/changelog/0.10.0_2020-07-10/update-reva-to-20200709.md b/storage/changelog/0.10.0_2020-07-10/update-reva-to-20200709.md similarity index 100% rename from ocis-reva/changelog/0.10.0_2020-07-10/update-reva-to-20200709.md rename to storage/changelog/0.10.0_2020-07-10/update-reva-to-20200709.md diff --git a/ocis-reva/changelog/0.11.0_2020-07-23/update-reva-to-20200710.md b/storage/changelog/0.11.0_2020-07-23/update-reva-to-20200710.md similarity index 100% rename from ocis-reva/changelog/0.11.0_2020-07-23/update-reva-to-20200710.md rename to storage/changelog/0.11.0_2020-07-23/update-reva-to-20200710.md diff --git a/ocis-reva/changelog/0.11.0_2020-07-23/update-reva-to-20200722.md b/storage/changelog/0.11.0_2020-07-23/update-reva-to-20200722.md similarity index 100% rename from ocis-reva/changelog/0.11.0_2020-07-23/update-reva-to-20200722.md rename to storage/changelog/0.11.0_2020-07-23/update-reva-to-20200722.md diff --git a/ocis-reva/changelog/0.11.0_2020-07-23/use-alpine-latest.md b/storage/changelog/0.11.0_2020-07-23/use-alpine-latest.md similarity index 100% rename from ocis-reva/changelog/0.11.0_2020-07-23/use-alpine-latest.md rename to storage/changelog/0.11.0_2020-07-23/use-alpine-latest.md diff --git a/ocis-reva/changelog/0.12.0_2020-08-17/update-docs.md b/storage/changelog/0.12.0_2020-08-17/update-docs.md similarity index 100% rename from ocis-reva/changelog/0.12.0_2020-08-17/update-docs.md rename to storage/changelog/0.12.0_2020-08-17/update-docs.md diff --git a/ocis-reva/changelog/0.12.0_2020-08-17/update-ldap-config.md b/storage/changelog/0.12.0_2020-08-17/update-ldap-config.md similarity index 100% rename from ocis-reva/changelog/0.12.0_2020-08-17/update-ldap-config.md rename to storage/changelog/0.12.0_2020-08-17/update-ldap-config.md diff --git a/ocis-reva/changelog/0.12.0_2020-08-17/update-reva-to-20200724.md b/storage/changelog/0.12.0_2020-08-17/update-reva-to-20200724.md similarity index 100% rename from ocis-reva/changelog/0.12.0_2020-08-17/update-reva-to-20200724.md rename to storage/changelog/0.12.0_2020-08-17/update-reva-to-20200724.md diff --git a/ocis-reva/changelog/0.12.0_2020-08-17/update-reva-to-20200728.md b/storage/changelog/0.12.0_2020-08-17/update-reva-to-20200728.md similarity index 100% rename from ocis-reva/changelog/0.12.0_2020-08-17/update-reva-to-20200728.md rename to storage/changelog/0.12.0_2020-08-17/update-reva-to-20200728.md diff --git a/ocis-reva/changelog/0.12.0_2020-08-17/updates-for-username-userid-split.md b/storage/changelog/0.12.0_2020-08-17/updates-for-username-userid-split.md similarity index 100% rename from ocis-reva/changelog/0.12.0_2020-08-17/updates-for-username-userid-split.md rename to storage/changelog/0.12.0_2020-08-17/updates-for-username-userid-split.md diff --git a/ocis-reva/changelog/0.13.0_2020-08-27/separate-auth-user-providers.md b/storage/changelog/0.13.0_2020-08-27/separate-auth-user-providers.md similarity index 100% rename from ocis-reva/changelog/0.13.0_2020-08-27/separate-auth-user-providers.md rename to storage/changelog/0.13.0_2020-08-27/separate-auth-user-providers.md diff --git a/ocis-reva/changelog/0.13.0_2020-08-27/update-reva-to-20200728.md b/storage/changelog/0.13.0_2020-08-27/update-reva-to-20200728.md similarity index 100% rename from ocis-reva/changelog/0.13.0_2020-08-27/update-reva-to-20200728.md rename to storage/changelog/0.13.0_2020-08-27/update-reva-to-20200728.md diff --git a/ocis-reva/changelog/0.14.0_2020-09-11/config-cleanup.md b/storage/changelog/0.14.0_2020-09-11/config-cleanup.md similarity index 100% rename from ocis-reva/changelog/0.14.0_2020-09-11/config-cleanup.md rename to storage/changelog/0.14.0_2020-09-11/config-cleanup.md diff --git a/ocis-reva/changelog/0.14.0_2020-09-11/storage-registry-rules.md b/storage/changelog/0.14.0_2020-09-11/storage-registry-rules.md similarity index 100% rename from ocis-reva/changelog/0.14.0_2020-09-11/storage-registry-rules.md rename to storage/changelog/0.14.0_2020-09-11/storage-registry-rules.md diff --git a/ocis-reva/changelog/0.14.0_2020-09-11/update-reva-to-20200826.md b/storage/changelog/0.14.0_2020-09-11/update-reva-to-20200826.md similarity index 100% rename from ocis-reva/changelog/0.14.0_2020-09-11/update-reva-to-20200826.md rename to storage/changelog/0.14.0_2020-09-11/update-reva-to-20200826.md diff --git a/ocis-reva/changelog/0.14.0_2020-09-11/update-reva-to-20200911.md b/storage/changelog/0.14.0_2020-09-11/update-reva-to-20200911.md similarity index 100% rename from ocis-reva/changelog/0.14.0_2020-09-11/update-reva-to-20200911.md rename to storage/changelog/0.14.0_2020-09-11/update-reva-to-20200911.md diff --git a/ocis-reva/changelog/0.2.0_2020-04-15/fix-eos-config.md b/storage/changelog/0.2.0_2020-04-15/fix-eos-config.md similarity index 100% rename from ocis-reva/changelog/0.2.0_2020-04-15/fix-eos-config.md rename to storage/changelog/0.2.0_2020-04-15/fix-eos-config.md diff --git a/ocis-reva/changelog/0.2.0_2020-04-15/update-reva-to-20200414133413.md b/storage/changelog/0.2.0_2020-04-15/update-reva-to-20200414133413.md similarity index 100% rename from ocis-reva/changelog/0.2.0_2020-04-15/update-reva-to-20200414133413.md rename to storage/changelog/0.2.0_2020-04-15/update-reva-to-20200414133413.md diff --git a/ocis-reva/changelog/0.2.1_2020-04-28/gatewayconfig.md b/storage/changelog/0.2.1_2020-04-28/gatewayconfig.md similarity index 100% rename from ocis-reva/changelog/0.2.1_2020-04-28/gatewayconfig.md rename to storage/changelog/0.2.1_2020-04-28/gatewayconfig.md diff --git a/ocis-reva/changelog/0.2.1_2020-04-28/reva-ocis-logger.md b/storage/changelog/0.2.1_2020-04-28/reva-ocis-logger.md similarity index 100% rename from ocis-reva/changelog/0.2.1_2020-04-28/reva-ocis-logger.md rename to storage/changelog/0.2.1_2020-04-28/reva-ocis-logger.md diff --git a/ocis-reva/changelog/0.2.1_2020-04-28/unadvertise-chunking-v2.md b/storage/changelog/0.2.1_2020-04-28/unadvertise-chunking-v2.md similarity index 100% rename from ocis-reva/changelog/0.2.1_2020-04-28/unadvertise-chunking-v2.md rename to storage/changelog/0.2.1_2020-04-28/unadvertise-chunking-v2.md diff --git a/ocis-reva/changelog/0.3.0_2020-05-20/update-reva-to-20200518061204.md b/storage/changelog/0.3.0_2020-05-20/update-reva-to-20200518061204.md similarity index 100% rename from ocis-reva/changelog/0.3.0_2020-05-20/update-reva-to-20200518061204.md rename to storage/changelog/0.3.0_2020-05-20/update-reva-to-20200518061204.md diff --git a/ocis-reva/changelog/0.4.0_2020-05-29/public-shares.md b/storage/changelog/0.4.0_2020-05-29/public-shares.md similarity index 100% rename from ocis-reva/changelog/0.4.0_2020-05-29/public-shares.md rename to storage/changelog/0.4.0_2020-05-29/public-shares.md diff --git a/ocis-reva/changelog/0.4.0_2020-05-29/update-reva-to-20200529120551.md b/storage/changelog/0.4.0_2020-05-29/update-reva-to-20200529120551.md similarity index 100% rename from ocis-reva/changelog/0.4.0_2020-05-29/update-reva-to-20200529120551.md rename to storage/changelog/0.4.0_2020-05-29/update-reva-to-20200529120551.md diff --git a/ocis-reva/changelog/0.5.0_2020-06-04/add-tus-global-capabilities.md b/storage/changelog/0.5.0_2020-06-04/add-tus-global-capabilities.md similarity index 100% rename from ocis-reva/changelog/0.5.0_2020-06-04/add-tus-global-capabilities.md rename to storage/changelog/0.5.0_2020-06-04/add-tus-global-capabilities.md diff --git a/ocis-reva/changelog/0.5.0_2020-06-04/update-reva-to-20200603071553.md b/storage/changelog/0.5.0_2020-06-04/update-reva-to-20200603071553.md similarity index 100% rename from ocis-reva/changelog/0.5.0_2020-06-04/update-reva-to-20200603071553.md rename to storage/changelog/0.5.0_2020-06-04/update-reva-to-20200603071553.md diff --git a/ocis-reva/changelog/0.6.0_2020-06-24/update-reva-to-20200624.md b/storage/changelog/0.6.0_2020-06-24/update-reva-to-20200624.md similarity index 100% rename from ocis-reva/changelog/0.6.0_2020-06-24/update-reva-to-20200624.md rename to storage/changelog/0.6.0_2020-06-24/update-reva-to-20200624.md diff --git a/ocis-reva/changelog/0.7.0_2020-06-26/update-reva-to-20200625.md b/storage/changelog/0.7.0_2020-06-26/update-reva-to-20200625.md similarity index 100% rename from ocis-reva/changelog/0.7.0_2020-06-26/update-reva-to-20200625.md rename to storage/changelog/0.7.0_2020-06-26/update-reva-to-20200625.md diff --git a/ocis-reva/changelog/0.8.0_2020-06-29/update-reva-to-20200629.md b/storage/changelog/0.8.0_2020-06-29/update-reva-to-20200629.md similarity index 100% rename from ocis-reva/changelog/0.8.0_2020-06-29/update-reva-to-20200629.md rename to storage/changelog/0.8.0_2020-06-29/update-reva-to-20200629.md diff --git a/ocis-reva/changelog/0.9.0_2020-07-01/allow-datagateway-transfers-24h.md b/storage/changelog/0.9.0_2020-07-01/allow-datagateway-transfers-24h.md similarity index 100% rename from ocis-reva/changelog/0.9.0_2020-07-01/allow-datagateway-transfers-24h.md rename to storage/changelog/0.9.0_2020-07-01/allow-datagateway-transfers-24h.md diff --git a/ocis-reva/changelog/0.9.0_2020-07-01/update-reva-to-20200630.md b/storage/changelog/0.9.0_2020-07-01/update-reva-to-20200630.md similarity index 100% rename from ocis-reva/changelog/0.9.0_2020-07-01/update-reva-to-20200630.md rename to storage/changelog/0.9.0_2020-07-01/update-reva-to-20200630.md diff --git a/ocis-reva/changelog/0.9.0_2020-07-01/update-reva-to-20200701.md b/storage/changelog/0.9.0_2020-07-01/update-reva-to-20200701.md similarity index 100% rename from ocis-reva/changelog/0.9.0_2020-07-01/update-reva-to-20200701.md rename to storage/changelog/0.9.0_2020-07-01/update-reva-to-20200701.md diff --git a/ocis-reva/changelog/0.9.1_2020-07-02/new-config-options b/storage/changelog/0.9.1_2020-07-02/new-config-options similarity index 100% rename from ocis-reva/changelog/0.9.1_2020-07-02/new-config-options rename to storage/changelog/0.9.1_2020-07-02/new-config-options diff --git a/ocis-reva/changelog/CHANGELOG.tmpl b/storage/changelog/CHANGELOG.tmpl similarity index 100% rename from ocis-reva/changelog/CHANGELOG.tmpl rename to storage/changelog/CHANGELOG.tmpl diff --git a/ocis-reva/changelog/README.md b/storage/changelog/README.md similarity index 100% rename from ocis-reva/changelog/README.md rename to storage/changelog/README.md diff --git a/ocis-reva/changelog/TEMPLATE b/storage/changelog/TEMPLATE similarity index 100% rename from ocis-reva/changelog/TEMPLATE rename to storage/changelog/TEMPLATE diff --git a/ocis-reva/changelog/unreleased/.keep b/storage/changelog/unreleased/.keep similarity index 100% rename from ocis-reva/changelog/unreleased/.keep rename to storage/changelog/unreleased/.keep diff --git a/ocis-reva/changelog/unreleased/enable-treetime-accounting.md b/storage/changelog/unreleased/enable-treetime-accounting.md similarity index 100% rename from ocis-reva/changelog/unreleased/enable-treetime-accounting.md rename to storage/changelog/unreleased/enable-treetime-accounting.md diff --git a/ocis-reva/changelog/unreleased/metadata-storage.md b/storage/changelog/unreleased/metadata-storage.md similarity index 100% rename from ocis-reva/changelog/unreleased/metadata-storage.md rename to storage/changelog/unreleased/metadata-storage.md diff --git a/ocis-reva/changelog/unreleased/update-reva-to-20200924.md b/storage/changelog/unreleased/update-reva-to-20200924.md similarity index 100% rename from ocis-reva/changelog/unreleased/update-reva-to-20200924.md rename to storage/changelog/unreleased/update-reva-to-20200924.md diff --git a/ocis-reva/cmd/ocis-reva/main.go b/storage/cmd/storage/main.go similarity index 68% rename from ocis-reva/cmd/ocis-reva/main.go rename to storage/cmd/storage/main.go index 6f98e4b3c7..18cccfe879 100644 --- a/ocis-reva/cmd/ocis-reva/main.go +++ b/storage/cmd/storage/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/owncloud/ocis/ocis-reva/pkg/command" + "github.com/owncloud/ocis/storage/pkg/command" ) func main() { diff --git a/ocis-reva/composer.json b/storage/composer.json similarity index 100% rename from ocis-reva/composer.json rename to storage/composer.json diff --git a/ocis-reva/config/example.json b/storage/config/example.json similarity index 100% rename from ocis-reva/config/example.json rename to storage/config/example.json diff --git a/ocis-reva/config/example.yml b/storage/config/example.yml similarity index 100% rename from ocis-reva/config/example.yml rename to storage/config/example.yml diff --git a/ocis-reva/docker/Dockerfile.linux.amd64 b/storage/docker/Dockerfile.linux.amd64 similarity index 100% rename from ocis-reva/docker/Dockerfile.linux.amd64 rename to storage/docker/Dockerfile.linux.amd64 diff --git a/ocis-reva/docker/Dockerfile.linux.arm b/storage/docker/Dockerfile.linux.arm similarity index 100% rename from ocis-reva/docker/Dockerfile.linux.arm rename to storage/docker/Dockerfile.linux.arm diff --git a/ocis-reva/docker/Dockerfile.linux.arm64 b/storage/docker/Dockerfile.linux.arm64 similarity index 100% rename from ocis-reva/docker/Dockerfile.linux.arm64 rename to storage/docker/Dockerfile.linux.arm64 diff --git a/ocis-reva/docker/manifest.tmpl b/storage/docker/manifest.tmpl similarity index 100% rename from ocis-reva/docker/manifest.tmpl rename to storage/docker/manifest.tmpl diff --git a/ocis-reva/go.mod b/storage/go.mod similarity index 92% rename from ocis-reva/go.mod rename to storage/go.mod index a2ffb75aed..c16b7b8f59 100644 --- a/ocis-reva/go.mod +++ b/storage/go.mod @@ -1,4 +1,4 @@ -module github.com/owncloud/ocis/ocis-reva +module github.com/owncloud/ocis/storage go 1.13 diff --git a/ocis-reva/go.sum b/storage/go.sum similarity index 100% rename from ocis-reva/go.sum rename to storage/go.sum diff --git a/ocis-reva/pkg/command/authbasic.go b/storage/pkg/command/authbasic.go similarity index 91% rename from ocis-reva/pkg/command/authbasic.go rename to storage/pkg/command/authbasic.go index f5d600eb8e..fa3f983648 100644 --- a/ocis-reva/pkg/command/authbasic.go +++ b/storage/pkg/command/authbasic.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // AuthBasic is the entrypoint for the auth-basic command. func AuthBasic(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "auth-basic", - Usage: "Start reva authprovider for basic auth", + Usage: "Start authprovider for basic auth", Flags: flagset.AuthBasicWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.AuthBasic.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func AuthBasic(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/authbearer.go b/storage/pkg/command/authbearer.go similarity index 90% rename from ocis-reva/pkg/command/authbearer.go rename to storage/pkg/command/authbearer.go index a1807342f9..1339766ae7 100644 --- a/ocis-reva/pkg/command/authbearer.go +++ b/storage/pkg/command/authbearer.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // AuthBearer is the entrypoint for the auth-bearer command. func AuthBearer(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "auth-bearer", - Usage: "Start reva authprovider for bearer auth", + Usage: "Start authprovider for bearer auth", Flags: flagset.AuthBearerWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.AuthBearer.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func AuthBearer(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/drivers.go b/storage/pkg/command/drivers.go similarity index 99% rename from ocis-reva/pkg/command/drivers.go rename to storage/pkg/command/drivers.go index 5acd18bc0e..fc4025d6cb 100644 --- a/ocis-reva/pkg/command/drivers.go +++ b/storage/pkg/command/drivers.go @@ -1,7 +1,7 @@ package command import ( - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) func drivers(cfg *config.Config) map[string]interface{} { diff --git a/ocis-reva/pkg/command/frontend.go b/storage/pkg/command/frontend.go similarity index 96% rename from ocis-reva/pkg/command/frontend.go rename to storage/pkg/command/frontend.go index bba097f353..bdc06a40ab 100644 --- a/ocis-reva/pkg/command/frontend.go +++ b/storage/pkg/command/frontend.go @@ -13,16 +13,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // Frontend is the entrypoint for the frontend command. func Frontend(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "frontend", - Usage: "Start reva frontend service", + Usage: "Start frontend service", Flags: flagset.FrontendWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.Frontend.Services = c.StringSlice("service") @@ -42,7 +42,7 @@ func Frontend(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). @@ -127,7 +127,7 @@ func Frontend(cfg *config.Config) *cli.Command { }, "ocdav": map[string]interface{}{ "prefix": cfg.Reva.Frontend.OCDavPrefix, - "chunk_folder": "/var/tmp/reva/chunks", + "chunk_folder": "/var/tmp/ocis/chunks", "files_namespace": cfg.Reva.OCDav.DavFilesNamespace, "webdav_namespace": cfg.Reva.OCDav.WebdavNamespace, "timeout": 86400, diff --git a/ocis-reva/pkg/command/gateway.go b/storage/pkg/command/gateway.go similarity index 95% rename from ocis-reva/pkg/command/gateway.go rename to storage/pkg/command/gateway.go index 513367dae1..ebf6c12184 100644 --- a/ocis-reva/pkg/command/gateway.go +++ b/storage/pkg/command/gateway.go @@ -12,17 +12,17 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" - "github.com/owncloud/ocis/ocis-reva/pkg/service/external" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/service/external" ) // Gateway is the entrypoint for the gateway command. func Gateway(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "gateway", - Usage: "Start reva gateway", + Usage: "Start gateway", Flags: flagset.GatewayWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.Gateway.Services = c.StringSlice("service") @@ -43,7 +43,7 @@ func Gateway(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). @@ -140,7 +140,7 @@ func Gateway(cfg *config.Config) *cli.Command { gr.Add(func() error { err := external.RegisterGRPCEndpoint( ctx, - "com.owncloud.reva", + "com.owncloud.storage", uuid.String(), cfg.Reva.Gateway.Addr, logger, diff --git a/ocis-reva/pkg/command/health.go b/storage/pkg/command/health.go similarity index 89% rename from ocis-reva/pkg/command/health.go rename to storage/pkg/command/health.go index 12217ce6be..d05bff4863 100644 --- a/ocis-reva/pkg/command/health.go +++ b/storage/pkg/command/health.go @@ -5,8 +5,8 @@ import ( "net/http" "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" ) // Health is the entrypoint for the health command. diff --git a/ocis-reva/pkg/command/root.go b/storage/pkg/command/root.go similarity index 85% rename from ocis-reva/pkg/command/root.go rename to storage/pkg/command/root.go index add5d853fa..d6abe0acf9 100644 --- a/ocis-reva/pkg/command/root.go +++ b/storage/pkg/command/root.go @@ -6,20 +6,20 @@ import ( "github.com/micro/cli/v2" "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/version" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/version" "github.com/spf13/viper" ) -// Execute is the entry point for the ocis-reva command. +// Execute is the entry point for the storage command. func Execute() error { cfg := config.New() app := &cli.App{ - Name: "ocis-reva", + Name: "storage", Version: version.String, - Usage: "Example service for Reva/oCIS", + Usage: "Storage service for oCIS", Compiled: version.Compiled(), Authors: []*cli.Author{ @@ -35,13 +35,13 @@ func Execute() error { logger := NewLogger(cfg) viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - viper.SetEnvPrefix("REVA") + viper.SetEnvPrefix("STORAGE") viper.AutomaticEnv() if c.IsSet("config-file") { viper.SetConfigFile(c.String("config-file")) } else { - viper.SetConfigName("reva") + viper.SetConfigName("storage") viper.AddConfigPath("/etc/ocis") viper.AddConfigPath("$HOME/.ocis") @@ -109,7 +109,7 @@ func Execute() error { // NewLogger initializes a service-specific logger instance. func NewLogger(cfg *config.Config) log.Logger { return log.NewLogger( - log.Name("reva"), + log.Name("storage"), log.Level(cfg.Log.Level), log.Pretty(cfg.Log.Pretty), log.Color(cfg.Log.Color), diff --git a/ocis-reva/pkg/command/sharing.go b/storage/pkg/command/sharing.go similarity index 93% rename from ocis-reva/pkg/command/sharing.go rename to storage/pkg/command/sharing.go index 101542b54a..8605a3a55a 100644 --- a/ocis-reva/pkg/command/sharing.go +++ b/storage/pkg/command/sharing.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // Sharing is the entrypoint for the sharing command. func Sharing(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "sharing", - Usage: "Start reva sharing service", + Usage: "Start sharing service", Flags: flagset.SharingWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.Sharing.Services = c.StringSlice("service") @@ -40,7 +40,7 @@ func Sharing(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storageeos.go b/storage/pkg/command/storageeos.go similarity index 90% rename from ocis-reva/pkg/command/storageeos.go rename to storage/pkg/command/storageeos.go index 6a7651dea2..a28630d88c 100644 --- a/ocis-reva/pkg/command/storageeos.go +++ b/storage/pkg/command/storageeos.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageEOS is the entrypoint for the storage-eos command. func StorageEOS(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-eos", - Usage: "Start reva storage-eos service", + Usage: "Start storage-eos service", Flags: flagset.StorageEOSWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageEOS.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func StorageEOS(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/storageeosdata.go b/storage/pkg/command/storageeosdata.go similarity index 93% rename from ocis-reva/pkg/command/storageeosdata.go rename to storage/pkg/command/storageeosdata.go index 6db4076dc7..2c288ed9d5 100644 --- a/ocis-reva/pkg/command/storageeosdata.go +++ b/storage/pkg/command/storageeosdata.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageEOSData is the entrypoint for the storage-oc-data command. func StorageEOSData(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-eos-data", - Usage: "Start reva storage-eos-data service", + Usage: "Start storage-eos-data service", Flags: flagset.StorageEOSDataWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageEOSData.Services = c.StringSlice("service") @@ -40,7 +40,7 @@ func StorageEOSData(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storagehome.go b/storage/pkg/command/storagehome.go similarity index 91% rename from ocis-reva/pkg/command/storagehome.go rename to storage/pkg/command/storagehome.go index 939b4e5e62..edfa592404 100644 --- a/ocis-reva/pkg/command/storagehome.go +++ b/storage/pkg/command/storagehome.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageHome is the entrypoint for the storage-home command. func StorageHome(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-home", - Usage: "Start reva storage-home service", + Usage: "Start storage-home service", Flags: flagset.StorageHomeWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageHome.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func StorageHome(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/storagehomedata.go b/storage/pkg/command/storagehomedata.go similarity index 91% rename from ocis-reva/pkg/command/storagehomedata.go rename to storage/pkg/command/storagehomedata.go index 2d8eb8049f..063f759260 100644 --- a/ocis-reva/pkg/command/storagehomedata.go +++ b/storage/pkg/command/storagehomedata.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageHomeData is the entrypoint for the storage-home-data command. func StorageHomeData(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-home-data", - Usage: "Start reva storage-home-data service", + Usage: "Start storage-home-data service", Flags: flagset.StorageHomeDataWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageHomeData.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func StorageHomeData(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/storagemetadata.go b/storage/pkg/command/storagemetadata.go similarity index 92% rename from ocis-reva/pkg/command/storagemetadata.go rename to storage/pkg/command/storagemetadata.go index 00fa13de6b..1edd5e1de8 100644 --- a/ocis-reva/pkg/command/storagemetadata.go +++ b/storage/pkg/command/storagemetadata.go @@ -11,18 +11,18 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) -// StorageMetadata the entrypoint for the reva-storage-metadata command. +// StorageMetadata the entrypoint for the storage-storage-metadata command. // // It provides a ocis-specific storage store metadata (shares,account,settings...) func StorageMetadata(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "reva-storage-metadata", - Usage: "Start reva storage-metadata service", + Name: "storage-metadata", + Usage: "Start storage-metadata service", Flags: flagset.StorageMetadata(cfg), Category: "Extensions", Before: func(c *cli.Context) error { @@ -48,7 +48,7 @@ func StorageMetadata(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storageoc.go b/storage/pkg/command/storageoc.go similarity index 93% rename from ocis-reva/pkg/command/storageoc.go rename to storage/pkg/command/storageoc.go index 4a05a6663a..5a869129b3 100644 --- a/ocis-reva/pkg/command/storageoc.go +++ b/storage/pkg/command/storageoc.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageOC is the entrypoint for the storage-oc command. func StorageOC(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-oc", - Usage: "Start reva storage-oc service", + Usage: "Start storage-oc service", Flags: flagset.StorageOCWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageOC.Services = c.StringSlice("service") @@ -40,7 +40,7 @@ func StorageOC(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storageocdata.go b/storage/pkg/command/storageocdata.go similarity index 93% rename from ocis-reva/pkg/command/storageocdata.go rename to storage/pkg/command/storageocdata.go index 7ab64334fc..a91b3bc0f3 100644 --- a/ocis-reva/pkg/command/storageocdata.go +++ b/storage/pkg/command/storageocdata.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageOCData is the entrypoint for the storage-oc-data command. func StorageOCData(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-oc-data", - Usage: "Start reva storage-oc-data service", + Usage: "Start storage-oc-data service", Flags: flagset.StorageOCDataWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageOCData.Services = c.StringSlice("service") @@ -40,7 +40,7 @@ func StorageOCData(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storagepubliclink.go b/storage/pkg/command/storagepubliclink.go similarity index 92% rename from ocis-reva/pkg/command/storagepubliclink.go rename to storage/pkg/command/storagepubliclink.go index b8eb41c2a5..0a962ec206 100644 --- a/ocis-reva/pkg/command/storagepubliclink.go +++ b/storage/pkg/command/storagepubliclink.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StoragePublicLink is the entrypoint for the reva-storage-public-link command. func StoragePublicLink(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "reva-storage-public-link", - Usage: "Start reva storage-public-link service", + Name: "storage-public-link", + Usage: "Start storage-public-link service", Flags: flagset.StoragePublicLink(cfg), Category: "Extensions", Action: func(c *cli.Context) error { @@ -36,7 +36,7 @@ func StoragePublicLink(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/command/storageroot.go b/storage/pkg/command/storageroot.go similarity index 90% rename from ocis-reva/pkg/command/storageroot.go rename to storage/pkg/command/storageroot.go index 8b6b808ec5..7fa81c6ebc 100644 --- a/ocis-reva/pkg/command/storageroot.go +++ b/storage/pkg/command/storageroot.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // StorageRoot is the entrypoint for the storage-root command. func StorageRoot(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "storage-root", - Usage: "Start reva storage-root service", + Usage: "Start storage-root service", Flags: flagset.StorageRootWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.StorageRoot.Services = c.StringSlice("service") @@ -35,17 +35,17 @@ func StorageRoot(cfg *config.Config) *cli.Command { case "agent": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). Str("type", t). - Msg("Reva only supports the jaeger tracing backend") + Msg("Storage only supports the jaeger tracing backend") default: logger.Warn(). diff --git a/ocis-reva/pkg/command/users.go b/storage/pkg/command/users.go similarity index 95% rename from ocis-reva/pkg/command/users.go rename to storage/pkg/command/users.go index 6b7f701b80..28f3e6b115 100644 --- a/ocis-reva/pkg/command/users.go +++ b/storage/pkg/command/users.go @@ -11,16 +11,16 @@ import ( "github.com/gofrs/uuid" "github.com/micro/cli/v2" "github.com/oklog/run" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/flagset" - "github.com/owncloud/ocis/ocis-reva/pkg/server/debug" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/flagset" + "github.com/owncloud/ocis/storage/pkg/server/debug" ) // Users is the entrypoint for the sharing command. func Users(cfg *config.Config) *cli.Command { return &cli.Command{ Name: "users", - Usage: "Start reva users service", + Usage: "Start users service", Flags: flagset.UsersWithConfig(cfg), Before: func(c *cli.Context) error { cfg.Reva.Users.Services = c.StringSlice("service") @@ -40,7 +40,7 @@ func Users(cfg *config.Config) *cli.Command { case "jaeger": logger.Info(). Str("type", t). - Msg("configuring reva to use the jaeger tracing backend") + Msg("configuring storage to use the jaeger tracing backend") case "zipkin": logger.Error(). diff --git a/ocis-reva/pkg/config/config.go b/storage/pkg/config/config.go similarity index 100% rename from ocis-reva/pkg/config/config.go rename to storage/pkg/config/config.go diff --git a/ocis-reva/pkg/flagset/authbasic.go b/storage/pkg/flagset/authbasic.go similarity index 68% rename from ocis-reva/pkg/flagset/authbasic.go rename to storage/pkg/flagset/authbasic.go index d32c29790f..75d5b04baf 100644 --- a/ocis-reva/pkg/flagset/authbasic.go +++ b/storage/pkg/flagset/authbasic.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // AuthBasicWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9147", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_AUTH_BASIC_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_AUTH_BASIC_DEBUG_ADDR"}, Destination: &cfg.Reva.AuthBasic.DebugAddr, }, @@ -24,14 +24,14 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag { Name: "auth-driver", Value: "ldap", Usage: "auth driver: 'demo', 'json' or 'ldap'", - EnvVars: []string{"REVA_AUTH_DRIVER"}, + EnvVars: []string{"STORAGE_AUTH_DRIVER"}, Destination: &cfg.Reva.AuthProvider.Driver, }, &cli.StringFlag{ Name: "auth-json", Value: "", Usage: "Path to users.json file", - EnvVars: []string{"REVA_AUTH_JSON"}, + EnvVars: []string{"STORAGE_AUTH_JSON"}, Destination: &cfg.Reva.AuthProvider.JSON, }, @@ -42,36 +42,36 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_AUTH_BASIC_NETWORK"}, + Usage: "Network to use for the storage auth-basic service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_AUTH_BASIC_NETWORK"}, Destination: &cfg.Reva.AuthBasic.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_AUTH_BASIC_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_AUTH_BASIC_PROTOCOL"}, Destination: &cfg.Reva.AuthBasic.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9146", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_AUTH_BASIC_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_AUTH_BASIC_ADDR"}, Destination: &cfg.Reva.AuthBasic.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9146", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_AUTH_BASIC_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_AUTH_BASIC_URL"}, Destination: &cfg.Reva.AuthBasic.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("authprovider"), Usage: "--service authprovider [--service otherservice]", - EnvVars: []string{"REVA_AUTH_BASIC_SERVICES"}, + EnvVars: []string{"STORAGE_AUTH_BASIC_SERVICES"}, }, } diff --git a/ocis-reva/pkg/flagset/authbearer.go b/storage/pkg/flagset/authbearer.go similarity index 70% rename from ocis-reva/pkg/flagset/authbearer.go rename to storage/pkg/flagset/authbearer.go index 65c2bb33d3..0c6edf4088 100644 --- a/ocis-reva/pkg/flagset/authbearer.go +++ b/storage/pkg/flagset/authbearer.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // AuthBearerWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9149", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_AUTH_BEARER_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_AUTH_BEARER_DEBUG_ADDR"}, Destination: &cfg.Reva.AuthBearer.DebugAddr, }, @@ -24,14 +24,14 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { Name: "oidc-issuer", Value: "https://localhost:9200", Usage: "OIDC issuer", - EnvVars: []string{"REVA_OIDC_ISSUER"}, + EnvVars: []string{"STORAGE_OIDC_ISSUER"}, Destination: &cfg.Reva.OIDC.Issuer, }, &cli.BoolFlag{ Name: "oidc-insecure", Value: true, Usage: "OIDC allow insecure communication", - EnvVars: []string{"REVA_OIDC_INSECURE"}, + EnvVars: []string{"STORAGE_OIDC_INSECURE"}, Destination: &cfg.Reva.OIDC.Insecure, }, &cli.StringFlag{ @@ -40,25 +40,25 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { // the user manager needs to take care of the sub to user metadata lookup, which ldap cannot do // TODO sub is stable and defined as unique. // AFAICT we want to use the account id from ocis-accounts - // TODO add an ocis middleware to reva that changes the users opaqueid? + // TODO add an ocis middleware to storage that changes the users opaqueid? // TODO add an ocis-accounts backed user manager Value: "preferred_username", Usage: "OIDC id claim", - EnvVars: []string{"REVA_OIDC_ID_CLAIM"}, + EnvVars: []string{"STORAGE_OIDC_ID_CLAIM"}, Destination: &cfg.Reva.OIDC.IDClaim, }, &cli.StringFlag{ Name: "oidc-uid-claim", Value: "", Usage: "OIDC uid claim", - EnvVars: []string{"REVA_OIDC_UID_CLAIM"}, + EnvVars: []string{"STORAGE_OIDC_UID_CLAIM"}, Destination: &cfg.Reva.OIDC.UIDClaim, }, &cli.StringFlag{ Name: "oidc-gid-claim", Value: "", Usage: "OIDC gid claim", - EnvVars: []string{"REVA_OIDC_GID_CLAIM"}, + EnvVars: []string{"STORAGE_OIDC_GID_CLAIM"}, Destination: &cfg.Reva.OIDC.GIDClaim, }, @@ -69,36 +69,36 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_AUTH_BEARER_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_AUTH_BEARER_NETWORK"}, Destination: &cfg.Reva.AuthBearer.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_AUTH_BEARER_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_AUTH_BEARER_PROTOCOL"}, Destination: &cfg.Reva.AuthBearer.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9148", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_AUTH_BEARER_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_AUTH_BEARER_ADDR"}, Destination: &cfg.Reva.AuthBearer.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9148", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_AUTH_BEARER_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_AUTH_BEARER_URL"}, Destination: &cfg.Reva.AuthBearer.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("authprovider"), // TODO preferences Usage: "--service authprovider [--service otherservice]", - EnvVars: []string{"REVA_AUTH_BEARER_SERVICES"}, + EnvVars: []string{"STORAGE_AUTH_BEARER_SERVICES"}, }, } diff --git a/ocis-reva/pkg/flagset/debug.go b/storage/pkg/flagset/debug.go similarity index 76% rename from ocis-reva/pkg/flagset/debug.go rename to storage/pkg/flagset/debug.go index 7b29a96981..b0cc5bd658 100644 --- a/ocis-reva/pkg/flagset/debug.go +++ b/storage/pkg/flagset/debug.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // DebugWithConfig applies common debug config cfg to the flagset @@ -12,19 +12,19 @@ func DebugWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-token", Value: "", Usage: "Token to grant metrics access", - EnvVars: []string{"REVA_DEBUG_TOKEN"}, + EnvVars: []string{"STORAGE_DEBUG_TOKEN"}, Destination: &cfg.Debug.Token, }, &cli.BoolFlag{ Name: "debug-pprof", Usage: "Enable pprof debugging", - EnvVars: []string{"REVA_DEBUG_PPROF"}, + EnvVars: []string{"STORAGE_DEBUG_PPROF"}, Destination: &cfg.Debug.Pprof, }, &cli.BoolFlag{ Name: "debug-zpages", Usage: "Enable zpages debugging", - EnvVars: []string{"REVA_DEBUG_ZPAGES"}, + EnvVars: []string{"STORAGE_DEBUG_ZPAGES"}, Destination: &cfg.Debug.Zpages, }, } diff --git a/ocis-reva/pkg/flagset/drivereos.go b/storage/pkg/flagset/drivereos.go similarity index 76% rename from ocis-reva/pkg/flagset/drivereos.go rename to storage/pkg/flagset/drivereos.go index c064a0a19b..8cbab46b96 100644 --- a/ocis-reva/pkg/flagset/drivereos.go +++ b/storage/pkg/flagset/drivereos.go @@ -4,7 +4,7 @@ import ( "os" "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // DriverEOSWithConfig applies cfg to the root flagset @@ -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{"REVA_STORAGE_EOS_NAMESPACE"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SHADOW_NAMESPACE"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SHARE_FOLDER"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_BINARY"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_XRDCOPY_BINARY"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_MASTER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SLAVE_URL"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_CACHE_DIRECTORY"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_ENABLE_LOGGING"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SHOW_HIDDEN_SYSFILES"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_FORCE_SINGLEUSER_MODE"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_USE_KEYTAB"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_ENABLE_HOME"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SEC_PROTOCOL"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_KEYTAB"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_SINGLE_USERNAME"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_EOS_LAYOUT"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_LAYOUT"}, Destination: &cfg.Reva.Storages.EOS.UserLayout, }, &cli.StringFlag{ Name: "storage-eos-gatewaysvc", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_STORAGE_EOS_GATEWAYSVC"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_STORAGE_EOS_GATEWAYSVC"}, Destination: &cfg.Reva.Storages.EOS.GatewaySVC, }, } diff --git a/ocis-reva/pkg/flagset/driverlocal.go b/storage/pkg/flagset/driverlocal.go similarity index 71% rename from ocis-reva/pkg/flagset/driverlocal.go rename to storage/pkg/flagset/driverlocal.go index 9f174687c3..1bb159f90a 100644 --- a/ocis-reva/pkg/flagset/driverlocal.go +++ b/storage/pkg/flagset/driverlocal.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // DriverLocalWithConfig applies cfg to the root flagset @@ -10,9 +10,9 @@ func DriverLocalWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "storage-local-root", - Value: "/var/tmp/reva/root", + Value: "/var/tmp/ocis/local", Usage: "the path to the local storage root", - EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"}, + EnvVars: []string{"STORAGE_STORAGE_LOCAL_ROOT"}, Destination: &cfg.Reva.Storages.Local.Root, }, } diff --git a/ocis-reva/pkg/flagset/driverocis.go b/storage/pkg/flagset/driverocis.go similarity index 78% rename from ocis-reva/pkg/flagset/driverocis.go rename to storage/pkg/flagset/driverocis.go index 17363370ce..495c9e9a43 100644 --- a/ocis-reva/pkg/flagset/driverocis.go +++ b/storage/pkg/flagset/driverocis.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // DriverOCISWithConfig applies cfg to the root flagset @@ -10,23 +10,23 @@ func DriverOCISWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "storage-ocis-root", - Value: "/var/tmp/ocis/root", + Value: "/var/tmp/ocis/storage/users", Usage: "the path to the local storage root", - EnvVars: []string{"REVA_STORAGE_OCIS_ROOT"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OCIS_ENABLE_HOME"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OCIS_LAYOUT"}, + EnvVars: []string{"STORAGE_STORAGE_OCIS_LAYOUT"}, Destination: &cfg.Reva.Storages.Common.UserLayout, }, } diff --git a/ocis-reva/pkg/flagset/driverowncloud.go b/storage/pkg/flagset/driverowncloud.go similarity index 75% rename from ocis-reva/pkg/flagset/driverowncloud.go rename to storage/pkg/flagset/driverowncloud.go index 1cb56cdeaa..44960040a9 100644 --- a/ocis-reva/pkg/flagset/driverowncloud.go +++ b/storage/pkg/flagset/driverowncloud.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // DriverOwnCloudWithConfig applies cfg to the root flagset @@ -10,51 +10,51 @@ func DriverOwnCloudWithConfig(cfg *config.Config) []cli.Flag { return []cli.Flag{ &cli.StringFlag{ Name: "storage-owncloud-datadir", - Value: "/var/tmp/reva/data", + Value: "/var/tmp/ocis/owncloud", Usage: "the path to the owncloud data directory", - EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"}, + EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_DATADIR"}, Destination: &cfg.Reva.Storages.OwnCloud.Root, }, &cli.StringFlag{ Name: "storage-owncloud-uploadinfo-dir", - Value: "/var/tmp/reva/uploadinfo", + Value: "/var/tmp/ocis/uploadinfo", Usage: "the path to the tus upload info directory", - EnvVars: []string{"REVA_STORAGE_OWNCLOUD_UPLOADINFO_DIR"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OWNCLOUD_SHARE_FOLDER"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OWNCLOUD_SCAN"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OWNCLOUD_ENABLE_HOME"}, + EnvVars: []string{"STORAGE_STORAGE_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{"REVA_STORAGE_OWNCLOUD_LAYOUT"}, + EnvVars: []string{"STORAGE_STORAGE_OWNCLOUD_LAYOUT"}, Destination: &cfg.Reva.Storages.OwnCloud.UserLayout, }, } diff --git a/ocis-reva/pkg/flagset/frontend.go b/storage/pkg/flagset/frontend.go similarity index 74% rename from ocis-reva/pkg/flagset/frontend.go rename to storage/pkg/flagset/frontend.go index 981a4788a4..6bb97ddea1 100644 --- a/ocis-reva/pkg/flagset/frontend.go +++ b/storage/pkg/flagset/frontend.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // FrontendWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9141", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_FRONTEND_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_FRONTEND_DEBUG_ADDR"}, Destination: &cfg.Reva.Frontend.DebugAddr, }, @@ -24,7 +24,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { Name: "transfer-secret", Value: "replace-me-with-a-transfer-secret", Usage: "Transfer secret for datagateway", - EnvVars: []string{"REVA_TRANSFER_SECRET"}, + EnvVars: []string{"STORAGE_TRANSFER_SECRET"}, Destination: &cfg.Reva.TransferSecret, }, @@ -55,56 +55,56 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_FRONTEND_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_FRONTEND_NETWORK"}, Destination: &cfg.Reva.Frontend.Network, }, &cli.StringFlag{ Name: "protocol", Value: "http", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_FRONTEND_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_FRONTEND_PROTOCOL"}, Destination: &cfg.Reva.Frontend.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9140", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_FRONTEND_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_FRONTEND_ADDR"}, Destination: &cfg.Reva.Frontend.Addr, }, &cli.StringFlag{ Name: "url", Value: "https://localhost:9200", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_FRONTEND_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_FRONTEND_URL"}, Destination: &cfg.Reva.Frontend.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("datagateway", "ocdav", "ocs"), Usage: "--service ocdav [--service ocs]", - EnvVars: []string{"REVA_FRONTEND_SERVICES"}, + EnvVars: []string{"STORAGE_FRONTEND_SERVICES"}, }, &cli.StringFlag{ Name: "datagateway-prefix", Value: "data", Usage: "datagateway prefix", - EnvVars: []string{"REVA_FRONTEND_DATAGATEWAY_PREFIX"}, + EnvVars: []string{"STORAGE_FRONTEND_DATAGATEWAY_PREFIX"}, Destination: &cfg.Reva.Frontend.DatagatewayPrefix, }, &cli.StringFlag{ Name: "ocdav-prefix", Value: "", Usage: "owncloud webdav endpoint prefix", - EnvVars: []string{"REVA_FRONTEND_OCDAV_PREFIX"}, + EnvVars: []string{"STORAGE_FRONTEND_OCDAV_PREFIX"}, Destination: &cfg.Reva.Frontend.OCDavPrefix, }, &cli.StringFlag{ Name: "ocs-prefix", Value: "ocs", Usage: "open collaboration services endpoint prefix", - EnvVars: []string{"REVA_FRONTEND_OCS_PREFIX"}, + EnvVars: []string{"STORAGE_FRONTEND_OCS_PREFIX"}, Destination: &cfg.Reva.Frontend.OCSPrefix, }, @@ -113,8 +113,8 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "gateway-url", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, @@ -123,21 +123,21 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { Name: "upload-disable-tus", Value: false, Usage: "Disables TUS upload mechanism", - EnvVars: []string{"REVA_FRONTEND_UPLOAD_DISABLE_TUS"}, + EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_DISABLE_TUS"}, Destination: &cfg.Reva.UploadDisableTus, }, &cli.IntFlag{ Name: "upload-max-chunk-size", Value: 0, Usage: "Max chunk size in bytes to advertise to clients through capabilities, or 0 for unlimited", - EnvVars: []string{"REVA_FRONTEND_UPLOAD_MAX_CHUNK_SIZE"}, + EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_MAX_CHUNK_SIZE"}, Destination: &cfg.Reva.UploadMaxChunkSize, }, &cli.StringFlag{ Name: "upload-http-method-override", Value: "", Usage: "Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH", - EnvVars: []string{"REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE"}, + EnvVars: []string{"STORAGE_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE"}, Destination: &cfg.Reva.UploadHTTPMethodOverride, }, } diff --git a/ocis-reva/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go similarity index 69% rename from ocis-reva/pkg/flagset/gateway.go rename to storage/pkg/flagset/gateway.go index 5c5eb1d218..4a8c8e456d 100644 --- a/ocis-reva/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // GatewayWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9143", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_GATEWAY_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_GATEWAY_DEBUG_ADDR"}, Destination: &cfg.Reva.Gateway.DebugAddr, }, @@ -24,14 +24,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Name: "transfer-secret", Value: "replace-me-with-a-transfer-secret", Usage: "Transfer secret for datagateway", - EnvVars: []string{"REVA_TRANSFER_SECRET"}, + EnvVars: []string{"STORAGE_TRANSFER_SECRET"}, Destination: &cfg.Reva.TransferSecret, }, &cli.IntFlag{ Name: "transfer-expires", Value: 24 * 60 * 60, // one day Usage: "Transfer token ttl in seconds", - EnvVars: []string{"REVA_TRANSFER_EXPIRES"}, + EnvVars: []string{"STORAGE_TRANSFER_EXPIRES"}, Destination: &cfg.Reva.TransferExpires, }, @@ -44,43 +44,43 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_GATEWAY_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_GATEWAY_NETWORK"}, Destination: &cfg.Reva.Gateway.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_GATEWAY_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_GATEWAY_PROTOCOL"}, Destination: &cfg.Reva.Gateway.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9142", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_GATEWAY_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_GATEWAY_ADDR"}, Destination: &cfg.Reva.Gateway.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9142", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("gateway", "authregistry", "storageregistry"), // TODO appregistry Usage: "--service gateway [--service authregistry]", - EnvVars: []string{"REVA_GATEWAY_SERVICES"}, + EnvVars: []string{"STORAGE_GATEWAY_SERVICES"}, }, &cli.BoolFlag{ Name: "commit-share-to-storage-grant", Value: true, // TODO clarify Usage: "Commit shares to the share manager", - EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"}, + EnvVars: []string{"STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"}, Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant, }, &cli.BoolFlag{ @@ -88,20 +88,20 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Value: true, // TODO clarify Usage: "Commit shares to the storage", - EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"}, + EnvVars: []string{"STORAGE_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"}, Destination: &cfg.Reva.Gateway.CommitShareToStorageRef, }, &cli.StringFlag{ Name: "share-folder", Value: "Shares", Usage: "mount shares in this folder of the home storage provider", - EnvVars: []string{"REVA_GATEWAY_SHARE_FOLDER"}, + EnvVars: []string{"STORAGE_GATEWAY_SHARE_FOLDER"}, Destination: &cfg.Reva.Gateway.ShareFolder, }, &cli.BoolFlag{ Name: "disable-home-creation-on-login", Usage: "Disable creation of home folder on login", - EnvVars: []string{"REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"}, + EnvVars: []string{"STORAGE_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"}, Destination: &cfg.Reva.Gateway.DisableHomeCreationOnLogin, }, @@ -113,152 +113,152 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Name: "storage-registry-driver", Value: "static", Usage: "driver of the storage registry", - EnvVars: []string{"REVA_STORAGE_REGISTRY_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_REGISTRY_DRIVER"}, Destination: &cfg.Reva.StorageRegistry.Driver, }, &cli.StringSliceFlag{ Name: "storage-registry-rule", Value: cli.NewStringSlice(), Usage: `Replaces the generated storage registry rules with this set: --storage-registry-rule "/eos=localhost:9158" [--storage-registry-rule "1284d238-aa92-42ce-bdc4-0b0000009162=localhost:9162"]`, - EnvVars: []string{"REVA_STORAGE_REGISTRY_RULES"}, + EnvVars: []string{"STORAGE_STORAGE_REGISTRY_RULES"}, }, &cli.StringFlag{ Name: "storage-home-provider", Value: "/home", Usage: "mount point of the storage provider for user homes in the global namespace", - EnvVars: []string{"REVA_STORAGE_HOME_PROVIDER"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_PROVIDER"}, Destination: &cfg.Reva.StorageRegistry.HomeProvider, }, &cli.StringFlag{ Name: "frontend-url", Value: "https://localhost:9200", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_FRONTEND_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_FRONTEND_URL"}, Destination: &cfg.Reva.Frontend.URL, }, &cli.StringFlag{ Name: "datagateway-url", Value: "https://localhost:9200/data", - Usage: "URL to use for the reva datagateway", - EnvVars: []string{"REVA_DATAGATEWAY_URL"}, + Usage: "URL to use for the storage datagateway", + EnvVars: []string{"STORAGE_DATAGATEWAY_URL"}, Destination: &cfg.Reva.DataGateway.URL, }, &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, &cli.StringFlag{ Name: "auth-basic-url", Value: "localhost:9146", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_AUTH_BASIC_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_AUTH_BASIC_URL"}, Destination: &cfg.Reva.AuthBasic.URL, }, &cli.StringFlag{ Name: "auth-bearer-url", Value: "localhost:9148", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_AUTH_BEARER_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_AUTH_BEARER_URL"}, Destination: &cfg.Reva.AuthBearer.URL, }, &cli.StringFlag{ Name: "sharing-url", Value: "localhost:9150", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_SHARING_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_SHARING_URL"}, Destination: &cfg.Reva.Sharing.URL, }, &cli.StringFlag{ Name: "storage-root-url", Value: "localhost:9152", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_ROOT_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"}, Destination: &cfg.Reva.StorageRoot.URL, }, &cli.StringFlag{ Name: "storage-root-mount-path", Value: "/", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"}, Destination: &cfg.Reva.StorageRoot.MountPath, }, &cli.StringFlag{ Name: "storage-root-mount-id", Value: "1284d238-aa92-42ce-bdc4-0b0000009152", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"}, Destination: &cfg.Reva.StorageRoot.MountID, }, &cli.StringFlag{ Name: "storage-home-url", Value: "localhost:9154", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_HOME_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_HOME_URL"}, Destination: &cfg.Reva.StorageHome.URL, }, &cli.StringFlag{ Name: "storage-home-mount-path", Value: "/home", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_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{"REVA_STORAGE_HOME_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"}, Destination: &cfg.Reva.StorageHome.MountID, }, &cli.StringFlag{ Name: "storage-eos-url", Value: "localhost:9158", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_EOS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_EOS_URL"}, Destination: &cfg.Reva.StorageEOS.URL, }, &cli.StringFlag{ Name: "storage-eos-mount-path", Value: "/eos", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"}, Destination: &cfg.Reva.StorageEOS.MountPath, }, &cli.StringFlag{ Name: "storage-eos-mount-id", Value: "1284d238-aa92-42ce-bdc4-0b0000009158", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"}, Destination: &cfg.Reva.StorageEOS.MountID, }, &cli.StringFlag{ Name: "storage-oc-url", Value: "localhost:9162", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_OC_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_OC_URL"}, Destination: &cfg.Reva.StorageOC.URL, }, &cli.StringFlag{ Name: "storage-oc-mount-path", Value: "/oc", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"}, Destination: &cfg.Reva.StorageOC.MountPath, }, &cli.StringFlag{ Name: "storage-oc-mount-id", Value: "1284d238-aa92-42ce-bdc4-0b0000009162", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"}, Destination: &cfg.Reva.StorageOC.MountID, }, @@ -266,14 +266,14 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { Name: "public-link-url", Value: "localhost:9178", Usage: "URL to use for the public links service", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_URL"}, + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"}, Destination: &cfg.Reva.StoragePublicLink.URL, }, &cli.StringFlag{ Name: "storage-public-link-mount-path", Value: "/public/", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"}, Destination: &cfg.Reva.StoragePublicLink.MountPath, }, // public-link has no mount id diff --git a/ocis-reva/pkg/flagset/health.go b/storage/pkg/flagset/health.go similarity index 78% rename from ocis-reva/pkg/flagset/health.go rename to storage/pkg/flagset/health.go index ca462d6186..381f356700 100644 --- a/ocis-reva/pkg/flagset/health.go +++ b/storage/pkg/flagset/health.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // HealthWithConfig applies cfg to the health flagset @@ -12,7 +12,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9109", Usage: "Address to debug endpoint", - EnvVars: []string{"REVA_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, }, } diff --git a/ocis-reva/pkg/flagset/ldap.go b/storage/pkg/flagset/ldap.go similarity index 78% rename from ocis-reva/pkg/flagset/ldap.go rename to storage/pkg/flagset/ldap.go index 11bfb996cf..0c12ab4057 100644 --- a/ocis-reva/pkg/flagset/ldap.go +++ b/storage/pkg/flagset/ldap.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // LDAPWithConfig applies LDAP cfg to the flagset @@ -12,79 +12,79 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag { Name: "ldap-hostname", Value: "localhost", Usage: "LDAP hostname", - EnvVars: []string{"REVA_LDAP_HOSTNAME"}, + EnvVars: []string{"STORAGE_LDAP_HOSTNAME"}, Destination: &cfg.Reva.LDAP.Hostname, }, &cli.IntFlag{ Name: "ldap-port", Value: 9126, Usage: "LDAP port", - EnvVars: []string{"REVA_LDAP_PORT"}, + EnvVars: []string{"STORAGE_LDAP_PORT"}, Destination: &cfg.Reva.LDAP.Port, }, &cli.StringFlag{ Name: "ldap-base-dn", Value: "dc=example,dc=org", Usage: "LDAP basedn", - EnvVars: []string{"REVA_LDAP_BASE_DN"}, + EnvVars: []string{"STORAGE_LDAP_BASE_DN"}, Destination: &cfg.Reva.LDAP.BaseDN, }, &cli.StringFlag{ Name: "ldap-loginfilter", Value: "(&(objectclass=posixAccount)(|(cn={{login}})(mail={{login}})))", Usage: "LDAP login filter", - EnvVars: []string{"REVA_LDAP_LOGINFILTER"}, + EnvVars: []string{"STORAGE_LDAP_LOGINFILTER"}, Destination: &cfg.Reva.LDAP.LoginFilter, }, &cli.StringFlag{ Name: "ldap-userfilter", Value: "(&(objectclass=posixAccount)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}})))", Usage: "LDAP filter used when getting a user. The CS3 userid properties {{.OpaqueId}} and {{.Idp}} are available.", - EnvVars: []string{"REVA_LDAP_USERFILTER"}, + EnvVars: []string{"STORAGE_LDAP_USERFILTER"}, Destination: &cfg.Reva.LDAP.UserFilter, }, &cli.StringFlag{ Name: "ldap-attributefilter", Value: "(&(objectclass=posixAccount)({{attr}}={{value}}))", Usage: "LDAP filter used when searching for a user by claim/attribute. {{attr}} will be replaced with the attribute, {{value}} with the value.", - EnvVars: []string{"REVA_LDAP_ATTRIBUTEFILTER"}, + EnvVars: []string{"STORAGE_LDAP_ATTRIBUTEFILTER"}, Destination: &cfg.Reva.LDAP.AttributeFilter, }, &cli.StringFlag{ Name: "ldap-findfilter", Value: "(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))", Usage: "LDAP filter used when searching for recipients. {{query}} will be replaced with the search query", - EnvVars: []string{"REVA_LDAP_FINDFILTER"}, + EnvVars: []string{"STORAGE_LDAP_FINDFILTER"}, Destination: &cfg.Reva.LDAP.FindFilter, }, &cli.StringFlag{ Name: "ldap-groupfilter", - // FIXME the reva implementation needs to use the memberof overlay to get the cn when it only has the uuid, + // FIXME the storage implementation needs to use the memberof overlay to get the cn when it only has the uuid, // because the ldap schema either uses the dn or the member(of) attributes to establish membership Value: "(&(objectclass=posixGroup)(ownclouduuid={{.OpaqueId}}*))", // This filter will never work Usage: "LDAP filter used when getting the groups of a user. The CS3 userid properties {{.OpaqueId}} and {{.Idp}} are available.", - EnvVars: []string{"REVA_LDAP_GROUPFILTER"}, + EnvVars: []string{"STORAGE_LDAP_GROUPFILTER"}, Destination: &cfg.Reva.LDAP.GroupFilter, }, &cli.StringFlag{ Name: "ldap-bind-dn", Value: "cn=reva,ou=sysusers,dc=example,dc=org", Usage: "LDAP bind dn", - EnvVars: []string{"REVA_LDAP_BIND_DN"}, + EnvVars: []string{"STORAGE_LDAP_BIND_DN"}, Destination: &cfg.Reva.LDAP.BindDN, }, &cli.StringFlag{ Name: "ldap-bind-password", Value: "reva", Usage: "LDAP bind password", - EnvVars: []string{"REVA_LDAP_BIND_PASSWORD"}, + EnvVars: []string{"STORAGE_LDAP_BIND_PASSWORD"}, Destination: &cfg.Reva.LDAP.BindPassword, }, &cli.StringFlag{ Name: "ldap-idp", Value: "https://localhost:9200", Usage: "Identity provider to use for users", - EnvVars: []string{"REVA_LDAP_IDP"}, + EnvVars: []string{"STORAGE_LDAP_IDP"}, Destination: &cfg.Reva.LDAP.IDP, }, // ldap dn is always the dn @@ -92,42 +92,42 @@ func LDAPWithConfig(cfg *config.Config) []cli.Flag { Name: "ldap-schema-uid", Value: "ownclouduuid", Usage: "LDAP schema uid", - EnvVars: []string{"REVA_LDAP_SCHEMA_UID"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_UID"}, Destination: &cfg.Reva.LDAP.Schema.UID, }, &cli.StringFlag{ Name: "ldap-schema-mail", Value: "mail", Usage: "LDAP schema mail", - EnvVars: []string{"REVA_LDAP_SCHEMA_MAIL"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_MAIL"}, Destination: &cfg.Reva.LDAP.Schema.Mail, }, &cli.StringFlag{ Name: "ldap-schema-displayName", Value: "displayname", Usage: "LDAP schema displayName", - EnvVars: []string{"REVA_LDAP_SCHEMA_DISPLAYNAME"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_DISPLAYNAME"}, Destination: &cfg.Reva.LDAP.Schema.DisplayName, }, &cli.StringFlag{ Name: "ldap-schema-cn", Value: "cn", Usage: "LDAP schema cn", - EnvVars: []string{"REVA_LDAP_SCHEMA_CN"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_CN"}, Destination: &cfg.Reva.LDAP.Schema.CN, }, &cli.StringFlag{ Name: "ldap-schema-uidnumber", Value: "uidnumber", Usage: "LDAP schema uidnumber", - EnvVars: []string{"REVA_LDAP_SCHEMA_UID_NUMBER"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_UID_NUMBER"}, Destination: &cfg.Reva.LDAP.Schema.UIDNumber, }, &cli.StringFlag{ Name: "ldap-schema-gidnumber", Value: "gidnumber", Usage: "LDAP schema gidnumber", - EnvVars: []string{"REVA_LDAP_SCHEMA_GIDNUMBER"}, + EnvVars: []string{"STORAGE_LDAP_SCHEMA_GIDNUMBER"}, Destination: &cfg.Reva.LDAP.Schema.GIDNumber, }, } diff --git a/ocis-reva/pkg/flagset/root.go b/storage/pkg/flagset/root.go similarity index 75% rename from ocis-reva/pkg/flagset/root.go rename to storage/pkg/flagset/root.go index 3871571d8c..1c7cbd8af0 100644 --- a/ocis-reva/pkg/flagset/root.go +++ b/storage/pkg/flagset/root.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // RootWithConfig applies cfg to the root flagset @@ -12,26 +12,26 @@ func RootWithConfig(cfg *config.Config) []cli.Flag { Name: "config-file", Value: "", Usage: "Path to config file", - EnvVars: []string{"REVA_CONFIG_FILE"}, + EnvVars: []string{"STORAGE_CONFIG_FILE"}, Destination: &cfg.File, }, &cli.StringFlag{ Name: "log-level", Value: "info", Usage: "Set logging level", - EnvVars: []string{"REVA_LOG_LEVEL"}, + EnvVars: []string{"STORAGE_LOG_LEVEL"}, Destination: &cfg.Log.Level, }, &cli.BoolFlag{ Name: "log-pretty", Usage: "Enable pretty logging", - EnvVars: []string{"REVA_LOG_PRETTY"}, + EnvVars: []string{"STORAGE_LOG_PRETTY"}, Destination: &cfg.Log.Pretty, }, &cli.BoolFlag{ Name: "log-color", Usage: "Enable colored logging", - EnvVars: []string{"REVA_LOG_COLOR"}, + EnvVars: []string{"STORAGE_LOG_COLOR"}, Destination: &cfg.Log.Color, }, } diff --git a/ocis-reva/pkg/flagset/secret.go b/storage/pkg/flagset/secret.go similarity index 79% rename from ocis-reva/pkg/flagset/secret.go rename to storage/pkg/flagset/secret.go index 76c886cc10..e51b7acd73 100644 --- a/ocis-reva/pkg/flagset/secret.go +++ b/storage/pkg/flagset/secret.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // SecretWithConfig applies cfg to the root flagset @@ -12,7 +12,7 @@ func SecretWithConfig(cfg *config.Config) []cli.Flag { Name: "jwt-secret", Value: "Pive-Fumkiu4", Usage: "Shared jwt secret for reva service communication", - EnvVars: []string{"REVA_JWT_SECRET"}, + EnvVars: []string{"STORAGE_JWT_SECRET"}, Destination: &cfg.Reva.JWTSecret, }, } diff --git a/ocis-reva/pkg/flagset/sharing.go b/storage/pkg/flagset/sharing.go similarity index 68% rename from ocis-reva/pkg/flagset/sharing.go rename to storage/pkg/flagset/sharing.go index 8000254eb5..24ca534fe5 100644 --- a/ocis-reva/pkg/flagset/sharing.go +++ b/storage/pkg/flagset/sharing.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // SharingWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9151", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"}, Destination: &cfg.Reva.Sharing.DebugAddr, }, @@ -25,56 +25,56 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_SHARING_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_SHARING_NETWORK"}, Destination: &cfg.Reva.Sharing.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_SHARING_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_SHARING_PROTOCOL"}, Destination: &cfg.Reva.Sharing.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9150", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_SHARING_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_SHARING_ADDR"}, Destination: &cfg.Reva.Sharing.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9150", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_SHARING_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_SHARING_URL"}, Destination: &cfg.Reva.Sharing.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("usershareprovider", "publicshareprovider"), // TODO osmshareprovider Usage: "--service usershareprovider [--service publicshareprovider]", - EnvVars: []string{"REVA_SHARING_SERVICES"}, + EnvVars: []string{"STORAGE_SHARING_SERVICES"}, }, &cli.StringFlag{ Name: "user-driver", Value: "json", Usage: "driver to use for the UserShareProvider", - EnvVars: []string{"REVA_SHARING_USER_DRIVER"}, + EnvVars: []string{"STORAGE_SHARING_USER_DRIVER"}, Destination: &cfg.Reva.Sharing.UserDriver, }, &cli.StringFlag{ Name: "user-json-file", - Value: "/var/tmp/reva/shares.json", + Value: "/var/tmp/ocis/shares.json", Usage: "file used to persist shares for the UserShareProvider", - EnvVars: []string{"REVA_SHARING_USER_JSON_FILE"}, + EnvVars: []string{"STORAGE_SHARING_USER_JSON_FILE"}, Destination: &cfg.Reva.Sharing.UserJSONFile, }, &cli.StringFlag{ Name: "public-driver", Value: "json", Usage: "driver to use for the PublicShareProvider", - EnvVars: []string{"REVA_SHARING_PUBLIC_DRIVER"}, + EnvVars: []string{"STORAGE_SHARING_PUBLIC_DRIVER"}, Destination: &cfg.Reva.Sharing.PublicDriver, }, } diff --git a/ocis-reva/pkg/flagset/storageeos.go b/storage/pkg/flagset/storageeos.go similarity index 71% rename from ocis-reva/pkg/flagset/storageeos.go rename to storage/pkg/flagset/storageeos.go index 256cf7bfba..2838a4564d 100644 --- a/ocis-reva/pkg/flagset/storageeos.go +++ b/storage/pkg/flagset/storageeos.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageEOSWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageEOSWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9159", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_EOS_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageEOS.DebugAddr, }, @@ -23,71 +23,71 @@ func StorageEOSWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_EOS_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_EOS_NETWORK"}, Destination: &cfg.Reva.StorageEOS.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_EOS_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_EOS_PROTOCOL"}, Destination: &cfg.Reva.StorageEOS.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9158", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_EOS_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_EOS_ADDR"}, Destination: &cfg.Reva.StorageEOS.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9158", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_EOS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_EOS_URL"}, Destination: &cfg.Reva.StorageEOS.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("storageprovider"), Usage: "--service storageprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_EOS_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "eos", Usage: "storage driver for eos mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_EOS_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DRIVER"}, Destination: &cfg.Reva.StorageEOS.Driver, }, &cli.StringFlag{ Name: "mount-path", Value: "/eos", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_PATH"}, Destination: &cfg.Reva.StorageEOS.MountPath, }, &cli.StringFlag{ Name: "mount-id", Value: "1284d238-aa92-42ce-bdc4-0b0000009158", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_EOS_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_MOUNT_ID"}, Destination: &cfg.Reva.StorageEOS.MountID, }, &cli.BoolFlag{ Name: "expose-data-server", Value: false, Usage: "exposes a dedicated data server", - EnvVars: []string{"REVA_STORAGE_EOS_EXPOSE_DATA_SERVER"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_EXPOSE_DATA_SERVER"}, Destination: &cfg.Reva.StorageEOS.ExposeDataServer, }, &cli.StringFlag{ Name: "data-server-url", Value: "http://localhost:9160/data", Usage: "data server url", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVER_URL"}, Destination: &cfg.Reva.StorageEOS.DataServerURL, }, } diff --git a/ocis-reva/pkg/flagset/storageeosdata.go b/storage/pkg/flagset/storageeosdata.go similarity index 68% rename from ocis-reva/pkg/flagset/storageeosdata.go rename to storage/pkg/flagset/storageeosdata.go index e0b355b858..584a4b9227 100644 --- a/ocis-reva/pkg/flagset/storageeosdata.go +++ b/storage/pkg/flagset/storageeosdata.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageEOSDataWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9161", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageEOSData.DebugAddr, }, @@ -25,56 +25,56 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_NETWORK"}, Destination: &cfg.Reva.StorageEOSData.Network, }, &cli.StringFlag{ Name: "protocol", Value: "http", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PROTOCOL"}, Destination: &cfg.Reva.StorageEOSData.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9160", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_ADDR"}, Destination: &cfg.Reva.StorageEOSData.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9160", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_URL"}, Destination: &cfg.Reva.StorageEOSData.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("dataprovider"), Usage: "--service dataprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "eos", Usage: "storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_DRIVER"}, Destination: &cfg.Reva.StorageEOSData.Driver, }, &cli.StringFlag{ Name: "prefix", Value: "data", Usage: "prefix for the http endpoint, without leading slash", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_PREFIX"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_PREFIX"}, Destination: &cfg.Reva.StorageEOSData.Prefix, }, &cli.StringFlag{ Name: "temp-folder", Value: "/var/tmp/", Usage: "temp folder", - EnvVars: []string{"REVA_STORAGE_EOS_DATA_TEMP_FOLDER"}, + EnvVars: []string{"STORAGE_STORAGE_EOS_DATA_TEMP_FOLDER"}, Destination: &cfg.Reva.StorageEOSData.TempFolder, }, @@ -83,8 +83,8 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "gateway-url", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, @@ -93,8 +93,8 @@ func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, } diff --git a/ocis-reva/pkg/flagset/storagehome.go b/storage/pkg/flagset/storagehome.go similarity index 72% rename from ocis-reva/pkg/flagset/storagehome.go rename to storage/pkg/flagset/storagehome.go index 5ba95374d8..9b00e8f7a9 100644 --- a/ocis-reva/pkg/flagset/storagehome.go +++ b/storage/pkg/flagset/storagehome.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageHomeWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9155", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_HOME_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageHome.DebugAddr, }, @@ -25,50 +25,50 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_HOME_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_HOME_NETWORK"}, Destination: &cfg.Reva.StorageHome.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_HOME_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_HOME_PROTOCOL"}, Destination: &cfg.Reva.StorageHome.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9154", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_HOME_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_HOME_ADDR"}, Destination: &cfg.Reva.StorageHome.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9154", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_HOME_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_HOME_URL"}, Destination: &cfg.Reva.StorageHome.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("storageprovider"), Usage: "--service storageprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_HOME_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "owncloud", Usage: "storage driver for home mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_HOME_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DRIVER"}, Destination: &cfg.Reva.StorageHome.Driver, }, &cli.StringFlag{ Name: "mount-path", Value: "/home", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_PATH"}, Destination: &cfg.Reva.StorageHome.MountPath, }, &cli.StringFlag{ @@ -79,28 +79,28 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { // 1284d238-aa92-42ce-bdc4-0b0000009162 for /oc Value: "1284d238-aa92-42ce-bdc4-0b0000009162", // /oc Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_MOUNT_ID"}, Destination: &cfg.Reva.StorageHome.MountID, }, &cli.BoolFlag{ Name: "expose-data-server", Value: false, Usage: "exposes a dedicated data server", - EnvVars: []string{"REVA_STORAGE_HOME_EXPOSE_DATA_SERVER"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_EXPOSE_DATA_SERVER"}, Destination: &cfg.Reva.StorageHome.ExposeDataServer, }, &cli.StringFlag{ Name: "data-server-url", Value: "http://localhost:9156/data", Usage: "data server url", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVER_URL"}, Destination: &cfg.Reva.StorageHome.DataServerURL, }, &cli.BoolFlag{ Name: "enable-home", Value: true, Usage: "enable the creation of home directories", - EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"}, Destination: &cfg.Reva.Storages.Home.EnableHome, }, @@ -109,8 +109,8 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, } diff --git a/ocis-reva/pkg/flagset/storagehomedata.go b/storage/pkg/flagset/storagehomedata.go similarity index 69% rename from ocis-reva/pkg/flagset/storagehomedata.go rename to storage/pkg/flagset/storagehomedata.go index 28755c18f9..428df18038 100644 --- a/ocis-reva/pkg/flagset/storagehomedata.go +++ b/storage/pkg/flagset/storagehomedata.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageHomeDataWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9157", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageHomeData.DebugAddr, }, @@ -25,63 +25,63 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_NETWORK"}, Destination: &cfg.Reva.StorageHomeData.Network, }, &cli.StringFlag{ Name: "protocol", Value: "http", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PROTOCOL"}, Destination: &cfg.Reva.StorageHomeData.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9156", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_ADDR"}, Destination: &cfg.Reva.StorageHomeData.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9156", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_URL"}, Destination: &cfg.Reva.StorageHomeData.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("dataprovider"), Usage: "--service dataprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "owncloud", Usage: "storage driver for home data mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_DRIVER"}, Destination: &cfg.Reva.StorageHomeData.Driver, }, &cli.StringFlag{ Name: "prefix", Value: "data", Usage: "prefix for the http endpoint, without leading slash", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_PREFIX"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_PREFIX"}, Destination: &cfg.Reva.StorageHomeData.Prefix, }, &cli.StringFlag{ Name: "temp-folder", Value: "/var/tmp/", Usage: "temp folder", - EnvVars: []string{"REVA_STORAGE_HOME_DATA_TEMP_FOLDER"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER"}, Destination: &cfg.Reva.StorageHomeData.TempFolder, }, &cli.BoolFlag{ Name: "enable-home", Value: true, Usage: "enable the creation of home directories", - EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME"}, + EnvVars: []string{"STORAGE_STORAGE_HOME_ENABLE_HOME"}, Destination: &cfg.Reva.Storages.Home.EnableHome, }, @@ -90,8 +90,8 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "gateway-url", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, @@ -100,8 +100,8 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, } diff --git a/ocis-reva/pkg/flagset/storagemetadata.go b/storage/pkg/flagset/storagemetadata.go similarity index 74% rename from ocis-reva/pkg/flagset/storagemetadata.go rename to storage/pkg/flagset/storagemetadata.go index f95b3a0090..094dc07f0b 100644 --- a/ocis-reva/pkg/flagset/storagemetadata.go +++ b/storage/pkg/flagset/storagemetadata.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageMetadata applies cfg to the root flagset @@ -12,56 +12,56 @@ func StorageMetadata(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9217", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_METADATA_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageMetadata.DebugAddr, }, &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_METADATA_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_METADATA_NETWORK"}, Destination: &cfg.Reva.StorageMetadata.Network, }, &cli.StringFlag{ Name: "provider-addr", Value: "0.0.0.0:9215", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_METADATA_PROVIDER_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_ADDR"}, Destination: &cfg.Reva.StorageMetadata.Addr, }, &cli.StringFlag{ Name: "data-server-url", Value: "http://localhost:9216", Usage: "URL of the data-server the storage-provider uses", - EnvVars: []string{"REVA_STORAGE_METADATA_DATA_SERVER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_URL"}, Destination: &cfg.Reva.StorageMetadata.DataServerURL, }, &cli.StringFlag{ Name: "data-server-addr", Value: "0.0.0.0:9216", Usage: "Address to bind the metadata data-server to", - EnvVars: []string{"REVA_STORAGE_METADATA_DATA_SERVER_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_ADDR"}, Destination: &cfg.Reva.StorageMetadataData.Addr, }, &cli.StringFlag{ Name: "storage-provider-driver", Value: "local", Usage: "storage driver for metadata mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_METADATA_PROVIDER_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_DRIVER"}, Destination: &cfg.Reva.StorageMetadata.Driver, }, &cli.StringFlag{ Name: "data-provider-driver", Value: "local", Usage: "storage driver for data-provider mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_METADATA_DATA_PROVIDER_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_PROVIDER_DRIVER"}, Destination: &cfg.Reva.StorageMetadataData.Driver, }, &cli.StringFlag{ Name: "storage-root", Value: "/var/tmp/ocis/metadata", Usage: "the path to the metadata storage root", - EnvVars: []string{"REVA_STORAGE_METADATA_ROOT"}, + EnvVars: []string{"STORAGE_STORAGE_METADATA_ROOT"}, Destination: &cfg.Reva.Storages.Common.Root, }, } diff --git a/ocis-reva/pkg/flagset/storageoc.go b/storage/pkg/flagset/storageoc.go similarity index 70% rename from ocis-reva/pkg/flagset/storageoc.go rename to storage/pkg/flagset/storageoc.go index 04389d2e41..8280ec34f4 100644 --- a/ocis-reva/pkg/flagset/storageoc.go +++ b/storage/pkg/flagset/storageoc.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageOCWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9163", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_OC_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageOC.DebugAddr, }, @@ -25,71 +25,71 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_OC_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_OC_NETWORK"}, Destination: &cfg.Reva.StorageOC.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_OC_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_OC_PROTOCOL"}, Destination: &cfg.Reva.StorageOC.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9162", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_OC_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_OC_ADDR"}, Destination: &cfg.Reva.StorageOC.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9162", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_OC_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_OC_URL"}, Destination: &cfg.Reva.StorageOC.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("storageprovider"), Usage: "--service storageprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_OC_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_OC_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "owncloud", Usage: "storage driver for oc mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_OC_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DRIVER"}, Destination: &cfg.Reva.StorageOC.Driver, }, &cli.StringFlag{ Name: "mount-path", Value: "/oc", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_OC_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"}, Destination: &cfg.Reva.StorageOC.MountPath, }, &cli.StringFlag{ Name: "mount-id", Value: "1284d238-aa92-42ce-bdc4-0b0000009162", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"}, Destination: &cfg.Reva.StorageOC.MountID, }, &cli.BoolFlag{ Name: "expose-data-server", Value: false, Usage: "exposes a dedicated data server", - EnvVars: []string{"REVA_STORAGE_OC_EXPOSE_DATA_SERVER"}, + EnvVars: []string{"STORAGE_STORAGE_OC_EXPOSE_DATA_SERVER"}, Destination: &cfg.Reva.StorageOC.ExposeDataServer, }, &cli.StringFlag{ Name: "data-server-url", Value: "http://localhost:9164/data", Usage: "data server url", - EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVER_URL"}, Destination: &cfg.Reva.StorageOC.DataServerURL, }, @@ -98,8 +98,8 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, } diff --git a/ocis-reva/pkg/flagset/storageocdata.go b/storage/pkg/flagset/storageocdata.go similarity index 68% rename from ocis-reva/pkg/flagset/storageocdata.go rename to storage/pkg/flagset/storageocdata.go index e89b563ba5..8e9ba3a9e7 100644 --- a/ocis-reva/pkg/flagset/storageocdata.go +++ b/storage/pkg/flagset/storageocdata.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageOCDataWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9165", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageOCData.DebugAddr, }, @@ -25,56 +25,56 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_OC_DATA_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_NETWORK"}, Destination: &cfg.Reva.StorageOCData.Network, }, &cli.StringFlag{ Name: "protocol", Value: "http", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_OC_DATA_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PROTOCOL"}, Destination: &cfg.Reva.StorageOCData.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9164", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_OC_DATA_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_ADDR"}, Destination: &cfg.Reva.StorageOCData.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9164", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_URL"}, Destination: &cfg.Reva.StorageOCData.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("dataprovider"), Usage: "--service dataprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "owncloud", Usage: "storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_OC_DATA_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_DRIVER"}, Destination: &cfg.Reva.StorageOCData.Driver, }, &cli.StringFlag{ Name: "prefix", Value: "data", Usage: "prefix for the http endpoint, without leading slash", - EnvVars: []string{"REVA_STORAGE_OC_DATA_PREFIX"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_PREFIX"}, Destination: &cfg.Reva.StorageOCData.Prefix, }, &cli.StringFlag{ Name: "temp-folder", Value: "/var/tmp/", Usage: "temp folder", - EnvVars: []string{"REVA_STORAGE_OC_DATA_TEMP_FOLDER"}, + EnvVars: []string{"STORAGE_STORAGE_OC_DATA_TEMP_FOLDER"}, Destination: &cfg.Reva.StorageOCData.TempFolder, }, @@ -83,8 +83,8 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "gateway-url", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, @@ -93,8 +93,8 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "users-url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, } diff --git a/ocis-reva/pkg/flagset/storagepubliclink.go b/storage/pkg/flagset/storagepubliclink.go similarity index 62% rename from ocis-reva/pkg/flagset/storagepubliclink.go rename to storage/pkg/flagset/storagepubliclink.go index d58121aa52..ec373f0fe4 100644 --- a/ocis-reva/pkg/flagset/storagepubliclink.go +++ b/storage/pkg/flagset/storagepubliclink.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StoragePublicLink applies cfg to the root flagset @@ -13,36 +13,36 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9179", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_DEBUG_ADDR"}, Destination: &cfg.Reva.StoragePublicLink.DebugAddr, }, &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_NETWORK"}, Destination: &cfg.Reva.StoragePublicLink.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_PROTOCOL"}, Destination: &cfg.Reva.StoragePublicLink.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9178", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ADDR"}, Destination: &cfg.Reva.StoragePublicLink.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9178", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_URL"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"}, Destination: &cfg.Reva.StoragePublicLink.URL, }, @@ -50,15 +50,15 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag { Name: "mount-path", Value: "/public/", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"}, Destination: &cfg.Reva.StoragePublicLink.MountPath, }, &cli.StringFlag{ Name: "gateway-url", Value: "localhost:9142", - Usage: "URL to use for the reva gateway service", - EnvVars: []string{"REVA_GATEWAY_URL"}, + Usage: "URL to use for the storage gateway service", + EnvVars: []string{"STORAGE_GATEWAY_URL"}, Destination: &cfg.Reva.Gateway.URL, }, } diff --git a/ocis-reva/pkg/flagset/storageroot.go b/storage/pkg/flagset/storageroot.go similarity index 71% rename from ocis-reva/pkg/flagset/storageroot.go rename to storage/pkg/flagset/storageroot.go index 46fd261d59..679c77c996 100644 --- a/ocis-reva/pkg/flagset/storageroot.go +++ b/storage/pkg/flagset/storageroot.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // StorageRootWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9153", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_STORAGE_ROOT_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_DEBUG_ADDR"}, Destination: &cfg.Reva.StorageRoot.DebugAddr, }, @@ -25,70 +25,70 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_STORAGE_ROOT_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_STORAGE_ROOT_NETWORK"}, Destination: &cfg.Reva.StorageRoot.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_STORAGE_ROOT_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_STORAGE_ROOT_PROTOCOL"}, Destination: &cfg.Reva.StorageRoot.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9152", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_STORAGE_ROOT_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_STORAGE_ROOT_ADDR"}, Destination: &cfg.Reva.StorageRoot.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9152", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_STORAGE_ROOT_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_STORAGE_ROOT_URL"}, Destination: &cfg.Reva.StorageRoot.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("storageprovider"), Usage: "--service storageprovider [--service otherservice]", - EnvVars: []string{"REVA_STORAGE_ROOT_SERVICES"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "local", Usage: "storage driver for root mount: eg. local, eos, owncloud, ocis or s3", - EnvVars: []string{"REVA_STORAGE_ROOT_DRIVER"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_DRIVER"}, Destination: &cfg.Reva.StorageRoot.Driver, }, &cli.StringFlag{ Name: "mount-path", Value: "/", Usage: "mount path", - EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_PATH"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_PATH"}, Destination: &cfg.Reva.StorageRoot.MountPath, }, &cli.StringFlag{ Name: "mount-id", Value: "123e4567-e89b-12d3-a456-426655440001", Usage: "mount id", - EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_MOUNT_ID"}, Destination: &cfg.Reva.StorageRoot.MountID, }, &cli.BoolFlag{ Name: "expose-data-server", Usage: "exposes a dedicated data server", - EnvVars: []string{"REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_EXPOSE_DATA_SERVER"}, Destination: &cfg.Reva.StorageRoot.ExposeDataServer, }, &cli.StringFlag{ Name: "data-server-url", Value: "", Usage: "data server url", - EnvVars: []string{"REVA_STORAGE_ROOT_DATA_SERVER_URL"}, + EnvVars: []string{"STORAGE_STORAGE_ROOT_DATA_SERVER_URL"}, Destination: &cfg.Reva.StorageRoot.DataServerURL, }, } diff --git a/ocis-reva/pkg/flagset/tracing.go b/storage/pkg/flagset/tracing.go similarity index 73% rename from ocis-reva/pkg/flagset/tracing.go rename to storage/pkg/flagset/tracing.go index a1420ab31c..bf05404587 100644 --- a/ocis-reva/pkg/flagset/tracing.go +++ b/storage/pkg/flagset/tracing.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // TracingWithConfig applies cfg to the root flagset @@ -12,35 +12,35 @@ func TracingWithConfig(cfg *config.Config) []cli.Flag { &cli.BoolFlag{ Name: "tracing-enabled", Usage: "Enable sending traces", - EnvVars: []string{"REVA_TRACING_ENABLED"}, + EnvVars: []string{"STORAGE_TRACING_ENABLED"}, Destination: &cfg.Tracing.Enabled, }, &cli.StringFlag{ Name: "tracing-type", Value: "jaeger", Usage: "Tracing backend type", - EnvVars: []string{"REVA_TRACING_TYPE"}, + EnvVars: []string{"STORAGE_TRACING_TYPE"}, Destination: &cfg.Tracing.Type, }, &cli.StringFlag{ Name: "tracing-endpoint", Value: "", Usage: "Endpoint for the agent", - EnvVars: []string{"REVA_TRACING_ENDPOINT"}, + EnvVars: []string{"STORAGE_TRACING_ENDPOINT"}, Destination: &cfg.Tracing.Endpoint, }, &cli.StringFlag{ Name: "tracing-collector", Value: "", Usage: "Endpoint for the collector", - EnvVars: []string{"REVA_TRACING_COLLECTOR"}, + EnvVars: []string{"STORAGE_TRACING_COLLECTOR"}, Destination: &cfg.Tracing.Collector, }, &cli.StringFlag{ Name: "tracing-service", - Value: "reva", + Value: "storage", Usage: "Service name for tracing", - EnvVars: []string{"REVA_TRACING_SERVICE"}, + EnvVars: []string{"STORAGE_TRACING_SERVICE"}, Destination: &cfg.Tracing.Service, }, } diff --git a/ocis-reva/pkg/flagset/users.go b/storage/pkg/flagset/users.go similarity index 73% rename from ocis-reva/pkg/flagset/users.go rename to storage/pkg/flagset/users.go index b386d5fbe5..0ce28b5976 100644 --- a/ocis-reva/pkg/flagset/users.go +++ b/storage/pkg/flagset/users.go @@ -2,7 +2,7 @@ package flagset import ( "github.com/micro/cli/v2" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // UsersWithConfig applies cfg to the root flagset @@ -14,7 +14,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9145", Usage: "Address to bind debug server", - EnvVars: []string{"REVA_SHARING_DEBUG_ADDR"}, + EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"}, Destination: &cfg.Reva.Users.DebugAddr, }, @@ -25,50 +25,50 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "network", Value: "tcp", - Usage: "Network to use for the reva service, can be 'tcp', 'udp' or 'unix'", - EnvVars: []string{"REVA_USERS_NETWORK"}, + Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'", + EnvVars: []string{"STORAGE_USERS_NETWORK"}, Destination: &cfg.Reva.Users.Network, }, &cli.StringFlag{ Name: "protocol", Value: "grpc", - Usage: "protocol for reva service, can be 'http' or 'grpc'", - EnvVars: []string{"REVA_USERS_PROTOCOL"}, + Usage: "protocol for storage service, can be 'http' or 'grpc'", + EnvVars: []string{"STORAGE_USERS_PROTOCOL"}, Destination: &cfg.Reva.Users.Protocol, }, &cli.StringFlag{ Name: "addr", Value: "0.0.0.0:9144", - Usage: "Address to bind reva service", - EnvVars: []string{"REVA_USERS_ADDR"}, + Usage: "Address to bind storage service", + EnvVars: []string{"STORAGE_USERS_ADDR"}, Destination: &cfg.Reva.Users.Addr, }, &cli.StringFlag{ Name: "url", Value: "localhost:9144", - Usage: "URL to use for the reva service", - EnvVars: []string{"REVA_USERS_URL"}, + Usage: "URL to use for the storage service", + EnvVars: []string{"STORAGE_USERS_URL"}, Destination: &cfg.Reva.Users.URL, }, &cli.StringSliceFlag{ Name: "service", Value: cli.NewStringSlice("userprovider"), // TODO preferences Usage: "--service userprovider [--service otherservice]", - EnvVars: []string{"REVA_USERS_SERVICES"}, + EnvVars: []string{"STORAGE_USERS_SERVICES"}, }, &cli.StringFlag{ Name: "driver", Value: "ldap", Usage: "user driver: 'demo', 'json', 'ldap', or 'rest'", - EnvVars: []string{"REVA_USERS_DRIVER"}, + EnvVars: []string{"STORAGE_USERS_DRIVER"}, Destination: &cfg.Reva.Users.Driver, }, &cli.StringFlag{ Name: "json-config", Value: "", Usage: "Path to users.json file", - EnvVars: []string{"REVA_USERS_JSON"}, + EnvVars: []string{"STORAGE_USERS_JSON"}, Destination: &cfg.Reva.Users.JSON, }, @@ -78,70 +78,70 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag { Name: "rest-client-id", Value: "", Usage: "User rest driver Client ID", - EnvVars: []string{"REVA_REST_CLIENT_ID"}, + EnvVars: []string{"STORAGE_REST_CLIENT_ID"}, Destination: &cfg.Reva.UserRest.ClientID, }, &cli.StringFlag{ Name: "rest-client-secret", Value: "", Usage: "User rest driver Client Secret", - EnvVars: []string{"REVA_REST_CLIENT_SECRET"}, + EnvVars: []string{"STORAGE_REST_CLIENT_SECRET"}, Destination: &cfg.Reva.UserRest.ClientSecret, }, &cli.StringFlag{ Name: "rest-redis-address", Value: "localhost:6379", Usage: "Address for redis server", - EnvVars: []string{"REVA_REST_REDIS_ADDRESS"}, + EnvVars: []string{"STORAGE_REST_REDIS_ADDRESS"}, Destination: &cfg.Reva.UserRest.RedisAddress, }, &cli.StringFlag{ Name: "rest-redis-username", Value: "", Usage: "Username for redis server", - EnvVars: []string{"REVA_REST_REDIS_USERNAME"}, + EnvVars: []string{"STORAGE_REST_REDIS_USERNAME"}, Destination: &cfg.Reva.UserRest.RedisUsername, }, &cli.StringFlag{ Name: "rest-redis-password", Value: "", Usage: "Password for redis server", - EnvVars: []string{"REVA_REST_REDIS_PASSWORD"}, + EnvVars: []string{"STORAGE_REST_REDIS_PASSWORD"}, Destination: &cfg.Reva.UserRest.RedisPassword, }, &cli.IntFlag{ Name: "rest-user-groups-cache-expiration", Value: 5, Usage: "Time in minutes for redis cache expiration.", - EnvVars: []string{"REVA_REST_CACHE_EXPIRATION"}, + EnvVars: []string{"STORAGE_REST_CACHE_EXPIRATION"}, Destination: &cfg.Reva.UserRest.UserGroupsCacheExpiration, }, &cli.StringFlag{ Name: "rest-id-provider", Value: "", Usage: "The OIDC Provider", - EnvVars: []string{"REVA_REST_ID_PROVIDER"}, + EnvVars: []string{"STORAGE_REST_ID_PROVIDER"}, Destination: &cfg.Reva.UserRest.IDProvider, }, &cli.StringFlag{ Name: "rest-api-base-url", Value: "", Usage: "Base API Endpoint", - EnvVars: []string{"REVA_REST_API_BASE_URL"}, + EnvVars: []string{"STORAGE_REST_API_BASE_URL"}, Destination: &cfg.Reva.UserRest.APIBaseURL, }, &cli.StringFlag{ Name: "rest-oidc-token-endpoint", Value: "", Usage: "Endpoint to generate token to access the API", - EnvVars: []string{"REVA_REST_OIDC_TOKEN_ENDPOINT"}, + EnvVars: []string{"STORAGE_REST_OIDC_TOKEN_ENDPOINT"}, Destination: &cfg.Reva.UserRest.OIDCTokenEndpoint, }, &cli.StringFlag{ Name: "rest-target-api", Value: "", Usage: "The target application", - EnvVars: []string{"REVA_REST_TARGET_API"}, + EnvVars: []string{"STORAGE_REST_TARGET_API"}, Destination: &cfg.Reva.UserRest.TargetAPI, }, } diff --git a/ocis-reva/pkg/server/debug/option.go b/storage/pkg/server/debug/option.go similarity index 96% rename from ocis-reva/pkg/server/debug/option.go rename to storage/pkg/server/debug/option.go index f9ed1d8de8..7da0000714 100644 --- a/ocis-reva/pkg/server/debug/option.go +++ b/storage/pkg/server/debug/option.go @@ -4,7 +4,7 @@ import ( "context" "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/ocis-reva/pkg/config" + "github.com/owncloud/ocis/storage/pkg/config" ) // Option defines a single option function. diff --git a/ocis-reva/pkg/server/debug/server.go b/storage/pkg/server/debug/server.go similarity index 93% rename from ocis-reva/pkg/server/debug/server.go rename to storage/pkg/server/debug/server.go index e18f6d4ffb..e2ef8bd8a6 100644 --- a/ocis-reva/pkg/server/debug/server.go +++ b/storage/pkg/server/debug/server.go @@ -5,8 +5,8 @@ import ( "net/http" "github.com/owncloud/ocis/ocis-pkg/service/debug" - "github.com/owncloud/ocis/ocis-reva/pkg/config" - "github.com/owncloud/ocis/ocis-reva/pkg/version" + "github.com/owncloud/ocis/storage/pkg/config" + "github.com/owncloud/ocis/storage/pkg/version" ) // Server initializes the debug service and server. diff --git a/ocis-reva/pkg/service/external/external.go b/storage/pkg/service/external/external.go similarity index 100% rename from ocis-reva/pkg/service/external/external.go rename to storage/pkg/service/external/external.go diff --git a/ocis-reva/pkg/service/external/external_test.go b/storage/pkg/service/external/external_test.go similarity index 100% rename from ocis-reva/pkg/service/external/external_test.go rename to storage/pkg/service/external/external_test.go diff --git a/ocis-reva/pkg/version/version.go b/storage/pkg/version/version.go similarity index 100% rename from ocis-reva/pkg/version/version.go rename to storage/pkg/version/version.go diff --git a/ocis-reva/reflex.conf b/storage/reflex.conf similarity index 100% rename from ocis-reva/reflex.conf rename to storage/reflex.conf diff --git a/ocis-reva/templates/CONFIGURATION.tmpl b/storage/templates/CONFIGURATION.tmpl similarity index 88% rename from ocis-reva/templates/CONFIGURATION.tmpl rename to storage/templates/CONFIGURATION.tmpl index 060c8024fe..26272fc212 100644 --- a/ocis-reva/templates/CONFIGURATION.tmpl +++ b/storage/templates/CONFIGURATION.tmpl @@ -2,8 +2,8 @@ title: "Configuration" date: "{{ date "2006-01-02T15:04:05-0700" now }}" weight: 20 -geekdocRepo: https://github.com/owncloud/ocis-reva -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/extensions/storage geekdocFilePath: configuration.md --- {{- define "options"}} @@ -11,7 +11,7 @@ geekdocFilePath: configuration.md {{ range $opt := first . }}{{ with list $fnName $opt -}} {{ $o := last . -}} {{ if eq $o.FnName $fnName -}} ---{{ $o.Name }} | ${{ index $o.Env 0 }} +--{{ $o.Name }} | ${{ index $o.Env 0 }} : {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} {{ end -}} @@ -52,12 +52,12 @@ If you prefer to configure the service with commandline flags you can see the av {{ $options := .Options -}} {{ range $com := .Commands }}{{ with (list $options $com) -}} {{ $c := last . -}} -{{ if eq $c.Name "ocis-reva" -}} +{{ if eq $c.Name "storage" -}} ## Root Command {{ $c.Usage }} -Usage: `ocis-reva [global options] command [command options] [arguments...]` +Usage: `storage [global options] command [command options] [arguments...]` {{ template "options" . -}} ## Sub Commands @@ -67,12 +67,12 @@ Usage: `ocis-reva [global options] command [command options] [arguments...]` {{- range $com := .Commands }}{{ with (list $options $com) -}} {{- $c := last . }} {{- if ne $c.Name "ocis-reva" -}} -### ocis-reva {{ $c.Name }} +### storage {{ $c.Name }} {{ $c.Usage }} -Usage: `ocis-reva {{ $c.Name }} [command options] [arguments...]` +Usage: `storage {{ $c.Name }} [command options] [arguments...]` {{ template "options" . }} {{- end -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/ocis-reva/tests/acceptance/config/behat.yml b/storage/tests/acceptance/config/behat.yml similarity index 100% rename from ocis-reva/tests/acceptance/config/behat.yml rename to storage/tests/acceptance/config/behat.yml diff --git a/ocis-reva/tests/acceptance/expected-failures-on-EOS-storage.txt b/storage/tests/acceptance/expected-failures-on-EOS-storage.txt similarity index 100% rename from ocis-reva/tests/acceptance/expected-failures-on-EOS-storage.txt rename to storage/tests/acceptance/expected-failures-on-EOS-storage.txt diff --git a/ocis-reva/tests/acceptance/expected-failures-on-OCIS-storage.txt b/storage/tests/acceptance/expected-failures-on-OCIS-storage.txt similarity index 100% rename from ocis-reva/tests/acceptance/expected-failures-on-OCIS-storage.txt rename to storage/tests/acceptance/expected-failures-on-OCIS-storage.txt diff --git a/ocis-reva/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt b/storage/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt similarity index 100% rename from ocis-reva/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt rename to storage/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavPROPFINDAuth.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavPROPFINDAuth.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavPROPFINDAuth.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavPROPFINDAuth.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiFavorites-favorites.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiFavorites-favorites.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiFavorites-favorites.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiFavorites-favorites.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiMain-checksums.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiMain-checksums.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiMain-checksums.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiMain-checksums.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiMain-main.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiMain-main.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiMain-main.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiMain-main.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-getWebDAVSharePermissions.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-getWebDAVSharePermissions.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-getWebDAVSharePermissions.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-getWebDAVSharePermissions.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-downloadFile.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-downloadFile.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-downloadFile.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-downloadFile.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-setFileProperties.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-setFileProperties.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-setFileProperties.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-setFileProperties.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature diff --git a/ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature b/storage/tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature similarity index 100% rename from ocis-reva/tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature rename to storage/tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature diff --git a/ocis-reva/tests/acceptance/features/bootstrap/RevaContext.php b/storage/tests/acceptance/features/bootstrap/RevaContext.php similarity index 100% rename from ocis-reva/tests/acceptance/features/bootstrap/RevaContext.php rename to storage/tests/acceptance/features/bootstrap/RevaContext.php diff --git a/ocis-reva/tests/acceptance/features/bootstrap/bootstrap.php b/storage/tests/acceptance/features/bootstrap/bootstrap.php similarity index 100% rename from ocis-reva/tests/acceptance/features/bootstrap/bootstrap.php rename to storage/tests/acceptance/features/bootstrap/bootstrap.php diff --git a/ocis-reva/tests/config/config.json b/storage/tests/config/config.json similarity index 100% rename from ocis-reva/tests/config/config.json rename to storage/tests/config/config.json diff --git a/ocis-reva/tests/config/identifier-registration.yml b/storage/tests/config/identifier-registration.yml similarity index 100% rename from ocis-reva/tests/config/identifier-registration.yml rename to storage/tests/config/identifier-registration.yml diff --git a/ocis-reva/tests/data/testusers.ldif b/storage/tests/data/testusers.ldif similarity index 100% rename from ocis-reva/tests/data/testusers.ldif rename to storage/tests/data/testusers.ldif diff --git a/ocis-reva/tools.go b/storage/tools.go similarity index 100% rename from ocis-reva/tools.go rename to storage/tools.go diff --git a/ocis-reva/vendor-bin/behat/composer.json b/storage/vendor-bin/behat/composer.json similarity index 100% rename from ocis-reva/vendor-bin/behat/composer.json rename to storage/vendor-bin/behat/composer.json