Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Jun 13, 2024
1 parent 583db29 commit ee76a6d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ To understand this ``chart`` you will need to familiarize yourself with a few k8
* A ``node`` is one of the machine (VM, physical) which sustains your k8s cluster.
* Your application runs inside a container which is part of a ``pod``. A ``pod`` is the atomic unit with which kubernetes will work, and in most cases it corresponds to a single container. ``pods`` are deployed on ``nodes``.
* A ``ReplicaSet`` represents how many ``pods`` of a given type you want to run. For example, you want to run 3 ``pods`` containing the ``diracx`` container for redundancy reasons.
* A ``Deployment`` is a ``pod`` and ``ReplicaSet`` together, and is how we normally describe our workload to k8s. This chart contains a ``deployment`` for ``diracx`` (see [here](diracx/templates/diracx/deployment.yaml)), and a ``deployment`` for ``diracx-web`` (see [here](diracx/templates/diracx-web/deployment.yaml)). Kubernetes will always make sure that the ``deployment`` is satisfied.
* A ``Deployment`` is how you describe your workload to k8s. It ensures that any number of replicas of your ``pod`` are running (via ``ReplicaSEt``). This chart contains a ``deployment`` for ``diracx`` (see [here](diracx/templates/diracx/deployment.yaml)), and a ``deployment`` for ``diracx-web`` (see [here](diracx/templates/diracx-web/deployment.yaml)). Kubernetes will always make sure that the ``deployment`` is satisfied.
* 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
* An ``Ingress`` exposes your application outside of the cluster.
* An ``Ingress`` exposes your ``Services`` outside of the cluster.

## Running locally
## Running the demo locally

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)

Expand Down Expand Up @@ -150,7 +150,7 @@ kubectl exec -it <pod name> -- /bin/bash /entrypoint.sh

#### Helm basics

When running the demo some an `values.yaml` file is created as `.demo/values.yaml`.
When running the demo, an `values.yaml` file is created as `.demo/values.yaml`.
This file can be used with helm to interact with the running demo to make changes to what is running in the cluster.

```bash
Expand All @@ -173,7 +173,11 @@ See [here](./docs/RUN_DEMO.md) for more details on what you can do to alter the

## Deploying in production

TODO
TODO: Link to k3s

TODO: Explain how to download the values from helm

TODO: add info about diracx-web

### Deploying a custom branch to DIRAC certification

Expand Down
16 changes: 11 additions & 5 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ To understand this ``chart`` you will need to familiarize yourself with a few k8
* A ``node`` is one of the machine (VM, physical) which sustains your k8s cluster.
* Your application runs inside a container which is part of a ``pod``. A ``pod`` is the atomic unit with which kubernetes will work, and in most cases it corresponds to a single container. ``pods`` are deployed on ``nodes``.
* A ``ReplicaSet`` represents how many ``pods`` of a given type you want to run. For example, you want to run 3 ``pods`` containing the ``diracx`` container for redundancy reasons.
* A ``Deployment`` is a ``pod`` and ``ReplicaSet`` together, and is how we normally describe our workload to k8s. This chart contains a ``deployment`` for ``diracx`` (see [here](diracx/templates/diracx/deployment.yaml)), and a ``deployment`` for ``diracx-web`` (see [here](diracx/templates/diracx-web/deployment.yaml)). Kubernetes will always make sure that the ``deployment`` is satisfied.
* A ``Deployment`` is how you describe your workload to k8s. It ensures that any number of replicas of your ``pod`` are running (via ``ReplicaSEt``). This chart contains a ``deployment`` for ``diracx`` (see [here](diracx/templates/diracx/deployment.yaml)), and a ``deployment`` for ``diracx-web`` (see [here](diracx/templates/diracx-web/deployment.yaml)). Kubernetes will always make sure that the ``deployment`` is satisfied.
* 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
* An ``Ingress`` exposes your application outside of the cluster.
* An ``Ingress`` exposes your ``Services`` outside of the cluster.


## Running locally
## Running the demo locally

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)

Expand Down Expand Up @@ -151,7 +151,7 @@ kubectl exec -it <pod name> -- /bin/bash /entrypoint.sh

#### Helm basics

When running the demo some an `values.yaml` file is created as `.demo/values.yaml`.
When running the demo, an `values.yaml` file is created as `.demo/values.yaml`.
This file can be used with helm to interact with the running demo to make changes to what is running in the cluster.

```bash
Expand All @@ -176,7 +176,13 @@ See [here](./docs/RUN_DEMO.md) for more details on what you can do to alter the

## Deploying in production

TODO

TODO: Link to k3s

TODO: Explain how to download the values from helm

TODO: add info about diracx-web


### Deploying a custom branch to DIRAC certification

Expand Down
2 changes: 1 addition & 1 deletion docs/RUN_DEMO.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Specificity of ``run_demo.sh``
# Details of ``run_demo.sh``

## What ``run_demo.sh`` does

Expand Down

0 comments on commit ee76a6d

Please sign in to comment.