update reva and refactor config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-10-21 10:15:09 +02:00
committed by David Christofas
parent d9d7272299
commit b64b3242e2
48 changed files with 597 additions and 2279 deletions
+46 -24
View File
@@ -12,58 +12,80 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
Name: "debug-addr",
Value: "0.0.0.0:9217",
Usage: "Address to bind debug server",
EnvVars: []string{"STORAGE_STORAGE_METADATA_DEBUG_ADDR"},
EnvVars: []string{"STORAGE_METADATA_DEBUG_ADDR"},
Destination: &cfg.Reva.StorageMetadata.DebugAddr,
},
&cli.StringFlag{
Name: "network",
Name: "grpc-network",
Value: "tcp",
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,
EnvVars: []string{"STORAGE_METADATA_GRPC_NETWORK"},
Destination: &cfg.Reva.StorageMetadata.GRPCNetwork,
},
&cli.StringFlag{
Name: "provider-addr",
Name: "grpc-addr",
Value: "0.0.0.0:9215",
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_ADDR"},
Destination: &cfg.Reva.StorageMetadata.Addr,
EnvVars: []string{"STORAGE_METADATA_GRPC_PROVIDER_ADDR"},
Destination: &cfg.Reva.StorageMetadata.GRPCAddr,
},
&cli.StringFlag{
Name: "data-server-url",
Value: "http://localhost:9216",
Usage: "URL of the data-server the storage-provider uses",
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_URL"},
Usage: "URL of the data-provider the storage-provider uses",
EnvVars: []string{"STORAGE_METADATA_DATA_SERVER_URL"},
Destination: &cfg.Reva.StorageMetadata.DataServerURL,
},
&cli.StringFlag{
Name: "data-server-addr",
Name: "http-network",
Value: "tcp",
Usage: "Network to use for the storage service, can be 'tcp', 'udp' or 'unix'",
EnvVars: []string{"STORAGE_METADATA_HTTP_NETWORK"},
Destination: &cfg.Reva.StorageMetadata.HTTPNetwork,
},
&cli.StringFlag{
Name: "http-addr",
Value: "0.0.0.0:9216",
Usage: "Address to bind the metadata data-server to",
EnvVars: []string{"STORAGE_STORAGE_METADATA_DATA_SERVER_ADDR"},
Destination: &cfg.Reva.StorageMetadataData.Addr,
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_METADATA_HTTP_ADDR"},
Destination: &cfg.Reva.StorageMetadata.HTTPAddr,
},
&cli.StringFlag{
Name: "storage-provider-driver",
Value: "local",
Name: "driver",
Value: "ocis",
Usage: "storage driver for metadata mount: eg. local, eos, owncloud, ocis or s3",
EnvVars: []string{"STORAGE_STORAGE_METADATA_PROVIDER_DRIVER"},
EnvVars: []string{"STORAGE_METADATA_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{"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{"STORAGE_STORAGE_METADATA_ROOT"},
EnvVars: []string{"STORAGE_METADATA_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
// some drivers need to look up users at the gateway
// Gateway
&cli.StringFlag{
Name: "gateway-endpoint",
Value: "localhost:9142",
Usage: "endpoint to use for the gateway service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
// User provider
&cli.StringFlag{
Name: "userprovider-endpoint",
Value: "localhost:9144",
Usage: "endpoint to use for the userprovider service",
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
Destination: &cfg.Reva.Users.Endpoint,
},
}
flags = append(flags, TracingWithConfig(cfg)...)