configure users and metadata storage separately

This commit is contained in:
Willy Kloucek
2021-10-11 11:39:36 +02:00
parent 5f0cf077ca
commit d74816f242
34 changed files with 1196 additions and 605 deletions
+3 -12
View File
@@ -12,6 +12,7 @@ import (
"github.com/gofrs/uuid"
"github.com/oklog/run"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/storage/pkg/command/storagedrivers"
"github.com/owncloud/ocis/storage/pkg/config"
"github.com/owncloud/ocis/storage/pkg/flagset"
"github.com/owncloud/ocis/storage/pkg/server/debug"
@@ -43,16 +44,6 @@ func StorageHome(cfg *config.Config) *cli.Command {
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// override driver enable home option with home config
if cfg.Reva.Storages.Home.EnableHome {
cfg.Reva.Storages.Common.EnableHome = true
cfg.Reva.Storages.EOS.EnableHome = true
cfg.Reva.Storages.Local.EnableHome = true
cfg.Reva.Storages.OwnCloud.EnableHome = true
cfg.Reva.Storages.OwnCloudSQL.EnableHome = true
cfg.Reva.Storages.S3.EnableHome = true
cfg.Reva.Storages.S3NG.EnableHome = true
}
rcfg := storageHomeConfigFromStruct(c, cfg)
gr.Add(func() error {
@@ -117,7 +108,7 @@ func storageHomeConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageHome.Driver,
"drivers": drivers(cfg),
"drivers": storagedrivers.HomeDrivers(cfg),
"mount_path": cfg.Reva.StorageHome.MountPath,
"mount_id": cfg.Reva.StorageHome.MountID,
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
@@ -134,7 +125,7 @@ func storageHomeConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]
"dataprovider": map[string]interface{}{
"prefix": cfg.Reva.StorageHome.HTTPPrefix,
"driver": cfg.Reva.StorageHome.Driver,
"drivers": drivers(cfg),
"drivers": storagedrivers.HomeDrivers(cfg),
"timeout": 86400,
"insecure": true,
"disable_tus": false,