Skip to content

Commit bfbe28e

Browse files
authored
ongoing (#155)
1 parent 4be26e4 commit bfbe28e

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Usage: run_demo.sh [-h|--help] [--exit-when-done] [--offline] [--enable-coverage] [--no-mount-containerd] [--set-value key=value] [--ci-values=values.yaml] [--load-docker-image=<image_name:tag>] [--] [source directories]
2+
3+
-h|--help: Print this help message and exit
4+
--ci-values: Path to a values.yaml file which contains diracx dev settings only enabled for CI
5+
--exit-when-done: Exit after the demo has been started (it will be left running in the background)
6+
--enable-coverage: Enable coverage reporting (used by diracx CI)
7+
--enable-open-telemetry: lauches OpenTelemetry collection.
8+
WARNING: experimental and resource hungry.
9+
--load-docker-image: Mount a local docker image into kind
10+
WARNING: the ImagePullPolicy MUST not be Always for this to work
11+
--no-editable-python: Do not install Python source directories in editable mode
12+
--no-mount-containerd: Mount a directory on the host for the kind containerd storage.
13+
This option avoids needing to pull container images every time the demo is started.
14+
WARNING: There is no garbage collection so the directory will grow without bound.
15+
--offline: Run in a mode which is suitable for fully offline use.
16+
WARNING: This may result in some weird behaviour, see the demo documentation for details.
17+
Implies: --mount-containerd
18+
--set-value: Set a value in the Helm values file. This can be used to override the default values.
19+
For example, to enable coverage reporting pass: --set-value developer.enableCoverage=true
20+
source directories: A list of directories containing Python packages to mount in the demo cluster.

docs/admin/tutorials/run_locally.md

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
## Intro to Kubernetes and Helm
33

4-
[Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/) (k8s) allows you to deploy containerized applications while letting you abstract the underlying infrastructure. The configuration of your application and how you run it is communicated to k8s via ``yaml`` files.
4+
[Kubernetes](https://kubernetes.io) (k8s) allows you to deploy containerized applications while letting you abstract the underlying infrastructure. The configuration of your application and how you run it is communicated to k8s via ``yaml`` files.
55

66
[Helm](https://helm.sh/) allows to template these ``yaml`` files. Such a templated description of an application like ``diracx`` is called ``chart``. Helm also allows to manage dependencies between ``charts``. For example, the ``diracx`` application needs a database to run, so the ``diracx charts`` has a dependency on the ``mysql charts``.
77

@@ -13,32 +13,25 @@ To understand this ``chart`` you will need to familiarize yourself with a few k8
1313
* A ``Service`` is how you expose your ``Deployment``. If I want to talk to my ``diracx`` application, it is a ``Service`` which will take care of redirecting me within the cluster to one of the ``pod``. Most of the time, the ``Service`` is used for routing inside the cluster
1414
* An ``Ingress`` exposes your ``Services`` outside of the cluster.
1515

16-
## Running the demo locally
16+
If you are not familiar with the above concepts, we recommend you follow the [Kubernetes tutorial](https://kubernetes.io/docs/tutorials/kubernetes-basics/).
1717

18-
Running an instance locally is useful for demo or testing purposes. This entails running a local kubernetes cluster, installing this helm chart and all its dependencies, and configuring it accordingly. In order to make that easy, we wrote the ``run_demo.sh`` script, which covers all these needs. This is also used for the [diracx ci](https://github.com/DIRACGrid/diracx/blob/main/.github/workflows/main.yml)
18+
## Running DiracX locally
19+
20+
It is possible to run an instance of DiracX locally for demo or testing purposes. This entails running a local kubernetes cluster, installing this helm chart and all its dependencies, and configuring it accordingly.
21+
22+
!!! warning
23+
24+
This setup is **not** suitable for a production or long-lived deployment. To learn how to run a long-lived deployment, see [the how-to](../how-to/installing.md).
25+
26+
In order to make that easy, we wrote the ``run_demo.sh`` script, which covers all these needs. This is also used for the [diracx ci](https://github.com/DIRACGrid/diracx/blob/main/.github/workflows/main.yml)
1927

2028
### ``run_demo.sh``
2129

2230
This is the script used to start a demo or the integration tests.
2331

24-
```bash
25-
Usage: run_demo.sh [-h|--help] [--exit-when-done] [--offline] [--enable-coverage] [--no-mount-containerd] [--set-value key=value] [--] [source directories]
26-
27-
-h|--help: Print this help message and exit
28-
--exit-when-done: Exit after the demo has been started (it will be left running in the background)
29-
--enable-coverage: Enable coverage reporting (used by diracx CI)
30-
--no-editable-python: Do not install Python source directories in editable mode
31-
--offline: Run in a mode which is suitable for fully offline use.
32-
WARNING: This may result in some weird behaviour, see the demo documentation for details.
33-
Implies: --mount-containerd
34-
--no-mount-containerd: Mount a directory on the host for the kind containerd storage.
35-
This option avoids needing to pull container images every time the demo is started.
36-
WARNING: There is no garbage collection so the directory will grow without bound.
37-
--enable-open-telemetry: lauches OpenTelemetry collection.
38-
WARNING: experimental and resource hungry.
39-
--set-value: Set a value in the Helm values file. This can be used to override the default values.
40-
For example, to enable coverage reporting pass: --set-value developer.enableCoverage=true
41-
source directories: A list of directories containing Python packages to mount in the demo cluster.
32+
33+
```
34+
--8<-- "docs/admin/tutorials/run_demo_help.txt"
4235
```
4336

4437
Once ready, you will get some information on how to interact with your cluster

0 commit comments

Comments
 (0)