diff --git a/storage/Makefile b/storage/Makefile index fcc182efc..ced3a3b7c 100644 --- a/storage/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/storage/cmd/storage/main.go b/storage/cmd/storage/main.go index 6f98e4b3c..18cccfe87 100644 --- a/storage/cmd/storage/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/storage/pkg/command/authbasic.go b/storage/pkg/command/authbasic.go index f5d600eb8..fa3f98364 100644 --- a/storage/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/storage/pkg/command/authbearer.go b/storage/pkg/command/authbearer.go index a1807342f..1339766ae 100644 --- a/storage/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/storage/pkg/command/drivers.go b/storage/pkg/command/drivers.go index 5acd18bc0..fc4025d6c 100644 --- a/storage/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/storage/pkg/command/frontend.go b/storage/pkg/command/frontend.go index bba097f35..bdc06a40a 100644 --- a/storage/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/storage/pkg/command/gateway.go b/storage/pkg/command/gateway.go index 513367dae..ebf6c1218 100644 --- a/storage/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/storage/pkg/command/health.go b/storage/pkg/command/health.go index 12217ce6b..d05bff486 100644 --- a/storage/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/storage/pkg/command/root.go b/storage/pkg/command/root.go index 15bb9f7c8..d6abe0acf 100644 --- a/storage/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: "storage", Version: version.String, - Usage: "Example service for Reva/oCIS", + Usage: "Storage service for oCIS", Compiled: version.Compiled(), Authors: []*cli.Author{ @@ -41,7 +41,7 @@ func Execute() error { 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/storage/pkg/command/sharing.go b/storage/pkg/command/sharing.go index 101542b54..8605a3a55 100644 --- a/storage/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/storage/pkg/command/storageeos.go b/storage/pkg/command/storageeos.go index 6a7651dea..a28630d88 100644 --- a/storage/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/storage/pkg/command/storageeosdata.go b/storage/pkg/command/storageeosdata.go index 6db4076dc..2c288ed9d 100644 --- a/storage/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/storage/pkg/command/storagehome.go b/storage/pkg/command/storagehome.go index 939b4e5e6..edfa59240 100644 --- a/storage/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/storage/pkg/command/storagehomedata.go b/storage/pkg/command/storagehomedata.go index 2d8eb8049..063f75926 100644 --- a/storage/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/storage/pkg/command/storagemetadata.go b/storage/pkg/command/storagemetadata.go index 00fa13de6..1edd5e1de 100644 --- a/storage/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/storage/pkg/command/storageoc.go b/storage/pkg/command/storageoc.go index 4a05a6663..5a869129b 100644 --- a/storage/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/storage/pkg/command/storageocdata.go b/storage/pkg/command/storageocdata.go index 7ab64334f..a91b3bc0f 100644 --- a/storage/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/storage/pkg/command/storagepubliclink.go b/storage/pkg/command/storagepubliclink.go index b8eb41c2a..0a962ec20 100644 --- a/storage/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/storage/pkg/command/storageroot.go b/storage/pkg/command/storageroot.go index 8b6b808ec..7fa81c6eb 100644 --- a/storage/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/storage/pkg/command/users.go b/storage/pkg/command/users.go index 6b7f701b8..28f3e6b11 100644 --- a/storage/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/storage/pkg/flagset/authbasic.go b/storage/pkg/flagset/authbasic.go index d32c29790..75d5b04ba 100644 --- a/storage/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/storage/pkg/flagset/authbearer.go b/storage/pkg/flagset/authbearer.go index 65c2bb33d..0c6edf408 100644 --- a/storage/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/storage/pkg/flagset/debug.go b/storage/pkg/flagset/debug.go index 7b29a9698..b0cc5bd65 100644 --- a/storage/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/storage/pkg/flagset/drivereos.go b/storage/pkg/flagset/drivereos.go index c064a0a19..8cbab46b9 100644 --- a/storage/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/storage/pkg/flagset/driverlocal.go b/storage/pkg/flagset/driverlocal.go index 9f174687c..1bb159f90 100644 --- a/storage/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/storage/pkg/flagset/driverocis.go b/storage/pkg/flagset/driverocis.go index 17363370c..495c9e9a4 100644 --- a/storage/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/storage/pkg/flagset/driverowncloud.go b/storage/pkg/flagset/driverowncloud.go index 1cb56cdea..b41e8f9c2 100644 --- a/storage/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/data", 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/storage/pkg/flagset/frontend.go b/storage/pkg/flagset/frontend.go index 981a4788a..6bb97ddea 100644 --- a/storage/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/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index 5c5eb1d21..4a8c8e456 100644 --- a/storage/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/storage/pkg/flagset/health.go b/storage/pkg/flagset/health.go index ca462d618..381f35670 100644 --- a/storage/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/storage/pkg/flagset/ldap.go b/storage/pkg/flagset/ldap.go index 11bfb996c..0c12ab405 100644 --- a/storage/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/storage/pkg/flagset/root.go b/storage/pkg/flagset/root.go index 3871571d8..1c7cbd8af 100644 --- a/storage/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/storage/pkg/flagset/secret.go b/storage/pkg/flagset/secret.go index 76c886cc1..e51b7acd7 100644 --- a/storage/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/storage/pkg/flagset/sharing.go b/storage/pkg/flagset/sharing.go index 8000254eb..669b4f039 100644 --- a/storage/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/storage/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/storage/pkg/flagset/storageeos.go b/storage/pkg/flagset/storageeos.go index 256cf7bfb..2838a4564 100644 --- a/storage/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/storage/pkg/flagset/storageeosdata.go b/storage/pkg/flagset/storageeosdata.go index e0b355b85..584a4b922 100644 --- a/storage/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/storage/pkg/flagset/storagehome.go b/storage/pkg/flagset/storagehome.go index 5ba95374d..9b00e8f7a 100644 --- a/storage/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/storage/pkg/flagset/storagehomedata.go b/storage/pkg/flagset/storagehomedata.go index 28755c18f..428df1803 100644 --- a/storage/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/storage/pkg/flagset/storagemetadata.go b/storage/pkg/flagset/storagemetadata.go index f95b3a009..094dc07f0 100644 --- a/storage/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/storage/pkg/flagset/storageoc.go b/storage/pkg/flagset/storageoc.go index 04389d2e4..8280ec34f 100644 --- a/storage/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/storage/pkg/flagset/storageocdata.go b/storage/pkg/flagset/storageocdata.go index e89b563ba..8e9ba3a9e 100644 --- a/storage/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/storage/pkg/flagset/storagepubliclink.go b/storage/pkg/flagset/storagepubliclink.go index d58121aa5..ec373f0fe 100644 --- a/storage/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/storage/pkg/flagset/storageroot.go b/storage/pkg/flagset/storageroot.go index 46fd261d5..679c77c99 100644 --- a/storage/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/storage/pkg/flagset/tracing.go b/storage/pkg/flagset/tracing.go index a1420ab31..bf0540458 100644 --- a/storage/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/storage/pkg/flagset/users.go b/storage/pkg/flagset/users.go index b386d5fbe..0ce28b597 100644 --- a/storage/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/storage/pkg/server/debug/option.go b/storage/pkg/server/debug/option.go index f9ed1d8de..7da000071 100644 --- a/storage/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/storage/pkg/server/debug/server.go b/storage/pkg/server/debug/server.go index e18f6d4ff..e2ef8bd8a 100644 --- a/storage/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.