Skip to content

Commit 92302ff

Browse files
committed
Move multi-tenant reference note into the cookbook
Relocate the Multi-Tenant Reference Environment note from the Technical Notes section to the User Guide cookbook, under a new "Experimental Recipes" heading. Add a warning admonition at the top marking the recipe as experimental and work in progress. Anonymise host- and user-specific details: replace the concrete user and hostname with <user> and <host> placeholders and generalise the associated filesystem paths.
1 parent b88d615 commit 92302ff

3 files changed

Lines changed: 29 additions & 16 deletions

File tree

docs/tn/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ documentation index; each note is reachable only through its direct link.
1313
.. toctree::
1414
:maxdepth: 1
1515

16-
multi_tenant_reference_environment
1716
commands

docs/ug/cookbook/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ This cookbook will provide real examples of using the ecFlow :ref:`python_api`.
4242
how_to_trigger_a_task_based_on_aviso_notification
4343
how_to_use_ecFlow_with_http
4444
how_to_setup_ecFlow_with_https_authentication
45+
46+
**Experimental Recipes**
47+
48+
.. toctree::
49+
:maxdepth: 1
50+
51+
multi_tenant_reference_environment

docs/tn/multi_tenant_reference_environment.rst renamed to docs/ug/cookbook/multi_tenant_reference_environment.rst

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
:orphan:
2-
3-
.. _tn_multi_tenant_reference_environment:
1+
.. _multi_tenant_reference_environment:
42

53
Multi-Tenant Reference Environment
64
**********************************
75

6+
.. warning::
7+
8+
This recipe is **experimental** and a **work in progress**.
9+
10+
It describes an internal, development-oriented reference deployment of the multi-tenant ecFlow
11+
server, which is not yet ready for production use. The stack, the commands, and the configuration
12+
shown here may change at any time. Treat it as a starting point for experimentation rather than a
13+
supported deployment procedure.
14+
815
This note documents the deployment of the multi-tenant reference stack. This environment is currently
9-
deployed on the machine ``ecfg-mamb-1``, and is composed of:
16+
deployed on a host referred to below as ``<host>``, and is composed of:
1017

1118
- a reverse proxy (nginx) that redirects HTTP to HTTPS and terminates TLS, granting access to the
1219
ecFlow server behind an ``auth-o-tron`` authentication service;
@@ -34,36 +41,36 @@ is described in ``releng/imachination/INSTRUCTIONS.md``.
3441
The concept of running ecFlow behind an authenticating reverse proxy is described more generally in
3542
:ref:`how_to_setup_ecflow_with_https_authentication`.
3643

37-
This note considers the specific case of ``ecfg-mamb-1`` because it has neither Docker Compose nor
44+
This note considers the specific case of ``<host>`` because it has neither Docker Compose nor
3845
``podman-compose`` available, so the stack was deployed with individual ``podman`` commands instead,
3946
and those commands ended up differing from ``releng/imachination/compose.yaml`` in a few respects,
4047
detailed below.
4148

4249
Deployment environment
4350
======================
4451

45-
``ecfg-mamb-1`` runs:
52+
``<host>`` runs:
4653

4754
- **Operating system**: Debian GNU/Linux 11 (bullseye), kernel ``6.1.0-0.deb11.50-amd64``.
4855

4956
- **Resources**: 2 virtual CPUs, approximately 2 GiB of RAM, approximately 1 GiB of swap.
5057

5158
- **Storage**: separate LVM volumes for ``/``, ``/tmp``, ``/var``, ``/opt`` and ``/var/log`` (a few
52-
GiB each), plus a large NFS-mounted ``/home/mamb``.
59+
GiB each), plus a large NFS-mounted ``/home/<user>``.
5360

5461
- **Container runtime**: rootless Podman 3.0.1.
5562

5663
This version predates ``podman compose`` and no ``podman-compose`` wrapper is installed, which is why
5764
the stack is deployed with plain ``podman run``/``podman network`` commands rather than a single
5865
Compose invocation.
5966

60-
- **User**: containers are run rootless, as user ``mamb``.
67+
- **User**: containers are run rootless, as user ``<user>``.
6168

6269
On this host the unprivileged port range starts at 1024 (the kernel default), so this user cannot bind
6370
ports below 1024 directly; this is the reason the reverse proxy publishes remapped host ports instead
6471
of the conventional 80/443, as described below.
6572

66-
- **Workspace**: the ecFlow server's ``ECF_HOME`` is ``/home/mamb/ecfg-mamb-1``, bind-mounted into
73+
- **Workspace**: the ecFlow server's ``ECF_HOME`` is ``/home/<user>/<host>``, bind-mounted into
6774
the ``ecflow-server`` container.
6875

6976
This directory contains ``server_environment.cfg``, checkpoint and log files, and a ``secrets`` subdirectory.
@@ -163,7 +170,7 @@ Detailed deployment procedure
163170
=============================
164171

165172
The commands below are the exact invocations of ``podman`` used to create the three running
166-
containers on ``ecfg-mamb-1``. Run them from ``releng/imachination/`` unless noted otherwise.
173+
containers on ``<host>``. Run them from ``releng/imachination/`` unless noted otherwise.
167174

168175
* Create the shared network:
169176

@@ -205,8 +212,8 @@ containers on ``ecfg-mamb-1``. Run them from ``releng/imachination/`` unless not
205212
--network inner --ip 172.30.0.4 \
206213
--platform linux/amd64 \
207214
-p 8888:8888 -p 8889:8889 \
208-
-v /home/mamb/ecfg-mamb-1:/home/mamb/ecfg-mamb-1 \
209-
-e ECFLOW_WORKSPACE_DIR=/home/mamb/ecfg-mamb-1 \
215+
-v /home/<user>/<host>:/home/<user>/<host> \
216+
-e ECFLOW_WORKSPACE_DIR=/home/<user>/<host> \
210217
eccr.ecmwf.int/ecflow-dev-environments/ecflow-serveronly-dev:latest
211218
212219
* Verify deployment:
@@ -221,7 +228,7 @@ proxy (the ``-k`` option is required because the certificate is self-signed):
221228
.. code-block:: shell
222229
223230
BASIC_TOKEN=$(echo -n 'admin:somesecret' | base64)
224-
curl -k -X GET -H "Authorization: Basic ${BASIC_TOKEN}" https://ecfg-mamb-1:3141/v1/ecflow
231+
curl -k -X GET -H "Authorization: Basic ${BASIC_TOKEN}" https://<host>:3141/v1/ecflow
225232
226233
* Tear down the stack
227234

@@ -247,7 +254,7 @@ proxy (the ``-k`` option is required because the certificate is self-signed):
247254
- ``authotron`` publishes and listens on port ``8081`` instead of ``8080``, leaving host port 8080
248255
available for ``revproxy``'s HTTP listener.
249256

250-
- ``revproxy/cfgs/nginx/default.conf`` was adjusted on ``ecfg-mamb-1`` in three places relative to the
257+
- ``revproxy/cfgs/nginx/default.conf`` was adjusted on ``<host>`` in three places relative to the
251258
committed file:
252259

253260
- the ``listen`` directives were changed from 80/443 to 8080/8443, matching the remapped ports
@@ -264,7 +271,7 @@ proxy (the ``-k`` option is required because the certificate is self-signed):
264271
macOS/Windows-specific feature that does not exist in Linux.
265272

266273
- ``ecflow-server``'s workspace is bind-mounted at the same absolute path on both sides
267-
(``/home/mamb/ecfg-mamb-1``), rather than at the example's relative ``ecflow/workspace`` path, so
274+
(``/home/<user>/<host>``), rather than at the example's relative ``ecflow/workspace`` path, so
268275
that the mount survives independently of the git checkout.
269276

270277

0 commit comments

Comments
 (0)