From 4aa8a883de1e6b6b7962a54be25ea2c7de2d310e Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Tue, 22 Oct 2024 11:09:36 +0200 Subject: [PATCH 1/3] [docs-only] Update gateway readme --- services/gateway/README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/services/gateway/README.md b/services/gateway/README.md index a49730bfaa..7cc66d9e73 100644 --- a/services/gateway/README.md +++ b/services/gateway/README.md @@ -30,12 +30,20 @@ Store specific notes: ## Service Endpoints **IMPORTANT**\ -This functionality is currently experimental. +This functionality is currently highly experimental and intended for testing only! There are known bugs that need to be sorted out like not closing sockets when a service ends. The gateway acts as a proxy for other CS3 services. As such it has to forward requests to a lot of services and needs to establish connections by looking up the IP address using the service registry. Instead of using the service registry each endpoint can also be configured to use the grpc `dns://` or `kubernetes://` URLs, which might be useful when running in kubernetes. For a local single node deployment you might want to use `unix:` sockets as shown below. Using unix sockets will reduce the amount of service lookups and omit the TCP stack. For now, this is experimental and the services do not delete the socket on shutdown. PRs welcome. +The scheme for this setup is the following. Note that there is, except storage, always a service and a gateway envvar triple: + +| **envvar** | **default** | **alternative** | +|------|------|------| +| OCIS_GRPC_PROTOCOL or
``_GRPC_PROTOCOL | tcp | unix | +| ``_GRPC_ADDR | 127.0.0.1:`` | /var/run/ocis/``.sock | +| GATEWAY_``_ENDPOINT | com.owncloud.api.`` | unix:/var/run/ocis/``.sock
dns: ...
kubernetes: ... | + ```console USERS_GRPC_PROTOCOL=unix" USERS_GRPC_ADDR=/var/run/ocis/users.sock" @@ -83,15 +91,17 @@ OCM_GRPC_PROTOCOL=unix" OCM_GRPC_ADDR=/var/run/ocis/ocm.sock" GATEWAY_OCM_ENDPOINT=unix:/var/run/ocis/ocm.sock" -// storage system +// storage related STORAGE_SYSTEM_GRPC_PROTOCOL="unix" STORAGE_SYSTEM_GRPC_ADDR="/var/run/ocis/storage-system.sock" -STORAGE_GATEWAY_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" -STORAGE_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_USER_CS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_USER_JSONCS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_PUBLIC_CS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_PUBLIC_JSONCS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" + +// the STORAGE_xxx envvars should (and will) be named SETTINGS_STORAGE_xxx +STORAGE_GATEWAY_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" +STORAGE_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" ``` ## Storage Registry From a67fa5a79d2a1b5a5c1e993b04e928b12fcb278c Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 22 Oct 2024 11:19:34 +0200 Subject: [PATCH 2/3] Update services/gateway/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jörn Friedrich Dreyer --- services/gateway/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/gateway/README.md b/services/gateway/README.md index 7cc66d9e73..9c162bcbb4 100644 --- a/services/gateway/README.md +++ b/services/gateway/README.md @@ -30,7 +30,7 @@ Store specific notes: ## Service Endpoints **IMPORTANT**\ -This functionality is currently highly experimental and intended for testing only! There are known bugs that need to be sorted out like not closing sockets when a service ends. +This functionality is currently highly experimental and intended for testing only! There are known bugs that need to be sorted out like not removing sockets when a service ends. The gateway acts as a proxy for other CS3 services. As such it has to forward requests to a lot of services and needs to establish connections by looking up the IP address using the service registry. Instead of using the service registry each endpoint can also be configured to use the grpc `dns://` or `kubernetes://` URLs, which might be useful when running in kubernetes. From f5cefed8ce0423ae8f54e626692f97655f11d839 Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Wed, 23 Oct 2024 09:06:49 +0200 Subject: [PATCH 3/3] use the correct envvar --- services/gateway/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/gateway/README.md b/services/gateway/README.md index 9c162bcbb4..5227e27bf8 100644 --- a/services/gateway/README.md +++ b/services/gateway/README.md @@ -92,16 +92,14 @@ OCM_GRPC_ADDR=/var/run/ocis/ocm.sock" GATEWAY_OCM_ENDPOINT=unix:/var/run/ocis/ocm.sock" // storage related +SETTINGS_STORAGE_GATEWAY_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" +SETTINGS_STORAGE_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" STORAGE_SYSTEM_GRPC_PROTOCOL="unix" STORAGE_SYSTEM_GRPC_ADDR="/var/run/ocis/storage-system.sock" SHARING_USER_CS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_USER_JSONCS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_PUBLIC_CS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" SHARING_PUBLIC_JSONCS3_PROVIDER_ADDR="unix:/var/run/ocis/storage-system.sock" - -// the STORAGE_xxx envvars should (and will) be named SETTINGS_STORAGE_xxx -STORAGE_GATEWAY_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" -STORAGE_GRPC_ADDR="unix:/var/run/ocis/storage-system.sock" ``` ## Storage Registry