fix eos config (#127)
* fix eos config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix ldap idp config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * set default file for user share manager json driver Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update reva Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update reva Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix user layouts and owncloud driver frontend dav prefix Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix acceptance tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -125,7 +125,7 @@ func Gateway(cfg *config.Config) *cli.Command {
|
||||
cfg.Reva.StorageRoot.MountPath: cfg.Reva.StorageRoot.URL,
|
||||
cfg.Reva.StorageRoot.MountID: cfg.Reva.StorageRoot.URL,
|
||||
cfg.Reva.StorageHome.MountPath: cfg.Reva.StorageHome.URL,
|
||||
// home has no lookup by mount id because it resolves to another storage
|
||||
// the home storage has no mount id. In responses it returns the mount id of the actual storage
|
||||
cfg.Reva.StorageEOS.MountPath: cfg.Reva.StorageEOS.URL,
|
||||
cfg.Reva.StorageEOS.MountID: cfg.Reva.StorageEOS.URL,
|
||||
cfg.Reva.StorageOC.MountPath: cfg.Reva.StorageOC.URL,
|
||||
|
||||
@@ -85,6 +85,11 @@ func Sharing(cfg *config.Config) *cli.Command {
|
||||
"services": map[string]interface{}{
|
||||
"usershareprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.Sharing.UserDriver,
|
||||
"drivers": map[string]interface{}{
|
||||
"json": map[string]interface{}{
|
||||
"file": cfg.Reva.Sharing.UserJSONFile,
|
||||
},
|
||||
},
|
||||
},
|
||||
"publicshareprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.Sharing.PublicDriver,
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis-reva/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",
|
||||
Flags: flagset.StorageEOSWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageEOS.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring reva to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageEOS.MaxCPUs,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"grpc": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageEOS.Network,
|
||||
"address": cfg.Reva.StorageEOS.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageEOS.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
|
||||
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
|
||||
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
|
||||
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
|
||||
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
|
||||
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
|
||||
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
|
||||
"keytab": cfg.Reva.Storages.EOS.Keytab,
|
||||
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
|
||||
"enable_home": cfg.Reva.Storages.EOS.EnableHome,
|
||||
"user_layout": cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
"local": map[string]interface{}{
|
||||
"root": cfg.Reva.Storages.Local.Root,
|
||||
},
|
||||
"owncloud": map[string]interface{}{
|
||||
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
|
||||
"scan": cfg.Reva.Storages.OwnCloud.Scan,
|
||||
"redis": cfg.Reva.Storages.OwnCloud.Redis,
|
||||
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
"user_layout": cfg.Reva.Storages.OwnCloud.Layout,
|
||||
},
|
||||
"s3": map[string]interface{}{
|
||||
"region": cfg.Reva.Storages.S3.Region,
|
||||
"access_key": cfg.Reva.Storages.S3.AccessKey,
|
||||
"secret_key": cfg.Reva.Storages.S3.SecretKey,
|
||||
"endpoint": cfg.Reva.Storages.S3.Endpoint,
|
||||
"bucket": cfg.Reva.Storages.S3.Bucket,
|
||||
"prefix": cfg.Reva.Storages.S3.Prefix,
|
||||
},
|
||||
},
|
||||
"mount_path": cfg.Reva.StorageEOS.MountPath,
|
||||
"mount_id": cfg.Reva.StorageEOS.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageEOS.ExposeDataServer,
|
||||
// TODO use cfg.Reva.SStorageEOSData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
|
||||
"enable_home_creation": cfg.Reva.StorageEOS.EnableHomeCreation,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.Run(rcfg, pidFile)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageEOS.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis-reva/pkg/config"
|
||||
"github.com/owncloud/ocis-reva/pkg/flagset"
|
||||
"github.com/owncloud/ocis-reva/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-oc-data",
|
||||
Usage: "Start reva storage-oc-data service",
|
||||
Flags: flagset.StorageEOSDataWithConfig(cfg),
|
||||
Before: func(c *cli.Context) error {
|
||||
cfg.Reva.StorageEOSData.Services = c.StringSlice("service")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if cfg.Tracing.Enabled {
|
||||
switch t := cfg.Tracing.Type; t {
|
||||
case "agent":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
case "jaeger":
|
||||
logger.Info().
|
||||
Str("type", t).
|
||||
Msg("configuring reva to use the jaeger tracing backend")
|
||||
|
||||
case "zipkin":
|
||||
logger.Error().
|
||||
Str("type", t).
|
||||
Msg("Reva only supports the jaeger tracing backend")
|
||||
|
||||
default:
|
||||
logger.Warn().
|
||||
Str("type", t).
|
||||
Msg("Unknown tracing backend")
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.Debug().
|
||||
Msg("Tracing is not enabled")
|
||||
}
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
//metrics = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
{
|
||||
uuid := uuid.Must(uuid.NewV4())
|
||||
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
|
||||
|
||||
rcfg := map[string]interface{}{
|
||||
"core": map[string]interface{}{
|
||||
"max_cpus": cfg.Reva.StorageEOSData.MaxCPUs,
|
||||
},
|
||||
"shared": map[string]interface{}{
|
||||
"jwt_secret": cfg.Reva.JWTSecret,
|
||||
},
|
||||
"http": map[string]interface{}{
|
||||
"network": cfg.Reva.StorageEOSData.Network,
|
||||
"address": cfg.Reva.StorageEOSData.Addr,
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.Reva.StorageEOSData.Prefix,
|
||||
"driver": cfg.Reva.StorageEOSData.Driver,
|
||||
"drivers": map[string]interface{}{
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
|
||||
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
|
||||
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
|
||||
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
|
||||
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
|
||||
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
|
||||
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
|
||||
"keytab": cfg.Reva.Storages.EOS.Keytab,
|
||||
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
|
||||
"enable_home": cfg.Reva.Storages.EOS.EnableHome,
|
||||
"user_layout": cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
"local": map[string]interface{}{
|
||||
"root": cfg.Reva.Storages.Local.Root,
|
||||
},
|
||||
"owncloud": map[string]interface{}{
|
||||
"datadirectory": cfg.Reva.Storages.OwnCloud.Datadirectory,
|
||||
"scan": cfg.Reva.Storages.OwnCloud.Scan,
|
||||
"redis": cfg.Reva.Storages.OwnCloud.Redis,
|
||||
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
"user_layout": cfg.Reva.Storages.OwnCloud.Layout,
|
||||
},
|
||||
"s3": map[string]interface{}{
|
||||
"region": cfg.Reva.Storages.S3.Region,
|
||||
"access_key": cfg.Reva.Storages.S3.AccessKey,
|
||||
"secret_key": cfg.Reva.Storages.S3.SecretKey,
|
||||
"endpoint": cfg.Reva.Storages.S3.Endpoint,
|
||||
"bucket": cfg.Reva.Storages.S3.Bucket,
|
||||
"prefix": cfg.Reva.Storages.S3.Prefix,
|
||||
},
|
||||
},
|
||||
"temp_folder": cfg.Reva.StorageEOSData.TempFolder,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
runtime.Run(rcfg, pidFile)
|
||||
return nil
|
||||
}, func(_ error) {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name).
|
||||
Msg("Shutting down server")
|
||||
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
server, err := debug.Server(
|
||||
debug.Name(c.Command.Name+"-debug"),
|
||||
debug.Addr(cfg.Reva.StorageEOSData.DebugAddr),
|
||||
debug.Logger(logger),
|
||||
debug.Context(ctx),
|
||||
debug.Config(cfg),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to initialize server")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
gr.Add(func() error {
|
||||
return server.ListenAndServe()
|
||||
}, func(_ error) {
|
||||
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
|
||||
|
||||
defer timeout()
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(ctx); err != nil {
|
||||
logger.Info().
|
||||
Err(err).
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Failed to shutdown server")
|
||||
} else {
|
||||
logger.Info().
|
||||
Str("server", c.Command.Name+"-debug").
|
||||
Msg("Shutting down server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
||||
gr.Add(func() error {
|
||||
signal.Notify(stop, os.Interrupt)
|
||||
|
||||
<-stop
|
||||
|
||||
return nil
|
||||
}, func(err error) {
|
||||
close(stop)
|
||||
cancel()
|
||||
})
|
||||
}
|
||||
|
||||
return gr.Run()
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,8 @@ func StorageHome(cfg *config.Config) *cli.Command {
|
||||
"drivers": map[string]interface{}{
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
|
||||
@@ -89,6 +89,8 @@ func StorageHomeData(cfg *config.Config) *cli.Command {
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
|
||||
|
||||
@@ -87,6 +87,8 @@ func StorageOC(cfg *config.Config) *cli.Command {
|
||||
"drivers": map[string]interface{}{
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
|
||||
@@ -88,6 +88,8 @@ func StorageOCData(cfg *config.Config) *cli.Command {
|
||||
"drivers": map[string]interface{}{
|
||||
"eos": map[string]interface{}{
|
||||
"namespace": cfg.Reva.Storages.EOS.Namespace,
|
||||
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
|
||||
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
|
||||
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
|
||||
"master_url": cfg.Reva.Storages.EOS.MasterURL,
|
||||
|
||||
@@ -31,6 +31,7 @@ type Gateway struct {
|
||||
type Sharing struct {
|
||||
Port
|
||||
UserDriver string
|
||||
UserJSONFile string
|
||||
PublicDriver string
|
||||
}
|
||||
|
||||
@@ -92,6 +93,13 @@ type DriverEOS struct {
|
||||
// Namespace for metadata operations
|
||||
Namespace string
|
||||
|
||||
// ShadowNamespace for storing shadow data
|
||||
ShadowNamespace string
|
||||
|
||||
// ShareFolder defines the name of the folder in the
|
||||
// shadowed namespace. Ex: /eos/user/.shadow/h/hugo/MyShares
|
||||
ShareFolder string
|
||||
|
||||
// Location of the eos binary.
|
||||
// Default is /usr/bin/eos.
|
||||
EosBinary string
|
||||
|
||||
@@ -150,6 +150,13 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_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"},
|
||||
Destination: &cfg.Reva.LDAP.IDP,
|
||||
},
|
||||
// ldap dn is always the dn
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-schema-uid",
|
||||
|
||||
+25
-24
@@ -137,8 +137,9 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_GATEWAY_SERVICES"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "commit-share-to-storage-grant",
|
||||
Value: true,
|
||||
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"},
|
||||
Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant,
|
||||
@@ -153,7 +154,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "share-folder",
|
||||
Value: "/",
|
||||
Value: "Shares",
|
||||
Usage: "mount shares in this folder of the home storage provider",
|
||||
EnvVars: []string{"REVA_GATEWAY_SHARE_FOLDER"},
|
||||
Destination: &cfg.Reva.Gateway.ShareFolder,
|
||||
@@ -229,7 +230,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-root-mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440001",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009152",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_ROOT_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageRoot.MountID,
|
||||
@@ -249,20 +250,28 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_PATH"},
|
||||
Destination: &cfg.Reva.StorageHome.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-home-mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440000",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageHome.MountID,
|
||||
},
|
||||
// The home storage has no mount id. In responses it returns the mount id of the actual storage
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-home-data-url",
|
||||
Value: "localhost:9156",
|
||||
Name: "storage-eos-url",
|
||||
Value: "localhost:9158",
|
||||
Usage: "URL to use for the reva service",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_DATA_URL"},
|
||||
Destination: &cfg.Reva.StorageHomeData.URL,
|
||||
EnvVars: []string{"REVA_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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountID,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
@@ -281,18 +290,10 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-oc-mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440000",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageOC.MountID,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-oc-data-url",
|
||||
Value: "localhost:9164",
|
||||
Usage: "URL to use for the reva service",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_DATA_URL"},
|
||||
Destination: &cfg.Reva.StorageOCData.URL,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,13 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_SHARING_USER_DRIVER"},
|
||||
Destination: &cfg.Reva.Sharing.UserDriver,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "user-json-file",
|
||||
Value: "/var/tmp/reva/shares.json",
|
||||
Usage: "file used to persist shares for the UserShareProvider",
|
||||
EnvVars: []string{"REVA_SHARING_USER_JSON_FILE"},
|
||||
Destination: &cfg.Reva.Sharing.UserJSONFile,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "public-driver",
|
||||
Value: "memory",
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/config"
|
||||
)
|
||||
|
||||
// StorageEOSWithConfig applies cfg to the root flagset
|
||||
func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"REVA_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: "jaeger",
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"REVA_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: "",
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: "",
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: "reva",
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"REVA_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9159",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOS.DebugAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: "",
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"REVA_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-pprof",
|
||||
Usage: "Enable pprof debugging",
|
||||
EnvVars: []string{"REVA_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-zpages",
|
||||
Usage: "Enable zpages debugging",
|
||||
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
|
||||
// REVA
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: "Pive-Fumkiu4",
|
||||
Usage: "Shared jwt secret for reva service communication",
|
||||
EnvVars: []string{"REVA_JWT_SECRET"},
|
||||
Destination: &cfg.Reva.JWTSecret,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage oc
|
||||
|
||||
&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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.StorageEOS.URL,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "service",
|
||||
Value: cli.NewStringSlice("storageprovider"),
|
||||
Usage: "--service storageprovider [--service otherservice]",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SERVICES"},
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "eos",
|
||||
Usage: "storage driver, eg. local, eos, owncloud or s3",
|
||||
EnvVars: []string{"REVA_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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.StorageEOS.MountID,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "expose-data-server",
|
||||
Value: true,
|
||||
Usage: "exposes a dedicated data server",
|
||||
EnvVars: []string{"REVA_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"},
|
||||
Destination: &cfg.Reva.StorageEOS.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
Value: false,
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageEOS.EnableHomeCreation,
|
||||
},
|
||||
|
||||
// Storage drivers
|
||||
|
||||
// Eos
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-namespace",
|
||||
Value: "/eos/dockertest/reva",
|
||||
Usage: "Namespace for metadata operations",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
|
||||
// local
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-local-root",
|
||||
Value: "/var/tmp/reva/root",
|
||||
Usage: "the path to the local storage root",
|
||||
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Local.Root,
|
||||
},
|
||||
|
||||
// owncloud
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-datadir",
|
||||
Value: "/var/tmp/reva/data",
|
||||
Usage: "the path to the owncloud data directory",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-scan",
|
||||
Value: true,
|
||||
Usage: "scan files on startup to add fileids",
|
||||
EnvVars: []string{"REVA_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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.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_OWNCLOUD_LAYOUT"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
package flagset
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-reva/pkg/config"
|
||||
)
|
||||
|
||||
// StorageEOSDataWithConfig applies cfg to the root flagset
|
||||
func StorageEOSDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
|
||||
&cli.BoolFlag{
|
||||
Name: "tracing-enabled",
|
||||
Usage: "Enable sending traces",
|
||||
EnvVars: []string{"REVA_TRACING_ENABLED"},
|
||||
Destination: &cfg.Tracing.Enabled,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-type",
|
||||
Value: "jaeger",
|
||||
Usage: "Tracing backend type",
|
||||
EnvVars: []string{"REVA_TRACING_TYPE"},
|
||||
Destination: &cfg.Tracing.Type,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-endpoint",
|
||||
Value: "",
|
||||
Usage: "Endpoint for the agent",
|
||||
EnvVars: []string{"REVA_TRACING_ENDPOINT"},
|
||||
Destination: &cfg.Tracing.Endpoint,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-collector",
|
||||
Value: "",
|
||||
Usage: "Endpoint for the collector",
|
||||
EnvVars: []string{"REVA_TRACING_COLLECTOR"},
|
||||
Destination: &cfg.Tracing.Collector,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "tracing-service",
|
||||
Value: "reva",
|
||||
Usage: "Service name for tracing",
|
||||
EnvVars: []string{"REVA_TRACING_SERVICE"},
|
||||
Destination: &cfg.Tracing.Service,
|
||||
},
|
||||
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9161",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_DATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageEOSData.DebugAddr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-token",
|
||||
Value: "",
|
||||
Usage: "Token to grant metrics access",
|
||||
EnvVars: []string{"REVA_DEBUG_TOKEN"},
|
||||
Destination: &cfg.Debug.Token,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-pprof",
|
||||
Usage: "Enable pprof debugging",
|
||||
EnvVars: []string{"REVA_DEBUG_PPROF"},
|
||||
Destination: &cfg.Debug.Pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "debug-zpages",
|
||||
Usage: "Enable zpages debugging",
|
||||
EnvVars: []string{"REVA_DEBUG_ZPAGES"},
|
||||
Destination: &cfg.Debug.Zpages,
|
||||
},
|
||||
|
||||
// REVA
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: "Pive-Fumkiu4",
|
||||
Usage: "Shared jwt secret for reva service communication",
|
||||
EnvVars: []string{"REVA_JWT_SECRET"},
|
||||
Destination: &cfg.Reva.JWTSecret,
|
||||
},
|
||||
|
||||
// Services
|
||||
|
||||
// Storage eos data
|
||||
|
||||
&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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "driver",
|
||||
Value: "eos",
|
||||
Usage: "storage driver, eg. local, eos, owncloud or s3",
|
||||
EnvVars: []string{"REVA_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"},
|
||||
Destination: &cfg.Reva.StorageEOSData.Prefix,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "temp-folder",
|
||||
Value: "/var/tmp/",
|
||||
Usage: "temp folder",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_DATA_TEMP_FOLDER"},
|
||||
Destination: &cfg.Reva.StorageEOSData.TempFolder,
|
||||
},
|
||||
|
||||
// Storage drivers
|
||||
|
||||
// Eos
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-namespace",
|
||||
Value: "/eos/dockertest/reva",
|
||||
Usage: "Namespace for metadata operations",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
|
||||
// local
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-local-root",
|
||||
Value: "/var/tmp/reva/root",
|
||||
Usage: "the path to the local storage root",
|
||||
EnvVars: []string{"REVA_STORAGE_LOCAL_ROOT"},
|
||||
Destination: &cfg.Reva.Storages.Local.Root,
|
||||
},
|
||||
|
||||
// owncloud
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-datadir",
|
||||
Value: "/var/tmp/reva/data",
|
||||
Usage: "the path to the owncloud data directory",
|
||||
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_DATADIR"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Datadirectory,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-owncloud-scan",
|
||||
Value: true,
|
||||
Usage: "scan files on startup to add fileids",
|
||||
EnvVars: []string{"REVA_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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-owncloud-layout",
|
||||
Value: "{{.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_OWNCLOUD_LAYOUT"},
|
||||
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
|
||||
},
|
||||
|
||||
// Gateway
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "gateway-url",
|
||||
Value: "localhost:9142",
|
||||
Usage: "URL to use for the reva gateway service",
|
||||
EnvVars: []string{"REVA_GATEWAY_URL"},
|
||||
Destination: &cfg.Reva.Gateway.URL,
|
||||
},
|
||||
}
|
||||
}
|
||||
+24
-10
@@ -138,8 +138,10 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Reva.StorageHome.MountPath,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440000",
|
||||
Name: "mount-id",
|
||||
// This is tho mount id of the /oc storage
|
||||
// set it to 1284d238-aa92-42ce-bdc4-0b0000009158 for /eos
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageHome.MountID,
|
||||
@@ -172,11 +174,25 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-namespace",
|
||||
Value: "",
|
||||
Value: "/eos/dockertest/reva/users",
|
||||
Usage: "Namespace for metadata operations",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-binary",
|
||||
Value: "/usr/bin/eos",
|
||||
@@ -193,14 +209,14 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-master-url",
|
||||
Value: "root://eos-example.org",
|
||||
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
|
||||
Usage: "URL of the Master EOS MGM",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.MasterURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-slave-url",
|
||||
Value: "root://eos-example.org",
|
||||
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
|
||||
Usage: "URL of the Slave EOS MGM",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
|
||||
@@ -238,35 +254,33 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-eos-enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home directories",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.EOS.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-sec-protocol",
|
||||
Value: "",
|
||||
Usage: "the xrootd security protocol to use between the server and EOS",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-keytab",
|
||||
Value: "",
|
||||
Usage: "the location of the keytab to use to authenticate to EOS",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Keytab,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-single-username",
|
||||
Value: "",
|
||||
Usage: "the username to use when SingleUserMode is enabled",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-layout",
|
||||
Value: "{{.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" `,
|
||||
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: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `,
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
|
||||
@@ -150,11 +150,25 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-namespace",
|
||||
Value: "",
|
||||
Value: "/eos/dockertest/reva/users",
|
||||
Usage: "Namespace for metadata operations",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-binary",
|
||||
Value: "/usr/bin/eos",
|
||||
@@ -171,14 +185,14 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-master-url",
|
||||
Value: "root://eos-example.org",
|
||||
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
|
||||
Usage: "URL of the Master EOS MGM",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_MASTER_URL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.MasterURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-slave-url",
|
||||
Value: "root://eos-example.org",
|
||||
Value: "root://eos-mgm1.eoscluster.cern.ch:1094",
|
||||
Usage: "URL of the Slave EOS MGM",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SLAVE_URL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SlaveURL,
|
||||
@@ -216,35 +230,33 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "storage-eos-enable-home",
|
||||
Value: true,
|
||||
Usage: "enable the creation of home directories",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
|
||||
Destination: &cfg.Reva.Storages.EOS.EnableHome,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-sec-protocol",
|
||||
Value: "",
|
||||
Usage: "the xrootd security protocol to use between the server and EOS",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SEC_PROTOCOL"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SecProtocol,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-keytab",
|
||||
Value: "",
|
||||
Usage: "the location of the keytab to use to authenticate to EOS",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_KEYTAB"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Keytab,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-single-username",
|
||||
Value: "",
|
||||
Usage: "the username to use when SingleUserMode is enabled",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
|
||||
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-layout",
|
||||
Value: "{{.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" `,
|
||||
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: "{{substr 0 1 .Username}}/{{.Username}}" will turn "Einstein" into "E/Einstein" `,
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
},
|
||||
|
||||
@@ -139,7 +139,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
Value: "123e4567-e89b-12d3-a456-426655440000",
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageOC.MountID,
|
||||
@@ -177,6 +177,20 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-share-folder",
|
||||
Value: "",
|
||||
Usage: "name of the share folder",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-binary",
|
||||
Value: "/usr/bin/eos",
|
||||
@@ -265,7 +279,7 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-layout",
|
||||
Value: "{{.Username}}",
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
|
||||
@@ -155,6 +155,20 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_NAMESPACE"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Namespace,
|
||||
},
|
||||
&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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShadowNamespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-share-folder",
|
||||
Value: "",
|
||||
Usage: "name of the share folder",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_SHARE_FOLDER"},
|
||||
Destination: &cfg.Reva.Storages.EOS.ShareFolder,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-binary",
|
||||
Value: "/usr/bin/eos",
|
||||
@@ -243,7 +257,7 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-layout",
|
||||
Value: "{{.Username}}",
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
|
||||
@@ -263,7 +263,7 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "storage-eos-layout",
|
||||
Value: "{{.Username}}",
|
||||
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"},
|
||||
Destination: &cfg.Reva.Storages.EOS.Layout,
|
||||
|
||||
@@ -133,6 +133,13 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_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"},
|
||||
Destination: &cfg.Reva.LDAP.IDP,
|
||||
},
|
||||
// ldap dn is always the dn
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-schema-uid",
|
||||
|
||||
Reference in New Issue
Block a user