Skip to content

Commit 4b9d6a3

Browse files
committed
doc/cephadm: adding documentation for mgmt-gateway HA setup
Signed-off-by: Redouane Kachach <[email protected]>
1 parent b7ee45a commit 4b9d6a3

File tree

2 files changed

+54
-7
lines changed

2 files changed

+54
-7
lines changed

doc/cephadm/services/mgmt-gateway.rst

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,55 @@ monitoring `mgmt-gateway` takes care of handling HA when several instances of Pr
4949
available. The reverse proxy will automatically detect healthy instances and use them to process user requests.
5050

5151

52+
High Availability for mgmt-gateway service
53+
==========================================
54+
55+
In addition to providing high availability for the underlying backend services, the mgmt-gateway
56+
service itself can be configured for high availability, ensuring that the system remains resilient
57+
even if certain core components for the service fail.
58+
59+
Multiple mgmt-gateway instances can be deployed in an active/standby configuration using keepalived
60+
for seamless failover. The `oauth2-proxy` service can be deployed as multiple stateless instances,
61+
with nginx acting as a load balancer across them using round-robin strategy. This setup removes
62+
single points of failure and enhances the resilience of the entire system.
63+
64+
In this setup, the underlying internal services follow the same high availability mechanism. Instead of
65+
directly accessing the `mgmt-gateway` internal endpoint, services use the virtual IP specified in the spec.
66+
This ensures that the high availability mechanism for `mgmt-gateway` is transparent to other services.
67+
68+
Example Configuration for High Availability
69+
70+
To deploy the mgmt-gateway in a high availability setup, here is an example of the specification files required:
71+
72+
`mgmt-gateway` Configuration:
73+
74+
.. code-block:: yaml
75+
76+
service_type: mgmt-gateway
77+
placement:
78+
label: mgmt
79+
spec:
80+
enable_auth: true
81+
virtual_ip: 192.168.100.220
82+
83+
`Ingress` Configuration for Keepalived:
84+
85+
.. code-block:: yaml
86+
87+
service_type: ingress
88+
service_id: ingress-mgmt-gw
89+
placement:
90+
label: mgmt
91+
virtual_ip: 192.168.100.220
92+
backend_service: mgmt-gateway
93+
keepalive_only: true
94+
95+
The number of deployed instances is determined by the number of hosts with the mgmt label.
96+
The ingress is configured in `keepalive_only` mode, with labels ensuring that any changes to
97+
the mgmt-gateway daemons are replicated to the corresponding keepalived instances. Additionally,
98+
the `virtual_ip` parameter must be identical in both specifications.
99+
100+
52101
Accessing services with mgmt-gateway
53102
====================================
54103

@@ -123,9 +172,6 @@ The specification can then be applied by running the following command:
123172
Limitations
124173
===========
125174

126-
A non-exhaustive list of important limitations for the mgmt-gateway service follows:
127-
128-
* High-availability configurations and clustering for the mgmt-gateway service itself are currently not supported.
129175
* Services must bind to the appropriate ports based on the applications being proxied. Ensure that there
130176
are no port conflicts that might disrupt service availability.
131177

doc/cephadm/services/oauth2-proxy.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ a secure and flexible authentication mechanism.
4242

4343
High availability
4444
==============================
45-
`oauth2-proxy` is designed to integrate with an external IDP hence login high availability is not the responsibility of this
46-
service. In squid release high availability for the service itself is not supported yet.
45+
In general, `oauth2-proxy` is used in conjunction with the `mgmt-gateway`. The `oauth2-proxy` service can be deployed as multiple
46+
stateless instances, with the `mgmt-gateway` (nginx reverse-proxy) handling load balancing across these instances using a round-robin strategy.
47+
Since oauth2-proxy integrates with an external identity provider (IDP), ensuring high availability for login is managed externally
48+
and not the responsibility of this service.
4749

4850

4951
Accessing services with oauth2-proxy
@@ -70,8 +72,7 @@ An `oauth2-proxy` service can be applied using a specification. An example in YA
7072
service_type: oauth2-proxy
7173
service_id: auth-proxy
7274
placement:
73-
hosts:
74-
- ceph0
75+
label: mgmt
7576
spec:
7677
https_address: "0.0.0.0:4180"
7778
provider_display_name: "My OIDC Provider"

0 commit comments

Comments
 (0)