Skip to content

Commit 1685a1f

Browse files
authored
Merge pull request #135 from aldbr/main_FEAT_debugging-doc
feat(docs): add documentation to debug the code
2 parents 60ca904 + f2d347e commit 1685a1f

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

docs/DEBUGGING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Debugging
2+
3+
## Debug your production environment
4+
5+
### 1. Create a debugging branch
6+
- Create a branch and add debugging content throughout the code.
7+
- Push the branch to your VCS.
8+
9+
### 2. Retrieve `helm` values
10+
- Retrieve the `helm` values of your production cluster:
11+
12+
```bash
13+
helm get values <RELEASE_NAME> > values.yaml
14+
```
15+
16+
### 3. Modify the values
17+
18+
**Apply a specific version of a diracx package**
19+
- Edit the `values.yaml` file, such as:
20+
21+
```yaml
22+
...
23+
diracx:
24+
pythonModulesToInstall:
25+
- git+https://github.com/<YOUR_REPO>/diracx.git@<BRANCH_NAME>#&subdirectory=diracx-routers
26+
- git+https://github.com/<YOUR_REPO>/diracx.git@<BRANCH_NAME>#&subdirectory=diracx-db
27+
- ...
28+
...
29+
```
30+
31+
In this example, you install a specific version of `diracx-routers` and `diracx-db`.
32+
33+
**Apply a specific version of diracx-web**
34+
- Edit the `values.yaml` file, such as:
35+
36+
```yaml
37+
diracxWeb:
38+
repoURL: "https://github.com/<YOUR_REPO>/diracx-web"
39+
branch: "<YOUR_BRANCH>"
40+
...
41+
```
42+
43+
### 4. Upgrade the cluster
44+
- Once done, upgrade your cluster:
45+
46+
```bash
47+
cd diracx-charts/
48+
helm upgrade <RELEASE_NAME> diracx/ -f <YOUR_UPDATED_VALUES>
49+
```
50+
51+
*A new pod will be deployed and will contain your changes.*
52+
53+
### 5. Iteratively debug your environment
54+
55+
- Once your branch deployed, if you need to update your code, then make your changes, push the code to your VCS in the same branch, and restart the rollout of the pod.
56+
57+
```bash
58+
kubectl rollout restart deployment/<POD_NAME>
59+
```

0 commit comments

Comments
 (0)