mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-23 22:29:59 -05:00
storage-metadata -> storage-system
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -65,7 +65,7 @@ config = {
|
||||
"extensions/proxy",
|
||||
"extensions/settings",
|
||||
"extensions/sharing",
|
||||
"extensions/storage-metadata",
|
||||
"extensions/storage-system",
|
||||
"extensions/storage-publiclink",
|
||||
"extensions/storage-shares",
|
||||
"extensions/storage-users",
|
||||
@@ -1646,7 +1646,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
"STORAGE_USERS_DRIVER": "%s" % (storage),
|
||||
"STORAGE_USERS_DRIVER_LOCAL_ROOT": "/srv/app/tmp/ocis/local/root",
|
||||
"STORAGE_USERS_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/users",
|
||||
"STORAGE_METADATA_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/metadata",
|
||||
"STORAGE_SYSTEM_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/metadata",
|
||||
"SHARING_USER_JSON_FILE": "/srv/app/tmp/ocis/shares.json",
|
||||
"PROXY_ENABLE_BASIC_AUTH": True,
|
||||
"WEB_UI_CONFIG": "/drone/src/tests/config/drone/ocis-config.json",
|
||||
@@ -1721,7 +1721,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
"SHARING_USER_OWNCLOUDSQL_DB_NAME": "owncloud",
|
||||
# General oCIS config
|
||||
# OCIS_RUN_EXTENSIONS specifies to start all extensions except glauth, idp and accounts. These are replaced by external services
|
||||
"OCIS_RUN_EXTENSIONS": "settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,auth-machine,storage-users,storage-shares,storage-publiclink,app-provider,sharing,proxy,nats,ocdav",
|
||||
"OCIS_RUN_EXTENSIONS": "settings,storage-system,graph,graph-explorer,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,auth-machine,storage-users,storage-shares,storage-publiclink,app-provider,sharing,proxy,nats,ocdav",
|
||||
"OCIS_LOG_LEVEL": "info",
|
||||
"OCIS_URL": OCIS_URL,
|
||||
"OCIS_BASE_DATA_PATH": "/mnt/data/ocis",
|
||||
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -41,7 +41,7 @@
|
||||
// metadata storage
|
||||
"METADATA_USER_ID": "some-metadata-user-id"
|
||||
// OCIS_RUN_EXTENSIONS allows to start a subset of extensions even in the supervised mode
|
||||
//"OCIS_RUN_EXTENSIONS": "settings,storage-metadata,glauth,graph,graph-explorer,idp,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,storage-authmachine,storage-users,storage-shares,storage-publiclink,app-provider,sharing,accounts,proxy,ocdav",
|
||||
//"OCIS_RUN_EXTENSIONS": "settings,storage-system,glauth,graph,graph-explorer,idp,ocs,store,thumbnails,web,webdav,frontend,gateway,user,group,auth-basic,auth-bearer,storage-authmachine,storage-users,storage-shares,storage-publiclink,app-provider,sharing,accounts,proxy,ocdav",
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
2
Makefile
2
Makefile
@@ -38,7 +38,7 @@ OCIS_MODULES = \
|
||||
extensions/proxy \
|
||||
extensions/settings \
|
||||
extensions/sharing \
|
||||
extensions/storage-metadata \
|
||||
extensions/storage-system \
|
||||
extensions/storage-publiclink \
|
||||
extensions/storage-shares \
|
||||
extensions/storage-users \
|
||||
|
||||
@@ -85,7 +85,7 @@ services:
|
||||
STORAGE_LDAP_LOGIN_ATTRIBUTES: "uid,mail"
|
||||
# ownCloudSQL storage driver
|
||||
STORAGE_USERS_DRIVER: owncloudsql
|
||||
STORAGE_METADATA_DRIVER: ocis # keep metadata on ocis storage since this are only small files atm
|
||||
STORAGE_SYSTEM_DRIVER: ocis # keep system data on ocis storage since this are only small files atm
|
||||
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DATADIR: /mnt/data/files
|
||||
STORAGE_USERS_DRIVER_OWNCLOUDSQL_UPLOADINFO_DIR: /tmp
|
||||
STORAGE_USERS_DRIVER_OWNCLOUDSQL_SHARE_FOLDER: "/Shares"
|
||||
@@ -108,7 +108,7 @@ services:
|
||||
OCIS_STORAGE_READ_ONLY: "false" # TODO: conflict with OWNCLOUDSQL -> https://github.com/owncloud/ocis/issues/2303
|
||||
# General oCIS config
|
||||
# OCIS_RUN_EXTENSIONS specifies to start all extensions except glauth, idp and accounts. These are replaced by external services
|
||||
OCIS_RUN_EXTENSIONS: settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,app-provider,storage-sharing,proxy,nats
|
||||
OCIS_RUN_EXTENSIONS: settings,storage-system,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,app-provider,storage-sharing,proxy,nats
|
||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
||||
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
|
||||
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -128,7 +128,7 @@ services:
|
||||
ACCOUNTS_GRPC_ADDR: 0.0.0.0:9180
|
||||
|
||||
ACCOUNTS_STORAGE_BACKEND: cs3
|
||||
ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR: storage-metadata:9215
|
||||
ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR: storage-system:9215
|
||||
|
||||
IDP_LDAP_BIND_PASSWORD: ${IDP_LDAP_BIND_PASSWORD:-idp}
|
||||
STORAGE_LDAP_BIND_PASSWORD: ${STORAGE_LDAP_BIND_PASSWORD:-reva}
|
||||
@@ -366,7 +366,7 @@ services:
|
||||
driver: "local"
|
||||
restart: always
|
||||
|
||||
storage-metadata:
|
||||
storage-system:
|
||||
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
|
||||
deploy:
|
||||
replicas: 1
|
||||
@@ -374,7 +374,7 @@ services:
|
||||
ocis-net:
|
||||
entrypoint:
|
||||
- ocis
|
||||
- storage-metadata
|
||||
- storage-system
|
||||
- server
|
||||
environment:
|
||||
OCIS_LOG_LEVEL: "${OCIS_LOG_LEVEL:-error}"
|
||||
@@ -383,18 +383,18 @@ services:
|
||||
|
||||
STORAGE_HOME_DATAPROVIDER_INSECURE: "${INSECURE:-false}"
|
||||
|
||||
STORAGE_METADATA_GRPC_ADDR: 0.0.0.0:9215
|
||||
STORAGE_METADATA_HTTP_ADDR: 0.0.0.0:9216
|
||||
STORAGE_METADATA_DATA_SERVER_URL: http://storage-metadata:9216/data
|
||||
STORAGE_SYSTEM_GRPC_ADDR: 0.0.0.0:9215
|
||||
STORAGE_SYSTEM_HTTP_ADDR: 0.0.0.0:9216
|
||||
STORAGE_SYSTEM_DATA_SERVER_URL: http://storage-system:9216/data
|
||||
|
||||
STORAGE_JWT_SECRET: ${OCIS_METADATA_JWT_SECRET:-Pive-Fumkiu4}
|
||||
STORAGE_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
|
||||
|
||||
STORAGE_METADATA_DRIVER: ocis
|
||||
STORAGE_SYSTEM_DRIVER: ocis
|
||||
|
||||
REVA_GATEWAY: storage-gateway:9142
|
||||
volumes:
|
||||
- "ocis-storage-metadata:/var/lib/ocis"
|
||||
- "ocis-storage-system:/var/lib/ocis"
|
||||
logging:
|
||||
driver: "local"
|
||||
restart: always
|
||||
@@ -726,7 +726,7 @@ volumes:
|
||||
traefik-certs: null
|
||||
ocis-settings: null
|
||||
ocis-store: null
|
||||
ocis-storage-metadata: null
|
||||
ocis-storage-system: null
|
||||
ocis-storage-users: null
|
||||
ocis-storage-sharing: null
|
||||
|
||||
|
||||
@@ -99,14 +99,14 @@ services:
|
||||
# OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# # metrics
|
||||
# GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
|
||||
storage-metadata:
|
||||
storage-system:
|
||||
environment:
|
||||
# tracing
|
||||
OCIS_TRACING_ENABLED: "true"
|
||||
OCIS_TRACING_TYPE: jaeger
|
||||
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
|
||||
# metrics
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
storage-authbasic:
|
||||
environment:
|
||||
# tracing
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -61,7 +61,7 @@ services:
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
# activate s3ng storage driver
|
||||
STORAGE_USERS_DRIVER: s3ng
|
||||
STORAGE_METADATA_DRIVER: ocis # keep metadata on ocis storage since this are only small files atm
|
||||
STORAGE_SYSTEM_DRIVER: ocis # keep system data on ocis storage since this are only small files atm
|
||||
# s3ng specific settings
|
||||
STORAGE_USERS_DRIVER_S3NG_ENDPOINT: http://minio:9000
|
||||
STORAGE_USERS_DRIVER_S3NG_REGION: default
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
|
||||
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
|
||||
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
|
||||
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_SYSTEM_DEBUG_ADDR: 0.0.0.0:9217
|
||||
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
|
||||
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
|
||||
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Metadata Storage
|
||||
date: 2022-03-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/storage-metadata
|
||||
geekdocEditPath: edit/master/docs/extensions/storage-system
|
||||
geekdocFilePath: _index.md
|
||||
geekdocCollapseSection: true
|
||||
---
|
||||
|
||||
@@ -3,13 +3,13 @@ title: Service Configuration
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/extensions/storage-metadata
|
||||
geekdocEditPath: edit/master/docs/extensions/storage-system
|
||||
geekdocFilePath: configuration.md
|
||||
geekdocCollapseSection: true
|
||||
---
|
||||
|
||||
## Example YAML Config
|
||||
|
||||
{{< include file="extensions/_includes/storage-metadata-config-example.yaml" language="yaml" >}}
|
||||
{{< include file="extensions/_includes/storage-system-config-example.yaml" language="yaml" >}}
|
||||
|
||||
{{< include file="extensions/_includes/storage-metadata_configvars.md" >}}
|
||||
{{< include file="extensions/_includes/storage-system_configvars.md" >}}
|
||||
|
||||
@@ -460,7 +460,7 @@ Our recommended update strategy to oCIS 1.6.0 is:
|
||||
1. let users recreate their shares
|
||||
|
||||
If you want to use oCIS 1.6.0 without following our recommended update strategy, you can also keep the pre 1.6.0 behaviour by setting this environment variable:
|
||||
`export STORAGE_METADATA_ROOT=/var/tmp/ocis/storage/users`
|
||||
`export STORAGE_SYSTEM_ROOT=/var/tmp/ocis/storage/users`
|
||||
This may lead to faulty behaviour since both the metadata and user storage driver will be storing their data in the same filesystem path.
|
||||
|
||||
## ownCloud Infinite Scale 1.5.0 Technology Preview
|
||||
|
||||
@@ -88,8 +88,8 @@ The uid and gid `2` are referencing the user `daemon` inside the ocis container.
|
||||
Kill the metadata storage. By default it uses the `ocis` storage driver. We need to switch it to the `eos` driver:
|
||||
|
||||
```
|
||||
docker-compose exec ocis ./bin/ocis kill storage-metadata
|
||||
docker-compose exec -e STORAGE_METADATA_DRIVER=eos -e STORAGE_METADATA_ROOT=/eos/dockertest/ocis/metadata ocis ./bin/ocis run storage-metadata
|
||||
docker-compose exec ocis ./bin/ocis kill storage-system
|
||||
docker-compose exec -e STORAGE_SYSTEM_DRIVER=eos -e STORAGE_SYSTEM_ROOT=/eos/dockertest/ocis/metadata ocis ./bin/ocis run storage-system
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ func New(opts ...Option) (s *Service, err error) {
|
||||
r := oreg.GetRegistry()
|
||||
if cfg.Repo.Backend == "cs3" {
|
||||
if _, err := r.GetService("com.owncloud.storage.metadata"); err != nil {
|
||||
logger.Error().Err(err).Msg("index: storage-metadata service not present")
|
||||
logger.Error().Err(err).Msg("index: storage-system service not present")
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config/defaults"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(defaults.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
*shared.Commons `yaml:"-"`
|
||||
Service Service `yaml:"-"`
|
||||
Tracing *Tracing `yaml:"tracing"`
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
GRPC GRPCConfig `yaml:"grpc"`
|
||||
HTTP HTTPConfig `yaml:"http"`
|
||||
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
Reva *Reva `yaml:"reva"`
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"STORAGE_METADATA_MACHINE_AUTH_API_KEY"`
|
||||
MetadataUserID string `yaml:"metadata_user_id"`
|
||||
|
||||
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_METADATA_SKIP_USER_GROUPS_IN_TOKEN"`
|
||||
|
||||
Driver string `yaml:"driver" env:"STORAGE_METADATA_DRIVER" desc:"The driver which should be used by the service"`
|
||||
Drivers Drivers `yaml:"drivers"`
|
||||
DataServerURL string `yaml:"data_server_url" env:"STORAGE_METADATA_DATA_SERVER_URL"`
|
||||
TempFolder string `yaml:"temp_folder" env:"STORAGE_METADATA_TEMP_FOLDER"`
|
||||
DataProviderInsecure bool `yaml:"data_provider_insecure" env:"OCIS_INSECURE;STORAGE_METADATA_DATAPROVIDER_INSECURE"`
|
||||
|
||||
Supervised bool `yaml:"-"`
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
type Tracing struct {
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_METADATA_TRACING_ENABLED" desc:"Activates tracing."`
|
||||
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORAGE_METADATA_TRACING_TYPE"`
|
||||
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORAGE_METADATA_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
|
||||
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORAGE_METADATA_TRACING_COLLECTOR"`
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;STORAGE_METADATA_LOG_LEVEL" desc:"The log level."`
|
||||
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;STORAGE_METADATA_LOG_PRETTY" desc:"Activates pretty log output."`
|
||||
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;STORAGE_METADATA_LOG_COLOR" desc:"Activates colorized log output."`
|
||||
File string `yaml:"file" env:"OCIS_LOG_FILE;STORAGE_METADATA_LOG_FILE" desc:"The target log file."`
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
Name string `yaml:"-"`
|
||||
}
|
||||
|
||||
type Debug struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_METADATA_DEBUG_ADDR"`
|
||||
Token string `yaml:"token" env:"STORAGE_METADATA_DEBUG_TOKEN"`
|
||||
Pprof bool `yaml:"pprof" env:"STORAGE_METADATA_DEBUG_PPROF"`
|
||||
Zpages bool `yaml:"zpages" env:"STORAGE_METADATA_DEBUG_ZPAGES"`
|
||||
}
|
||||
|
||||
type GRPCConfig struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_METADATA_GRPC_ADDR" desc:"The address of the grpc service."`
|
||||
Namespace string `yaml:"-"`
|
||||
Protocol string `yaml:"protocol" env:"STORAGE_METADATA_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
|
||||
}
|
||||
|
||||
type HTTPConfig struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_METADATA_HTTP_ADDR" desc:"The address of the http service."`
|
||||
Namespace string `yaml:"-"`
|
||||
Protocol string `yaml:"protocol" env:"STORAGE_METADATA_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
|
||||
}
|
||||
|
||||
type Drivers struct {
|
||||
OCIS OCISDriver `yaml:"ocis"`
|
||||
}
|
||||
|
||||
type OCISDriver struct {
|
||||
// Root is the absolute path to the location of the data
|
||||
Root string `yaml:"root" env:"STORAGE_METADATA_OCIS_ROOT"`
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
SHELL := bash
|
||||
NAME := storage-metadata
|
||||
NAME := storage-system
|
||||
|
||||
include ../../.make/recursion.mk
|
||||
|
||||
14
extensions/storage-system/cmd/storage-system/main.go
Normal file
14
extensions/storage-system/cmd/storage-system/main.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config/defaults"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := command.Execute(defaults.DefaultConfig()); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/logging"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/logging"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/clihelper"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/thejerf/suture/v4"
|
||||
@@ -25,11 +25,11 @@ func GetCommands(cfg *config.Config) cli.Commands {
|
||||
}
|
||||
}
|
||||
|
||||
// Execute is the entry point for the storage-metadata command.
|
||||
// Execute is the entry point for the storage-system command.
|
||||
func Execute(cfg *config.Config) error {
|
||||
app := clihelper.DefaultApp(&cli.App{
|
||||
Name: "storage-metadata",
|
||||
Usage: "Provide metadata storage for oCIS",
|
||||
Name: "storage-system",
|
||||
Usage: "Provide system storage for oCIS",
|
||||
Commands: GetCommands(cfg),
|
||||
})
|
||||
|
||||
@@ -41,16 +41,16 @@ func Execute(cfg *config.Config) error {
|
||||
return app.Run(os.Args)
|
||||
}
|
||||
|
||||
// SutureService allows for the storage-metadata command to be embedded and supervised by a suture supervisor tree.
|
||||
// SutureService allows for the storage-system command to be embedded and supervised by a suture supervisor tree.
|
||||
type SutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewSutureService creates a new storage-metadata.SutureService
|
||||
// NewSutureService creates a new storage-system.SutureService
|
||||
func NewSutureService(cfg *ociscfg.Config) suture.Service {
|
||||
cfg.StorageMetadata.Commons = cfg.Commons
|
||||
cfg.StorageSystem.Commons = cfg.Commons
|
||||
return SutureService{
|
||||
cfg: cfg.StorageMetadata,
|
||||
cfg: cfg.StorageSystem,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ import (
|
||||
"github.com/cs3org/reva/v2/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/logging"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/revaconfig"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/tracing"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/logging"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/revaconfig"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/server/debug"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/tracing"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/external"
|
||||
"github.com/owncloud/ocis/ocis-pkg/sync"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
|
||||
tw "github.com/olekukonko/tablewriter"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
79
extensions/storage-system/pkg/config/config.go
Normal file
79
extensions/storage-system/pkg/config/config.go
Normal file
@@ -0,0 +1,79 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
*shared.Commons `yaml:"-"`
|
||||
Service Service `yaml:"-"`
|
||||
Tracing *Tracing `yaml:"tracing"`
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
GRPC GRPCConfig `yaml:"grpc"`
|
||||
HTTP HTTPConfig `yaml:"http"`
|
||||
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
Reva *Reva `yaml:"reva"`
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"STORAGE_SYSTEM_MACHINE_AUTH_API_KEY"`
|
||||
MetadataUserID string `yaml:"metadata_user_id"`
|
||||
|
||||
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"STORAGE_SYSTEM_SKIP_USER_GROUPS_IN_TOKEN"`
|
||||
|
||||
Driver string `yaml:"driver" env:"STORAGE_SYSTEM_DRIVER" desc:"The driver which should be used by the service"`
|
||||
Drivers Drivers `yaml:"drivers"`
|
||||
DataServerURL string `yaml:"data_server_url" env:"STORAGE_SYSTEM_DATA_SERVER_URL"`
|
||||
TempFolder string `yaml:"temp_folder" env:"STORAGE_SYSTEM_TEMP_FOLDER"`
|
||||
DataProviderInsecure bool `yaml:"data_provider_insecure" env:"OCIS_INSECURE;STORAGE_SYSTEM_DATAPROVIDER_INSECURE"`
|
||||
|
||||
Supervised bool `yaml:"-"`
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
type Tracing struct {
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_SYSTEM_TRACING_ENABLED" desc:"Activates tracing."`
|
||||
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORAGE_SYSTEM_TRACING_TYPE"`
|
||||
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORAGE_SYSTEM_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
|
||||
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORAGE_SYSTEM_TRACING_COLLECTOR"`
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;STORAGE_SYSTEM_LOG_LEVEL" desc:"The log level."`
|
||||
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;STORAGE_SYSTEM_LOG_PRETTY" desc:"Activates pretty log output."`
|
||||
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;STORAGE_SYSTEM_LOG_COLOR" desc:"Activates colorized log output."`
|
||||
File string `yaml:"file" env:"OCIS_LOG_FILE;STORAGE_SYSTEM_LOG_FILE" desc:"The target log file."`
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
Name string `yaml:"-"`
|
||||
}
|
||||
|
||||
type Debug struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_SYSTEM_DEBUG_ADDR"`
|
||||
Token string `yaml:"token" env:"STORAGE_SYSTEM_DEBUG_TOKEN"`
|
||||
Pprof bool `yaml:"pprof" env:"STORAGE_SYSTEM_DEBUG_PPROF"`
|
||||
Zpages bool `yaml:"zpages" env:"STORAGE_SYSTEM_DEBUG_ZPAGES"`
|
||||
}
|
||||
|
||||
type GRPCConfig struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_SYSTEM_GRPC_ADDR" desc:"The address of the grpc service."`
|
||||
Namespace string `yaml:"-"`
|
||||
Protocol string `yaml:"protocol" env:"STORAGE_SYSTEM_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
|
||||
}
|
||||
|
||||
type HTTPConfig struct {
|
||||
Addr string `yaml:"addr" env:"STORAGE_SYSTEM_HTTP_ADDR" desc:"The address of the http service."`
|
||||
Namespace string `yaml:"-"`
|
||||
Protocol string `yaml:"protocol" env:"STORAGE_SYSTEM_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
|
||||
}
|
||||
|
||||
type Drivers struct {
|
||||
OCIS OCISDriver `yaml:"ocis"`
|
||||
}
|
||||
|
||||
type OCISDriver struct {
|
||||
// Root is the absolute path to the location of the data
|
||||
Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT"`
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package defaults
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ func DefaultConfig() *config.Config {
|
||||
Protocol: "tcp",
|
||||
},
|
||||
Service: config.Service{
|
||||
Name: "storage-metadata",
|
||||
Name: "storage-system",
|
||||
},
|
||||
Reva: &config.Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
@@ -3,8 +3,8 @@ package parser
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config/defaults"
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
|
||||
@@ -7,5 +7,5 @@ type Reva struct {
|
||||
|
||||
// TokenManager is the config for using the reva token manager
|
||||
type TokenManager struct {
|
||||
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;STORAGE_METADATA_JWT_SECRET"`
|
||||
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;STORAGE_SYSTEM_JWT_SECRET"`
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package logging
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ package revaconfig
|
||||
|
||||
import (
|
||||
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
)
|
||||
|
||||
// StorageMetadataFromStruct will adapt an oCIS config struct into a reva mapstructure to start a reva service.
|
||||
@@ -3,7 +3,7 @@ package debug
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/service/debug"
|
||||
"github.com/owncloud/ocis/ocis-pkg/version"
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
package tracing
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/ocis-pkg/tracing"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
@@ -26,9 +26,9 @@ import (
|
||||
search "github.com/owncloud/ocis/extensions/search/pkg/config"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/config"
|
||||
sharing "github.com/owncloud/ocis/extensions/sharing/pkg/config"
|
||||
storagemetadata "github.com/owncloud/ocis/extensions/storage-metadata/pkg/config"
|
||||
storagepublic "github.com/owncloud/ocis/extensions/storage-publiclink/pkg/config"
|
||||
storageshares "github.com/owncloud/ocis/extensions/storage-shares/pkg/config"
|
||||
storagesystem "github.com/owncloud/ocis/extensions/storage-system/pkg/config"
|
||||
storageusers "github.com/owncloud/ocis/extensions/storage-users/pkg/config"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/config"
|
||||
thumbnails "github.com/owncloud/ocis/extensions/thumbnails/pkg/config"
|
||||
@@ -72,36 +72,36 @@ type Config struct {
|
||||
MetadataUserID string `yaml:"metadata_user_id" env:"METADATA_USER_ID"`
|
||||
Runtime Runtime `yaml:"runtime"`
|
||||
|
||||
Accounts *accounts.Config `yaml:"accounts"`
|
||||
AppProvider *appProvider.Config `yaml:"app-provider"`
|
||||
AppRegistry *appRegistry.Config `yaml:"app-registry"`
|
||||
Audit *audit.Config `yaml:"audit"`
|
||||
AuthBasic *authbasic.Config `yaml:"auth-basic"`
|
||||
AuthBearer *authbearer.Config `yaml:"auth-bearer"`
|
||||
AuthMachine *authmachine.Config `yaml:"auth-machine"`
|
||||
Frontend *frontend.Config `yaml:"frontend"`
|
||||
Gateway *gateway.Config `yaml:"gateway"`
|
||||
GLAuth *glauth.Config `yaml:"glauth"`
|
||||
Graph *graph.Config `yaml:"graph"`
|
||||
GraphExplorer *graphExplorer.Config `yaml:"graph-explorer"`
|
||||
Group *group.Config `yaml:"group"`
|
||||
IDM *idm.Config `yaml:"idm"`
|
||||
IDP *idp.Config `yaml:"idp"`
|
||||
Nats *nats.Config `yaml:"nats"`
|
||||
Notifications *notifications.Config `yaml:"notifications"`
|
||||
OCDav *ocdav.Config `yaml:"ocdav"`
|
||||
OCS *ocs.Config `yaml:"ocs"`
|
||||
Proxy *proxy.Config `yaml:"proxy"`
|
||||
Settings *settings.Config `yaml:"settings"`
|
||||
Sharing *sharing.Config `yaml:"sharing"`
|
||||
StorageMetadata *storagemetadata.Config `yaml:"storage-metadata"`
|
||||
StoragePublicLink *storagepublic.Config `yaml:"storage-public"`
|
||||
StorageShares *storageshares.Config `yaml:"storage-shares"`
|
||||
StorageUsers *storageusers.Config `yaml:"storage-users"`
|
||||
Store *store.Config `yaml:"store"`
|
||||
Thumbnails *thumbnails.Config `yaml:"thumbnails"`
|
||||
User *user.Config `yaml:"user"`
|
||||
Web *web.Config `yaml:"web"`
|
||||
WebDAV *webdav.Config `yaml:"webdav"`
|
||||
Search *search.Config `yaml:"search"`
|
||||
Accounts *accounts.Config `yaml:"accounts"`
|
||||
AppProvider *appProvider.Config `yaml:"app-provider"`
|
||||
AppRegistry *appRegistry.Config `yaml:"app-registry"`
|
||||
Audit *audit.Config `yaml:"audit"`
|
||||
AuthBasic *authbasic.Config `yaml:"auth-basic"`
|
||||
AuthBearer *authbearer.Config `yaml:"auth-bearer"`
|
||||
AuthMachine *authmachine.Config `yaml:"auth-machine"`
|
||||
Frontend *frontend.Config `yaml:"frontend"`
|
||||
Gateway *gateway.Config `yaml:"gateway"`
|
||||
GLAuth *glauth.Config `yaml:"glauth"`
|
||||
Graph *graph.Config `yaml:"graph"`
|
||||
GraphExplorer *graphExplorer.Config `yaml:"graph-explorer"`
|
||||
Group *group.Config `yaml:"group"`
|
||||
IDM *idm.Config `yaml:"idm"`
|
||||
IDP *idp.Config `yaml:"idp"`
|
||||
Nats *nats.Config `yaml:"nats"`
|
||||
Notifications *notifications.Config `yaml:"notifications"`
|
||||
OCDav *ocdav.Config `yaml:"ocdav"`
|
||||
OCS *ocs.Config `yaml:"ocs"`
|
||||
Proxy *proxy.Config `yaml:"proxy"`
|
||||
Settings *settings.Config `yaml:"settings"`
|
||||
Sharing *sharing.Config `yaml:"sharing"`
|
||||
StorageSystem *storagesystem.Config `yaml:"storage-system"`
|
||||
StoragePublicLink *storagepublic.Config `yaml:"storage-public"`
|
||||
StorageShares *storageshares.Config `yaml:"storage-shares"`
|
||||
StorageUsers *storageusers.Config `yaml:"storage-users"`
|
||||
Store *store.Config `yaml:"store"`
|
||||
Thumbnails *thumbnails.Config `yaml:"thumbnails"`
|
||||
User *user.Config `yaml:"user"`
|
||||
Web *web.Config `yaml:"web"`
|
||||
WebDAV *webdav.Config `yaml:"webdav"`
|
||||
Search *search.Config `yaml:"search"`
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import (
|
||||
search "github.com/owncloud/ocis/extensions/search/pkg/config/defaults"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/config/defaults"
|
||||
sharing "github.com/owncloud/ocis/extensions/sharing/pkg/config/defaults"
|
||||
storagemetadata "github.com/owncloud/ocis/extensions/storage-metadata/pkg/config/defaults"
|
||||
storagepublic "github.com/owncloud/ocis/extensions/storage-publiclink/pkg/config/defaults"
|
||||
storageshares "github.com/owncloud/ocis/extensions/storage-shares/pkg/config/defaults"
|
||||
storageSystem "github.com/owncloud/ocis/extensions/storage-system/pkg/config/defaults"
|
||||
storageusers "github.com/owncloud/ocis/extensions/storage-users/pkg/config/defaults"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/config/defaults"
|
||||
thumbnails "github.com/owncloud/ocis/extensions/thumbnails/pkg/config/defaults"
|
||||
@@ -65,9 +65,9 @@ func DefaultConfig() *Config {
|
||||
Search: search.FullDefaultConfig(),
|
||||
Settings: settings.DefaultConfig(),
|
||||
Sharing: sharing.DefaultConfig(),
|
||||
StorageMetadata: storagemetadata.DefaultConfig(),
|
||||
StoragePublicLink: storagepublic.DefaultConfig(),
|
||||
StorageShares: storageshares.DefaultConfig(),
|
||||
StorageSystem: storageSystem.DefaultConfig(),
|
||||
StorageUsers: storageusers.DefaultConfig(),
|
||||
Store: store.DefaultConfig(),
|
||||
Thumbnails: thumbnails.DefaultConfig(),
|
||||
|
||||
@@ -3,31 +3,31 @@ package command
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-system/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// StorageMetadataCommand is the entrypoint for the StorageMetadata command.
|
||||
func StorageMetadataCommand(cfg *config.Config) *cli.Command {
|
||||
// StorageSystemCommand is the entrypoint for the StorageSystem command.
|
||||
func StorageSystemCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cfg.StorageMetadata.Service.Name,
|
||||
Usage: subcommandDescription(cfg.StorageMetadata.Service.Name),
|
||||
Name: cfg.StorageSystem.Service.Name,
|
||||
Usage: subcommandDescription(cfg.StorageSystem.Service.Name),
|
||||
Category: "extensions",
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg); err != nil {
|
||||
fmt.Printf("%v", err)
|
||||
return err
|
||||
}
|
||||
cfg.StorageMetadata.Commons = cfg.Commons
|
||||
cfg.StorageSystem.Commons = cfg.Commons
|
||||
return nil
|
||||
},
|
||||
Subcommands: command.GetCommands(cfg.StorageMetadata),
|
||||
Subcommands: command.GetCommands(cfg.StorageSystem),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(StorageMetadataCommand)
|
||||
register.AddCommand(StorageSystemCommand)
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ type OcisConfig struct {
|
||||
AuthBearer AuthbearerExtension `yaml:"auth-bearer"`
|
||||
User UserAndGroupExtension
|
||||
Group UserAndGroupExtension
|
||||
StorageMetadata DataProviderInsecureSettings `yaml:"storage-metadata"`
|
||||
StorageMetadata DataProviderInsecureSettings `yaml:"storage-system"`
|
||||
StorageUsers DataProviderInsecureSettings `yaml:"storage-users"`
|
||||
Ocdav InsecureExtension
|
||||
Thumbnails ThumbNailExtension
|
||||
|
||||
@@ -41,9 +41,9 @@ import (
|
||||
search "github.com/owncloud/ocis/extensions/search/pkg/command"
|
||||
settings "github.com/owncloud/ocis/extensions/settings/pkg/command"
|
||||
sharing "github.com/owncloud/ocis/extensions/sharing/pkg/command"
|
||||
storagemetadata "github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
|
||||
storagepublic "github.com/owncloud/ocis/extensions/storage-publiclink/pkg/command"
|
||||
storageshares "github.com/owncloud/ocis/extensions/storage-shares/pkg/command"
|
||||
storageSystem "github.com/owncloud/ocis/extensions/storage-system/pkg/command"
|
||||
storageusers "github.com/owncloud/ocis/extensions/storage-users/pkg/command"
|
||||
store "github.com/owncloud/ocis/extensions/store/pkg/command"
|
||||
thumbnails "github.com/owncloud/ocis/extensions/thumbnails/pkg/command"
|
||||
@@ -110,7 +110,7 @@ func NewService(options ...Option) (*Service, error) {
|
||||
|
||||
s.ServicesRegistry[opts.Config.Settings.Service.Name] = settings.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Nats.Service.Name] = nats.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.StorageMetadata.Service.Name] = storagemetadata.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.StorageSystem.Service.Name] = storageSystem.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.GLAuth.Service.Name] = glauth.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.Graph.Service.Name] = graph.NewSutureService
|
||||
s.ServicesRegistry[opts.Config.GraphExplorer.Service.Name] = graphExplorer.NewSutureService
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
STORAGE_USERS_DRIVER: $STORAGE_DRIVER
|
||||
STORAGE_USERS_DRIVER_LOCAL_ROOT: /srv/app/tmp/ocis/local/root
|
||||
STORAGE_USERS_DRIVER_OCIS_ROOT: /srv/app/tmp/ocis/storage/users
|
||||
STORAGE_METADATA_DRIVER_OCIS_ROOT: /srv/app/tmp/ocis/storage/metadata
|
||||
STORAGE_SYSTEM_DRIVER_OCIS_ROOT: /srv/app/tmp/ocis/storage/metadata
|
||||
STORAGE_SHARING_USER_JSON_FILE: /srv/app/tmp/ocis/shares.json
|
||||
SETTINGS_DATA_PATH: "/srv/app/tmp/ocis/settings"
|
||||
PROXY_ENABLE_BASIC_AUTH: "true"
|
||||
|
||||
Reference in New Issue
Block a user