Skip to content

Commit 18c1662

Browse files
committed
docs: document the release process
1 parent 70bf3c7 commit 18c1662

5 files changed

Lines changed: 182 additions & 2 deletions

File tree

docs/admin/how-to/install/register-a-vo.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Registering a VO means allowing users of a specific Virtual Organization to use DiracX services. In practice, this can be done once an external IdP is used for managing such VO.
44
By default all VOs managed by a DIRAC/DiracX instance are already "registered" (or "enabled", in other words). There is anyway the possibility to "Disable" VOs by filling the option `DiracX > DisabledVOs` with the list of VOs that can not use DiracX:
55

6-
````
76
??? example "Configuration example"
87

98
```yaml
@@ -12,7 +11,6 @@ By default all VOs managed by a DIRAC/DiracX instance are already "registered" (
1211
DisabledVOs = vo_x, vo_y
1312
}
1413
```
15-
````
1614

1715
## Prerequisites
1816

docs/dev/explanations/extensions.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ For most components you can extend them in isolation without needing to have an
3535

3636
The exception to this is when extending `diracx-routers` you MUST also extend `diracx-client` and your client extension MUST be regenerated for every DiracX release.
3737
More details about this can be found in the [dedicated how to](../how-to/client-extension.md).
38+
3839
Additionally, you will need an umbrella helm chart for your extension.
3940

4041
## Gubbins
@@ -225,3 +226,65 @@ Note that even if you have your own `testing` package depending on `diracx-testi
225226
## `Dockerfile`
226227

227228
`extensions/containers/services/Dockerfile` contains an example of `Dockerfile` for extensions.
229+
230+
## Extension chart
231+
232+
Although you could simply replace the docker images used in the `diracx-charts` by your own, having the umbrella extension is strongly recommended. The reason is that you will be able to properly manage your release cycle and manage proper dependencies, `AppVersion` corresponding to your app, etc.
233+
234+
Note that your `value.yaml` needs an extra `diracx` layer:
235+
236+
```yaml
237+
diracx:
238+
diracx:
239+
settings:
240+
DIRACX_CONFIG_BACKEND_URL: "some github url"
241+
```
242+
243+
## Repository setup
244+
245+
How the repositories are setup is very extension specific and flexible. Here we describe one possible set up.
246+
247+
This setup works by having one GitLab repository for you extension's code and a separate GitLab repository for an extension to `diracx-charts`. One or more installations are then managed via the GitLab CI of `<extension>-charts`. Updating the DiracX dependency of `<extension>` is handled via [`renovate`](https://github.com/renovatebot/renovate). `Renovate` should be configured to update the `pyproject.toml` and the `dockerfile` (see [lhcb configuration](https://gitlab.cern.ch/lhcb-dirac/lhcbdiracx/-/blob/master/renovate.json)) Updating the `<extension>-charts` repository is handled by the GitLab CI job of `<extension>` whenever a Git tag is created.
248+
249+
A new extension release should trigger a release of your extension chart. (See `deploy-chart` job in [lhcb ci config](https://gitlab.cern.ch/lhcb-dirac/lhcbdiracx/-/blob/master/.gitlab-ci.yml))
250+
In this case, a new extension-chart release means updating:
251+
252+
- the chart version
253+
- the AppVersion
254+
- the containers versions
255+
- the diracx-charts version to the latest compatible with the diracx version required by lhcbdiracx
256+
257+
```mermaid
258+
flowchart LR
259+
subgraph diracx-block["diracx"]
260+
diracx-charts("diracx-charts")
261+
diracx("diracx")
262+
diracx-web("diracx-web")
263+
end
264+
265+
subgraph extension-block["extension"]
266+
extension("extension")
267+
extension-web("extension-web")
268+
extension-charts("extension-charts")
269+
end
270+
271+
272+
diracx -->|commit| diracx-charts
273+
diracx-web -->|commit| diracx-charts
274+
275+
diracx -->|renovate| extension
276+
diracx-web -->|renovate| extension-web
277+
extension -->|commit and bump diracx-charts| extension-charts
278+
extension-web -->|commit| extension-charts
279+
280+
linkStyle 0 stroke: blue
281+
linkStyle 1 stroke: blue
282+
linkStyle 2 stroke: red
283+
linkStyle 3 stroke: red
284+
linkStyle 4 stroke: blue
285+
linkStyle 5 stroke: blue
286+
```
287+
288+
=== "Gitlab"
289+
290+
This assumes you are

docs/dev/how-to/make-a-release.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
This page describes how to mechanically make releases of DiracX and extensions. See the [reference](../reference/making-releases.md) documentation for more details about how releases are made.
2+
3+
# How to make a new DiracX release
4+
5+
1. Merge any PR you want in your release
6+
7+
2. Find the `release-please` [pull request](https://github.com/DIRACGrid/diracx/pulls?q=is%3Apr+is%3Aopen+%22chore%28main%29%3A+release%22) for your release
8+
9+
3. Review the release number **and** the content of the changelog
10+
11+
- If you need to change the release number, follow the [ `release-please` doc](https://github.com/googleapis/release-please?tab=readme-ov-file#how-do-i-change-the-version-number)
12+
13+
```bash
14+
git commit --allow-empty -m "chore: release 0.0.3" -m "Release-As: v0.0.3"
15+
git push upstream HEAD:main
16+
```
17+
18+
- TODO: update the release notes manually
19+
20+
4. Merge the PR
21+
22+
5. Check the [deployment action](https://github.com/DIRACGrid/diracx/actions/workflows/deployment.yml?query=event%3Apush+actor%3ADIRACGridBot)
23+
24+
6. Check that the [CI](https://github.com/DIRACGrid/diracx-charts/actions/workflows/chart-ci.yml?query=actor%3ADIRACGridBot) in `diracx-charts` is successful
25+
26+
At this stage, there is a new `diracx` and `diracx-chart` release.
27+
28+
## Making the extension release
29+
30+
Making a release of an extension depends on how the extension has been set up. Below are recommended workflows:
31+
32+
=== "Generic GitLab"
33+
34+
1. Ensure any desired merge requests have been merged.
35+
2. Ensure the `pyproject.toml` contains the desired DiracX dependency
36+
- If it does not, run the pipeline schedule to run renovate, which should trigger a merge request to update the version.
37+
- Merge the renovate-generated MR.
38+
3. Create tag (and optionally [release](<>)) for your extension
39+
4. Updates to extension's "charts" repo will be pushed automatically or via merge requests depending on your setup.
40+
41+
=== "LHCb"
42+
43+
- The LHCb installation follows the "Generic GitLab" workflow.
44+
- The renovate job runs every Monday at 22:10 UTC. It can be manually triggered [here](https://gitlab.cern.ch/lhcb-dirac/lhcbdiracx/-/pipeline_schedules).
45+
- The LHCb certification set up is updated automatically, see [here](https://gitlab.cern.ch/lhcb-dirac/lhcbdiracx-charts/-/pipelines?page=1&scope=all&ref=lhcbdiracx-cert) for the pipelines.
46+
- The LHCb production setup is deployed automatically when the associated merge request is merged. See [here](https://gitlab.cern.ch/lhcb-dirac/lhcbdiracx-charts/-/merge_requests/?sort=created_date&state=opened&author_username=project_217407_bot_a1f6511ecbeab04354572cf37500b0a3&first_page_size=20) for the pending updates.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Making and deploying releases
2+
3+
!!! warning "Version compatibility"
4+
5+
DiracX should be upgraded before upgrading legacy DIRAC installations.
6+
7+
The versioning of `DIRAC`, `DIRACCommon`, `diracx`, `diracx-charts` and all the extensions are very linked to one another.
8+
9+
```mermaid
10+
flowchart LR
11+
subgraph diracx-block["diracx"]
12+
diracx-charts("diracx-charts")
13+
diracx("diracx")
14+
diracx-web("diracx-web")
15+
end
16+
17+
18+
diracx -->|commit| diracx-charts
19+
diracx-web -->|commit| diracx-charts
20+
21+
linkStyle 0 stroke: blue
22+
linkStyle 1 stroke: blue
23+
24+
```
25+
26+
## Dependencies between diracx, DIRAC and DIRACCommon
27+
28+
Both `DIRAC` and `diracx` depend on `DIRACCommon`. However, `DIRACCommon` is in the same repository as `DIRAC`, and versioned together. This means that if we need to move code from `DIRAC` to `DIRACCommon` such that it is usable by `diracx`, we need first a new release of `DIRAC` and `DIRACCommon` just moving the code, before being able to use it in `diracx`.
29+
30+
The releases of `DIRAC` and `DIRACCommon` are managed as they have always been, and are described in the `DIRAC` documentation
31+
32+
## Dependencies between diracx and diracx-charts
33+
34+
`diracx-charts` has a version number, as well as an `appversion`, which corresponds to the `diracx` version. This means that a new release of `diracx` requires a new `diracx-charts` release, which will update:
35+
36+
- the diracx-charts version
37+
- the AppVersion
38+
- the container versions
39+
40+
The `update-charts` CI job in `diracx` pushes a new commit in `diracx-charts`, which results in a new `diracx-charts` release.
41+
42+
## Dependencies between diracx, diracx-web and diracx-charts
43+
44+
The `diracx-web` version is only very loosely coupled with the `diracx` version.
45+
A new `diracx-web` release will trigger a new `diracx-charts` updating:
46+
47+
- the chart version
48+
- the container versions
49+
- NOT the AppVersion
50+
51+
## diracx release
52+
53+
Releases are managed by `ReleasePlease`. The token used to perform it belongs to `diracbot` github user
54+
55+
A new release creates:
56+
57+
- a [github release](https://github.com/DIRACGrid/diracx/releases)
58+
- a [pypi release](https://pypi.org/project/diracx/)
59+
- new [docker images](https://github.com/DIRACGrid/diracx/)
60+
61+
### Force version number
62+
63+
You can force a specific version number following the [doc](https://github.com/googleapis/release-please?tab=readme-ov-file#how-do-i-change-the-version-number)
64+
65+
```bash
66+
git commit --allow-empty -m "chore: release 0.0.3" -m "Release-As: v0.0.3"
67+
git push upstream HEAD:main
68+
```
69+
70+
## diracx-charts releases
71+
72+
Every commit in master triggers a new release. The releases are published on a [helm repo](https://charts.diracgrid.org/index.yaml)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ nav:
111111
- Security Model: admin/reference/security_model.md
112112
- Settings and Preferences: admin/reference/settings-and-preferences.md
113113
- Environment variables: admin/reference/env-variables.md
114+
- Making and deploying releases: dev/reference/making-releases.md
114115
- Charts values: admin/reference/values.md
115116
- RUN_PROD.md
116117
- SSO.md

0 commit comments

Comments
 (0)