Skip to content

feat: add documentation for diracx container deploment#851

Draft
marianne013 wants to merge 3 commits intoDIRACGrid:mainfrom
marianne013:containerdoc
Draft

feat: add documentation for diracx container deploment#851
marianne013 wants to merge 3 commits intoDIRACGrid:mainfrom
marianne013:containerdoc

Conversation

@marianne013
Copy link
Copy Markdown
Contributor

This attempts to address #798.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community bot commented Mar 24, 2026

At the time of writing, the only supported way of running DiracX is through **[Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/)**.
At the time of writing, the only fully supported way of running DiracX is through **[Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/)**.

If you need to decouple your DIRAC v9 upgrade from a kubernetes deployment, you can deploy DiracX in a container. This has only been tested in conjunction with a DIRAC v9.0 deployment. In this case, your starting point is: [Prepare a node for container deployment](prepare-container-node.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that now you are introducing a new "path" of deployment, the whole content of this file should be, I believe, better moved one level up, from https://diracx--851.org.readthedocs.build/en/851/admin/how-to/install/minimal-requirements/ to https://diracx--851.org.readthedocs.build/en/851/admin/how-to/install/

Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
At the time of writing, the only supported way of running DiracX is through **[Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/)**.
At the time of writing, the only fully supported way of running DiracX is through **[Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/)**.

If you need to decouple your DIRAC v9 upgrade from a kubernetes deployment, you can deploy DiracX in a container. This has only been tested in conjunction with a DIRAC v9.0 deployment. In this case, your starting point is: [Prepare a node for container deployment](prepare-container-node.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence is overly conservative. We know the changes in v9.1 are unrelated it's more likely to be affected by diracx updates (e.g. #842) though even then it shouldn't be too bad.

Suggested change
If you need to decouple your DIRAC v9 upgrade from a kubernetes deployment, you can deploy DiracX in a container. This has only been tested in conjunction with a DIRAC v9.0 deployment. In this case, your starting point is: [Prepare a node for container deployment](prepare-container-node.md).
If you need to decouple your DIRAC v9 upgrade from a kubernetes deployment, you can deploy DiracX in a container. In this case, your starting point is: [Prepare a node for container deployment](prepare-container-node.md).

Comment thread mkdocs.yml Outdated
- admin/how-to/install/index.md
- Minimal requirements: admin/how-to/install/minimal-requirements.md
- Installing kubernetes: admin/how-to/install/install-kubernetes.md
- Preparing a container node: admin/how-to/install/prepare-container-node.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a way of making the table of contents clearer, maybe Alt: or something as a prefix to make clear it's an alternative to the previous? Or maybe just having a single page after Minimal requirements named Installing without kubernetes or something?

DIRACX_DB_URL_JOBDB=mysql+aiomysql://YourUser:YourPassword@host.containers.internal:3306/JobDB
DIRACX_DB_URL_JOBLOGGINGDB=mysql+aiomysql://YourUser:YourPassword@host.containers.internal:3306/JobLoggingDB
DIRACX_DB_URL_PILOTAGENTSDB=mysql+aiomysql://YourUser:YourPassword@host.containers.internal:3306/PilotAgentsDB
DIRACX_DB_URL_SANDBOXMETADATADB=mysql+aiomysql://YourUser:YourPassword@host.containers.internal:3306/SandboxMetadataDB
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be generated automatically to stay up to date for the DIRACX_*DB_URL and DIRACX_SERVICE_*_ENABLED variables.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sense that you might code some new ones ? In that case, that will be step two

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a little out of scope for here, but any chance we could get a generic base URL environment variable for the DBs? i.e. if we had DIRACX_DB_BASE_URL=mysql+aiomysql://user:pass@myhost:3306/ which was used to construct the URLs for the databases by appending the default name (if the more specific environment variable wasn't set) then maybe we wouldn't necessarily need to maintain a full list of them here (although it isn't clear to me whether it'd do the required CREATE DATABASE step when a new one is added?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sense that you might code some new ones ? In that case, that will be step two

There will definitely be new ones. There are already ways to generate this, IIUC it's about extending https://github.com/DIRACGrid/diracx/blob/main/scripts/generate_settings_docs.py

This is probably a little out of scope for here, but any chance we could get a generic base URL environment variable for the DBs? i.e. if we had DIRACX_DB_BASE_URL=mysql+aiomysql://user:pass@myhost:3306/ which was used to construct the URLs for the databases by appending the default name (if the more specific environment variable wasn't set) then maybe we wouldn't necessarily need to maintain a full list of them here (although it isn't clear to me whether it'd do the required CREATE DATABASE step when a new one is added?).

At a first sight it seems like the better approach, I let someone else reply on this as there is probably an issue that I am not aware of.

set -e
echo "Welcome to the dark side"

eval "$(micromamba shell hook --shell=posix)" && micromamba activate base
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now outdated by #810

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true for v9.0 as well ? As we at the moment only state it works for that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need to test that first.

Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
eval "$(micromamba shell hook --shell=posix)" && micromamba activate base

# this sets it up so that we can make changes to the code
pip install -e /diracx_sources/diracx-core \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and a few other bits will be outdated by #842

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be addressed in latest update, at least it seems to work with v0.0.12 -- would that be good enough for a first pass ?

Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
Comment on lines +152 to +156
```
git clone https://github.com/DIRACGrid/diracx.git
git checkout v0.0.2 # (note: the version matches image: ghcr.io/diracgrid/diracx/services:v0.0.2 in
the yaml file)
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be using an annotation, hopefully I've remembered the correct syntax:

Suggested change
```
git clone https://github.com/DIRACGrid/diracx.git
git checkout v0.0.2 # (note: the version matches image: ghcr.io/diracgrid/diracx/services:v0.0.2 in
the yaml file)
```
<div class="annotate" markdown>
```bash
git clone https://github.com/DIRACGrid/diracx.git
git checkout v0.0.2 (1)
```</div>
1. The version should match image: `ghcr.io/diracgrid/diracx/services:v0.0.2` in the yaml file

Comment thread docs/admin/how-to/install/installing-in-a-container.md Outdated
@chrisburr chrisburr marked this pull request as draft March 27, 2026 07:50
@marianne013
Copy link
Copy Markdown
Contributor Author

Hi @fstagni , @chrisburr This has now a lot of comments, and I am not sure we can re-organize the whole documentation on top of that. Can I suggest that I address all immediate issues (text, links etc) and we publish it in the location it's currently at, and make the re-organisation a separate issue ("2 points") ?

@marianne013 marianne013 force-pushed the containerdoc branch 2 times, most recently from 2693e7c to 733cbe9 Compare April 1, 2026 15:42
@aldbr
Copy link
Copy Markdown
Contributor

aldbr commented Apr 16, 2026

ddev meeting
As we have bunch of people reading the documentation now, @chrisburr and @fstagni suggest we should apply the changes within this PR. They will recheck the comments, and will review it again to give more explicit instructions.

marianne013 and others added 2 commits April 16, 2026 11:45
Co-authored-by: Federico Stagni <federico.stagni@cern.ch>
Co-authored-by: Chris Burr <chrisburr@users.noreply.github.com>
Moves the container-based install docs into an "Installation without
Kubernetes" section with its own index and a tailored minimal
requirements page. Shared steps (Convert CS, Register VO, Embracing)
link across to the main install section to avoid duplication.
@chrisburr
Copy link
Copy Markdown
Member

I've pushed a suggestion for the layout change, what do you think?

@fstagni
Copy link
Copy Markdown
Contributor

fstagni commented Apr 16, 2026

I've pushed a suggestion for the layout change, what do you think?

It does not solve, IMHO. Also some links are broken now. I will push myself.


Note: The username and password will then re-appear in the `diracx.env` connection strings for the databases.

You can now continue to [Convert CS](../convert-cs.md). After this please read [Installing DiracX](../installing.md) for some background information before proceeding to [Installing DiracX in a container](installing-in-a-container.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this please read Installing DiracX for some background information before proceeding to

This is rather confusing. Which info should be gathered from that document, which contains (also) kubernetes specific info?

@fstagni
Copy link
Copy Markdown
Contributor

fstagni commented Apr 16, 2026

I've pushed a suggestion for the layout change, what do you think?

It does not solve, IMHO. Also some links are broken now. I will push myself.

I pushed a new schema. Have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Provide documentation to deploy diracx in a container instead of kubernetes

5 participants