mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 11:51:16 -06:00
Merge branch 'master' into report-quota
This commit is contained in:
30
CHANGELOG.md
30
CHANGELOG.md
@@ -2,7 +2,35 @@
|
||||
|
||||
The following sections list the changes for unreleased.
|
||||
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v1.12.0...master
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v1.13.0...master
|
||||
|
||||
## Summary
|
||||
|
||||
* Security - Don't expose services by default: [#2612](https://github.com/owncloud/ocis/issues/2612)
|
||||
* Change - Configurable default quota: [#2621](https://github.com/owncloud/ocis/issues/2621)
|
||||
|
||||
## Details
|
||||
|
||||
* Security - Don't expose services by default: [#2612](https://github.com/owncloud/ocis/issues/2612)
|
||||
|
||||
We've changed the bind behaviour for all non public facing services. Before this PR all
|
||||
services would listen on all interfaces. After this PR, all services listen on 127.0.0.1 only,
|
||||
except the proxy which is listening on 0.0.0.0:9200.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2612
|
||||
|
||||
* Change - Configurable default quota: [#2621](https://github.com/owncloud/ocis/issues/2621)
|
||||
|
||||
When creating a new space a (configurable) default quota will be used (instead the hardcoded
|
||||
one) One can set the EnvVar `GRAPH_SPACES_DEFAULT_QUOTA` to configure it
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2621
|
||||
https://jira.owncloud.com/browse/OCIS-2070
|
||||
# Changelog for [1.13.0] (2021-10-13)
|
||||
|
||||
The following sections list the changes for 1.13.0.
|
||||
|
||||
[1.13.0]: https://github.com/owncloud/ocis/compare/v1.12.0...v1.13.0
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9181"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9181"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
@@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "0.0.0.0:9180"),
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9180"),
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
|
||||
7
changelog/unreleased/create-space-quota.md
Normal file
7
changelog/unreleased/create-space-quota.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Change: Configurable default quota
|
||||
|
||||
When creating a new space a (configurable) default quota will be used (instead the hardcoded one)
|
||||
One can set the EnvVar `GRAPH_SPACES_DEFAULT_QUOTA` to configure it
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2621
|
||||
https://jira.owncloud.com/browse/OCIS-2070
|
||||
7
changelog/unreleased/dont-expose-services-by-default.md
Normal file
7
changelog/unreleased/dont-expose-services-by-default.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Security: Don't expose services by default
|
||||
|
||||
We've changed the bind behaviour for all non public facing services. Before this PR
|
||||
all services would listen on all interfaces. After this PR, all services listen on
|
||||
127.0.0.1 only, except the proxy which is listening on 0.0.0.0:9200.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/2612
|
||||
@@ -67,6 +67,7 @@ services:
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
OCIS_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
|
||||
# app registry
|
||||
STORAGE_GATEWAY_GRPC_ADDR: 0.0.0.0:9142 # make the REVA gateway accessible to the app drivers
|
||||
STORAGE_APP_REGISTRY_MIMETYPES_JSON: /var/tmp/ocis/app-config/mimetypes.json
|
||||
volumes:
|
||||
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
|
||||
@@ -90,6 +91,7 @@ services:
|
||||
command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
@@ -115,6 +117,7 @@ services:
|
||||
#command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
@@ -142,6 +145,7 @@ services:
|
||||
#command: storage-app-provider server
|
||||
environment:
|
||||
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
|
||||
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
|
||||
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-codimd:9164
|
||||
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
|
||||
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
|
||||
|
||||
@@ -7,6 +7,25 @@ geekdocEditPath: edit/master/docs/ocis
|
||||
geekdocFilePath: release_notes.md
|
||||
---
|
||||
|
||||
## ownCloud Infinite Scale 1.13.0 Technology Preview
|
||||
|
||||
Version 1.13.0 brings progress on the backend for the 'Spaces' feature. ownCloud Web and Infinite Scale now provide ZIP/TAR download for multiple files/folders and can integrate external file viewer/editor applications (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online).
|
||||
|
||||
The most prominent changes in ownCloud Infinite Scale 1.13.0 and ownCloud Web 4.3.0 comprise:
|
||||
|
||||
- Infinite Scale and Web now allow downloading multiple files or folders as archives [ocis#2509](https://github.com/owncloud/ocis/pull/2509) [cs3org/reva#2088](https://github.com/cs3org/reva/pull/2088)
|
||||
- Infinite Scale and Web can now integrate external applications like file viewers/editors via the [cs3org/wopiserver](https://github.com/cs3org/wopiserver) (e.g., Collabora Online, ONLYOFFICE, CodiMD, Microsoft Office Online). [web#5805](https://github.com/owncloud/web/pull/5805)
|
||||
- The 'Shared with me' page in ownCloud Web now clearly separates pending, declined and accepted shares. Pending shares are always displayed prominently so that users are aware and can react accordingly. [web#5814](https://github.com/owncloud/web/pull/5814)
|
||||
- Legacy URLs (e.g., from the address bar, public links) from ownCloud Classic are now properly resolved after migrating to Infinite Scale and Web [cs3org/reva#1089](https://github.com/cs3org/reva/pull/1989)
|
||||
- A capability for the Favorites feature has been added [ocis#2599](https://github.com/owncloud/ocis/pull/2599)
|
||||
|
||||
You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.13.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v4.3.0) for further details on what has changed.
|
||||
|
||||
### Breaking changes
|
||||
{{< hint warning >}}
|
||||
We are currently in a Tech Preview state and breaking changes may occur at any time. For more information see our [release roadmap]({{< ref "./release_roadmap" >}})
|
||||
{{< /hint >}}
|
||||
|
||||
## ownCloud Infinite Scale 1.12.0 Technology Preview
|
||||
|
||||
Version 1.12.0 is a maintenance release with the foundations for the 'Spaces' feature and for viewer/editor application integrations. The Infinite Scale backend has been further hardened by fixing known issues, improving error handling and stabilizing existing features. Apart from bugfixing, ownCloud Web 4.2.0 has received a number of usability and design improvements for sharing and the file list.
|
||||
|
||||
@@ -38,7 +38,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9129"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -98,7 +98,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9129"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -132,7 +132,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "ldap-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "0.0.0.0:9125"),
|
||||
Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "127.0.0.1:9125"),
|
||||
Usage: "Address to bind ldap server",
|
||||
EnvVars: []string{"GLAUTH_LDAP_ADDR"},
|
||||
Destination: &cfg.Ldap.Addr,
|
||||
@@ -147,7 +147,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "ldaps-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "0.0.0.0:9126"),
|
||||
Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "127.0.0.1:9126"),
|
||||
Usage: "Address to bind ldap server",
|
||||
EnvVars: []string{"GLAUTH_LDAPS_ADDR"},
|
||||
Destination: &cfg.Ldaps.Addr,
|
||||
|
||||
@@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -88,7 +88,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9136"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -114,7 +114,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9135"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9135"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
|
||||
@@ -51,7 +51,8 @@ type TokenManager struct {
|
||||
}
|
||||
|
||||
type Spaces struct {
|
||||
WebDavBase string
|
||||
WebDavBase string
|
||||
DefaultQuota string
|
||||
}
|
||||
|
||||
// Config combines all available configuration parts.
|
||||
|
||||
@@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9124"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9124"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -121,7 +121,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9120"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9120"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"GRAPH_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
@@ -149,6 +149,14 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.Spaces.WebDavBase,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "default-space-quota",
|
||||
Value: flags.OverrideDefaultString(cfg.Spaces.DefaultQuota, "1000000000"),
|
||||
Usage: "default quota used for all spaces if no custom quota was given",
|
||||
EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"},
|
||||
Destination: &cfg.Spaces.DefaultQuota,
|
||||
},
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "jwt-secret",
|
||||
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -56,6 +57,7 @@ func (g Graph) GetDrives(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
g.logger.Error().Err(err).Msg("error sending list storage spaces grpc request")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, res.Status.Message)
|
||||
return
|
||||
}
|
||||
|
||||
wdu, err := url.Parse(g.config.Spaces.WebDavBase)
|
||||
@@ -179,26 +181,18 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) {
|
||||
driveType = *drive.DriveType
|
||||
}
|
||||
switch driveType {
|
||||
case "":
|
||||
case "", "project":
|
||||
driveType = "project"
|
||||
case "share":
|
||||
errorcode.GeneralException.Render(w, r, http.StatusBadRequest, "drives of type share cannot be created via this api")
|
||||
}
|
||||
|
||||
var quota uint64
|
||||
if drive.Quota != nil && drive.Quota.Total != nil {
|
||||
quota = uint64(*drive.Quota.Total)
|
||||
} else {
|
||||
quota = 65536 // set default quota if no value was sent.
|
||||
default:
|
||||
errorcode.GeneralException.Render(w, r, http.StatusBadRequest, fmt.Sprintf("drives of type %s cannot be created via this api", driveType))
|
||||
return
|
||||
}
|
||||
|
||||
csr := provider.CreateStorageSpaceRequest{
|
||||
Owner: us,
|
||||
Type: driveType,
|
||||
Name: spaceName,
|
||||
Quota: &provider.Quota{
|
||||
QuotaMaxBytes: quota,
|
||||
},
|
||||
Quota: getQuota(drive.Quota, g.config.Spaces.DefaultQuota),
|
||||
}
|
||||
|
||||
resp, err := client.CreateStorageSpace(r.Context(), &csr)
|
||||
@@ -209,6 +203,7 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if resp.GetStatus().GetCode() != v1beta11.Code_CODE_OK {
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "")
|
||||
return
|
||||
}
|
||||
|
||||
wdu, err := url.Parse(g.config.Spaces.WebDavBase)
|
||||
@@ -239,7 +234,8 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
req, err := godata.ParseRequest(sanitized, r.URL.Query(), true)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
errorcode.GeneralException.Render(w, r, http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if req.FirstSegment.Identifier.Get() == "" {
|
||||
@@ -257,6 +253,7 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
|
||||
if len(identifierParts) != 2 {
|
||||
errorcode.GeneralException.Render(w, r, http.StatusBadRequest, fmt.Sprintf("invalid resource id: %v", req.FirstSegment.Identifier.Get()))
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
storageID, opaqueID := identifierParts[0], identifierParts[1]
|
||||
@@ -288,10 +285,12 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
|
||||
resp, err := client.UpdateStorageSpace(r.Context(), updateSpaceRequest)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
if resp.GetStatus().GetCode() != v1beta11.Code_CODE_OK {
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "")
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
||||
@@ -38,7 +38,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9134"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9134"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"IDP_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -98,7 +98,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9134"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9134"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"IDP_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -124,7 +124,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9130"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9130"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"IDP_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
|
||||
@@ -104,7 +104,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9010",
|
||||
Value: "127.0.0.1:9010",
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"OCIS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -117,7 +117,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: "0.0.0.0:9010",
|
||||
Value: "127.0.0.1:9010",
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"OCIS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -143,7 +143,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: "0.0.0.0:9000",
|
||||
Value: "127.0.0.1:9000",
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"OCIS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
@@ -157,7 +157,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: "0.0.0.0:9001",
|
||||
Value: "127.0.0.1:9001",
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"OCIS_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/ocis/pkg/runtime/config"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var (
|
||||
rootCmd = &cobra.Command{
|
||||
Use: "pman",
|
||||
Short: "RPC Process Manager",
|
||||
}
|
||||
)
|
||||
|
||||
// RootCmd returns a configured root command.
|
||||
func RootCmd(cfg *config.Config) *cobra.Command {
|
||||
rootCmd.PersistentFlags().StringVarP(&cfg.Hostname, "hostname", "n", "localhost", "host with a running oCIS runtime.")
|
||||
rootCmd.PersistentFlags().StringVarP(&cfg.Port, "port", "p", "10666", "port to send messages to the rpc oCIS runtime.")
|
||||
rootCmd.PersistentFlags().BoolVarP(&cfg.KeepAlive, "keep-alive", "k", false, "restart supervised processes that abruptly die.")
|
||||
|
||||
if err := viper.BindPFlag("hostname", rootCmd.PersistentFlags().Lookup("hostname")); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
rootCmd.AddCommand(List(cfg))
|
||||
rootCmd.AddCommand(Run(cfg))
|
||||
rootCmd.AddCommand(Kill(cfg))
|
||||
|
||||
return rootCmd
|
||||
}
|
||||
@@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9114"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9114"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"OCS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -90,7 +90,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9114"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9114"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"OCS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -116,7 +116,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9110"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9110"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"OCS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
|
||||
@@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9109"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"PROXY_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -102,7 +102,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9205"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9205"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"PROXY_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
|
||||
@@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9194"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"SETTINGS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -89,7 +89,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9194"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9194"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"SETTINGS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9190"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9190"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"SETTINGS_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
@@ -143,7 +143,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "0.0.0.0:9191"),
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9191"),
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"SETTINGS_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
|
||||
@@ -157,22 +157,22 @@ func groupsConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]inter
|
||||
}
|
||||
}
|
||||
|
||||
// GroupProvider allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type GroupProvider struct {
|
||||
// GroupSutureService allows for the storage-groupprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type GroupSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewGroupProvider creates a new storage.GroupProvider
|
||||
// NewGroupProviderSutureService creates a new storage.GroupProvider
|
||||
func NewGroupProvider(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.Groups.Supervised = true
|
||||
}
|
||||
return GroupProvider{
|
||||
return GroupSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s GroupProvider) Serve(ctx context.Context) error {
|
||||
func (s GroupSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.Groups.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := Groups(s.cfg).Flags
|
||||
|
||||
@@ -159,7 +159,7 @@ func storageMetadataFromStruct(c *cli.Context, cfg *config.Config) map[string]in
|
||||
}
|
||||
|
||||
// SutureService allows for the storage-metadata command to be embedded and supervised by a suture supervisor tree.
|
||||
type SutureService struct {
|
||||
type MetadataSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ func NewStorageMetadata(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.StorageMetadata.Supervised = true
|
||||
}
|
||||
return SutureService{
|
||||
return MetadataSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s SutureService) Serve(ctx context.Context) error {
|
||||
func (s MetadataSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.StorageMetadata.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := StorageMetadata(s.cfg).Flags
|
||||
|
||||
@@ -178,22 +178,22 @@ func usersConfigFromStruct(c *cli.Context, cfg *config.Config) map[string]interf
|
||||
return rcfg
|
||||
}
|
||||
|
||||
// UserProvider allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type UserProvider struct {
|
||||
// UserProviderSutureService allows for the storage-userprovider command to be embedded and supervised by a suture supervisor tree.
|
||||
type UserProviderSutureService struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
// NewUserProvider creates a new storage.UserProvider
|
||||
// NewUserProviderSutureService creates a new storage.UserProvider
|
||||
func NewUserProvider(cfg *ociscfg.Config) suture.Service {
|
||||
if cfg.Mode == 0 {
|
||||
cfg.Storage.Reva.Users.Supervised = true
|
||||
}
|
||||
return UserProvider{
|
||||
return UserProviderSutureService{
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
func (s UserProvider) Serve(ctx context.Context) error {
|
||||
func (s UserProviderSutureService) Serve(ctx context.Context) error {
|
||||
s.cfg.Reva.Users.Context = ctx
|
||||
f := &flag.FlagSet{}
|
||||
cmdFlags := Users(s.cfg).Flags
|
||||
|
||||
@@ -13,7 +13,7 @@ func AppProviderWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.DebugAddr, "0.0.0.0:9165"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.DebugAddr, "127.0.0.1:9165"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"APP_PROVIDER_BASIC_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.AppProvider.DebugAddr,
|
||||
@@ -34,7 +34,7 @@ func AppProviderWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.GRPCAddr, "0.0.0.0:9164"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AppProvider.GRPCAddr, "127.0.0.1:9164"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"APP_PROVIDER_BASIC_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.AppProvider.GRPCAddr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "0.0.0.0:9147"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.DebugAddr, "127.0.0.1:9147"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBasic.DebugAddr,
|
||||
@@ -49,7 +49,7 @@ func AuthBasicWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "0.0.0.0:9146"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBasic.GRPCAddr, "127.0.0.1:9146"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BASIC_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBasic.GRPCAddr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "0.0.0.0:9149"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.DebugAddr, "127.0.0.1:9149"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBearer.DebugAddr,
|
||||
@@ -95,7 +95,7 @@ func AuthBearerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "0.0.0.0:9148"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.AuthBearer.GRPCAddr, "127.0.0.1:9148"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_AUTH_BEARER_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.AuthBearer.GRPCAddr,
|
||||
|
||||
@@ -14,7 +14,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "0.0.0.0:9141"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.DebugAddr, "127.0.0.1:9141"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.Frontend.DebugAddr,
|
||||
@@ -88,7 +88,7 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "0.0.0.0:9140"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.HTTPAddr, "127.0.0.1:9140"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.Frontend.HTTPAddr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.DebugAddr, "0.0.0.0:9143"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.DebugAddr, "127.0.0.1:9143"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.Gateway.DebugAddr,
|
||||
@@ -48,7 +48,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.GRPCAddr, "0.0.0.0:9142"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Gateway.GRPCAddr, "127.0.0.1:9142"),
|
||||
Usage: "Address to bind REVA service",
|
||||
EnvVars: []string{"STORAGE_GATEWAY_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.Gateway.GRPCAddr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func GroupsWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Groups.DebugAddr, "0.0.0.0:9161"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Groups.DebugAddr, "127.0.0.1:9161"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_GROUPPROVIDER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.Groups.DebugAddr,
|
||||
@@ -42,7 +42,7 @@ func GroupsWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Groups.GRPCAddr, "0.0.0.0:9160"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Groups.GRPCAddr, "127.0.0.1:9160"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_GROUPPROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.Groups.GRPCAddr,
|
||||
|
||||
@@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9109"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9109"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"STORAGE_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "0.0.0.0:9151"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Sharing.DebugAddr, "127.0.0.1:9151"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_SHARING_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.Sharing.DebugAddr,
|
||||
@@ -42,7 +42,7 @@ func SharingWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "0.0.0.0:9150"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Sharing.GRPCAddr, "127.0.0.1:9150"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_SHARING_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.Sharing.GRPCAddr,
|
||||
|
||||
@@ -14,7 +14,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.DebugAddr, "0.0.0.0:9156"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.DebugAddr, "127.0.0.1:9156"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_HOME_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.DebugAddr,
|
||||
@@ -33,7 +33,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.GRPCAddr, "0.0.0.0:9154"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.GRPCAddr, "127.0.0.1:9154"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_HOME_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.GRPCAddr,
|
||||
@@ -47,7 +47,7 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.HTTPAddr, "0.0.0.0:9155"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageHome.HTTPAddr, "127.0.0.1:9155"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_HOME_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageHome.HTTPAddr,
|
||||
|
||||
@@ -12,7 +12,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
f := []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.DebugAddr, "0.0.0.0:9217"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.DebugAddr, "127.0.0.1:9217"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_METADATA_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.DebugAddr,
|
||||
@@ -26,7 +26,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.GRPCAddr, "0.0.0.0:9215"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.GRPCAddr, "127.0.0.1:9215"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_METADATA_GRPC_PROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.GRPCAddr,
|
||||
@@ -47,7 +47,7 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.HTTPAddr, "0.0.0.0:9216"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageMetadata.HTTPAddr, "127.0.0.1:9216"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_METADATA_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageMetadata.HTTPAddr,
|
||||
|
||||
@@ -12,7 +12,7 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
|
||||
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "0.0.0.0:9179"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.DebugAddr, "127.0.0.1:9179"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.DebugAddr,
|
||||
@@ -27,7 +27,7 @@ func StoragePublicLink(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "0.0.0.0:9178"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StoragePublicLink.GRPCAddr, "127.0.0.1:9178"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_PUBLIC_LINK_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StoragePublicLink.GRPCAddr,
|
||||
|
||||
@@ -14,7 +14,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "0.0.0.0:9159"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.DebugAddr, "127.0.0.1:9159"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_USERS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.DebugAddr,
|
||||
@@ -33,7 +33,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "0.0.0.0:9157"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.GRPCAddr, "127.0.0.1:9157"),
|
||||
Usage: "GRPC Address to bind users storage",
|
||||
EnvVars: []string{"STORAGE_USERS_GRPC_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.GRPCAddr,
|
||||
@@ -47,7 +47,7 @@ func StorageUsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "0.0.0.0:9158"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.StorageUsers.HTTPAddr, "127.0.0.1:9158"),
|
||||
Usage: "HTTP Address to bind users storage",
|
||||
EnvVars: []string{"STORAGE_USERS_HTTP_ADDR"},
|
||||
Destination: &cfg.Reva.StorageUsers.HTTPAddr,
|
||||
|
||||
@@ -13,7 +13,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
// debug ports are the odd ports
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Users.DebugAddr, "0.0.0.0:9145"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Users.DebugAddr, "127.0.0.1:9145"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_DEBUG_ADDR"},
|
||||
Destination: &cfg.Reva.Users.DebugAddr,
|
||||
@@ -42,7 +42,7 @@ func UsersWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCAddr, "0.0.0.0:9144"),
|
||||
Value: flags.OverrideDefaultString(cfg.Reva.Users.GRPCAddr, "127.0.0.1:9144"),
|
||||
Usage: "Address to bind storage service",
|
||||
EnvVars: []string{"STORAGE_USERPROVIDER_ADDR"},
|
||||
Destination: &cfg.Reva.Users.GRPCAddr,
|
||||
|
||||
@@ -42,7 +42,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9464"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"STORE_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9460"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9464"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"STORE_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -126,6 +126,13 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"STORE_GRPC_NAMESPACE"},
|
||||
Destination: &cfg.Service.Namespace,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9460"),
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"STORE_GRPC_ADDR"},
|
||||
Destination: &cfg.GRPC.Addr,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Value: flags.OverrideDefaultString(cfg.Service.Name, "store"),
|
||||
|
||||
@@ -12,7 +12,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9189"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9189"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"THUMBNAILS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -90,7 +90,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9189"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9189"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"THUMBNAILS_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -123,7 +123,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "grpc-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Server.Address, "0.0.0.0:9185"),
|
||||
Value: flags.OverrideDefaultString(cfg.Server.Address, "127.0.0.1:9185"),
|
||||
Usage: "Address to bind grpc server",
|
||||
EnvVars: []string{"THUMBNAILS_GRPC_ADDR"},
|
||||
Destination: &cfg.Server.Address,
|
||||
|
||||
@@ -35,7 +35,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9104"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"WEB_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -95,7 +95,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9104"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9104"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"WEB_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -121,7 +121,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9100"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9100"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"WEB_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
|
||||
@@ -11,7 +11,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9119"),
|
||||
Usage: "Address to debug endpoint",
|
||||
EnvVars: []string{"WEBDAV_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -89,7 +89,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "debug-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "0.0.0.0:9119"),
|
||||
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9119"),
|
||||
Usage: "Address to bind debug server",
|
||||
EnvVars: []string{"WEBDAV_DEBUG_ADDR"},
|
||||
Destination: &cfg.Debug.Addr,
|
||||
@@ -115,7 +115,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "http-addr",
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "0.0.0.0:9115"),
|
||||
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9115"),
|
||||
Usage: "Address to bind http server",
|
||||
EnvVars: []string{"WEBDAV_HTTP_ADDR"},
|
||||
Destination: &cfg.HTTP.Addr,
|
||||
|
||||
Reference in New Issue
Block a user