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
+63 -107
View File
@@ -45,29 +45,22 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "network",
Value: "tcp",
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 storage service, can be 'http' or 'grpc'",
EnvVars: []string{"STORAGE_GATEWAY_PROTOCOL"},
Destination: &cfg.Reva.Gateway.Protocol,
EnvVars: []string{"STORAGE_GATEWAY_GRPC_NETWORK"},
Destination: &cfg.Reva.Gateway.GRPCNetwork,
},
&cli.StringFlag{
Name: "addr",
Value: "0.0.0.0:9142",
Usage: "Address to bind storage service",
EnvVars: []string{"STORAGE_GATEWAY_ADDR"},
Destination: &cfg.Reva.Gateway.Addr,
EnvVars: []string{"STORAGE_GATEWAY_GRPC_ADDR"},
Destination: &cfg.Reva.Gateway.GRPCAddr,
},
&cli.StringFlag{
Name: "url",
Name: "endpoint",
Value: "localhost:9142",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_GATEWAY_URL"},
Destination: &cfg.Reva.Gateway.URL,
Usage: "endpoint to use for the storage service",
EnvVars: []string{"STORAGE_GATEWAY_ENDPOINT"},
Destination: &cfg.Reva.Gateway.Endpoint,
},
&cli.StringSliceFlag{
Name: "service",
@@ -107,6 +100,21 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
// other services
&cli.StringFlag{
Name: "auth-basic-endpoint",
Value: "localhost:9146",
Usage: "endpoint to use for the basic auth provider",
EnvVars: []string{"STORAGE_AUTH_BASIC_ENDPOINT"},
Destination: &cfg.Reva.AuthBasic.Endpoint,
},
&cli.StringFlag{
Name: "auth-bearer-endpoint",
Value: "localhost:9148",
Usage: "endpoint to use for the bearer auth provider",
EnvVars: []string{"STORAGE_AUTH_BEARER_ENDPOINT"},
Destination: &cfg.Reva.AuthBearer.Endpoint,
},
// storage registry
&cli.StringFlag{
@@ -127,81 +135,47 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Name: "storage-home-provider",
Value: "/home",
Usage: "mount point of the storage provider for user homes in the global namespace",
EnvVars: []string{"STORAGE_STORAGE_HOME_PROVIDER"},
EnvVars: []string{"STORAGE_REGISTRY_HOME_PROVIDER"},
Destination: &cfg.Reva.StorageRegistry.HomeProvider,
},
&cli.StringFlag{
Name: "frontend-url",
Name: "public-url",
Value: "https://localhost:9200",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_FRONTEND_URL"},
Destination: &cfg.Reva.Frontend.URL,
EnvVars: []string{"STORAGE_FRONTEND_PUBLIC_URL"},
Destination: &cfg.Reva.Frontend.PublicURL,
},
&cli.StringFlag{
Name: "datagateway-url",
Value: "https://localhost:9200/data",
Usage: "URL to use for the storage datagateway",
EnvVars: []string{"STORAGE_DATAGATEWAY_URL"},
Destination: &cfg.Reva.DataGateway.URL,
EnvVars: []string{"STORAGE_DATAGATEWAY_PUBLIC_URL"},
Destination: &cfg.Reva.DataGateway.PublicURL,
},
&cli.StringFlag{
Name: "users-url",
Name: "userprovider-endpoint",
Value: "localhost:9144",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_USERS_URL"},
Destination: &cfg.Reva.Users.URL,
Usage: "endpoint to use for the userprovider",
EnvVars: []string{"STORAGE_USERPROVIDER_ENDPOINT"},
Destination: &cfg.Reva.Users.Endpoint,
},
&cli.StringFlag{
Name: "auth-basic-url",
Value: "localhost:9146",
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 storage service",
EnvVars: []string{"STORAGE_AUTH_BEARER_URL"},
Destination: &cfg.Reva.AuthBearer.URL,
},
&cli.StringFlag{
Name: "sharing-url",
Name: "sharing-endpoint",
Value: "localhost:9150",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_SHARING_URL"},
Destination: &cfg.Reva.Sharing.URL,
Usage: "endpoint to use for the storage service",
EnvVars: []string{"STORAGE_SHARING_ENDPOINT"},
Destination: &cfg.Reva.Sharing.Endpoint,
},
&cli.StringFlag{
Name: "storage-root-url",
Value: "localhost:9152",
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{"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{"STORAGE_STORAGE_ROOT_MOUNT_ID"},
Destination: &cfg.Reva.StorageRoot.MountID,
},
// register home storage
&cli.StringFlag{
Name: "storage-home-url",
Name: "storage-home-endpoint",
Value: "localhost:9154",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_HOME_URL"},
Destination: &cfg.Reva.StorageHome.URL,
Usage: "endpoint to use for the home storage",
EnvVars: []string{"STORAGE_STORAGE_HOME_ENDPOINT"},
Destination: &cfg.Reva.StorageHome.Endpoint,
},
&cli.StringFlag{
Name: "storage-home-mount-path",
@@ -218,60 +192,42 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Destination: &cfg.Reva.StorageHome.MountID,
},
&cli.StringFlag{
Name: "storage-eos-url",
Value: "localhost:9158",
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{"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{"STORAGE_STORAGE_EOS_MOUNT_ID"},
Destination: &cfg.Reva.StorageEOS.MountID,
},
// register users storage
&cli.StringFlag{
Name: "storage-oc-url",
Value: "localhost:9162",
Usage: "URL to use for the storage service",
EnvVars: []string{"STORAGE_STORAGE_OC_URL"},
Destination: &cfg.Reva.StorageOC.URL,
Name: "storage-users-endpoint",
Value: "localhost:9157",
Usage: "endpoint to use for the users storage",
EnvVars: []string{"STORAGE_USERS_ENDPOINT"},
Destination: &cfg.Reva.StorageUsers.Endpoint,
},
&cli.StringFlag{
Name: "storage-oc-mount-path",
Value: "/oc",
Name: "storage-users-mount-path",
Value: "/users",
Usage: "mount path",
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_PATH"},
Destination: &cfg.Reva.StorageOC.MountPath,
EnvVars: []string{"STORAGE_USERS_MOUNT_PATH"},
Destination: &cfg.Reva.StorageUsers.MountPath,
},
&cli.StringFlag{
Name: "storage-oc-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009162",
Name: "storage-users-mount-id",
Value: "1284d238-aa92-42ce-bdc4-0b0000009157",
Usage: "mount id",
EnvVars: []string{"STORAGE_STORAGE_OC_MOUNT_ID"},
Destination: &cfg.Reva.StorageOC.MountID,
EnvVars: []string{"STORAGE_USERS_MOUNT_ID"},
Destination: &cfg.Reva.StorageUsers.MountID,
},
// register public link storage
&cli.StringFlag{
Name: "public-link-url",
Name: "public-link-endpoint",
Value: "localhost:9178",
Usage: "URL to use for the public links service",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_URL"},
Destination: &cfg.Reva.StoragePublicLink.URL,
Usage: "endpoint to use for the public links service",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_ENDPOINT"},
Destination: &cfg.Reva.StoragePublicLink.Endpoint,
},
&cli.StringFlag{
Name: "storage-public-link-mount-path",
Value: "/public/",
Value: "/public",
Usage: "mount path",
EnvVars: []string{"STORAGE_STORAGE_PUBLIC_LINK_MOUNT_PATH"},
Destination: &cfg.Reva.StoragePublicLink.MountPath,