From 4aa8a883de1e6b6b7962a54be25ea2c7de2d310e Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Tue, 22 Oct 2024 11:09:36 +0200 Subject: [PATCH] [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