summary refs log tree commit diff
path: root/issues/CI-CD/development-container-checklist.gmi
blob: 7cf4687c76df967d157cf977684c71c424c28e30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Deploying GeneNetwork CD

## Prerequisites

Ensure you have `fzf' installed and Guix is set up with your preferred channel configuration. 


## Step 1: Pull the Latest Profiles

```
guix pull -C channels.scm -p ~/.guix-extra-profiles/gn-machines --allow-downgrades
guix pull -C channels.scm -p ~/.guix-extra-profiles/gn-machines-shepherd-upgrade --allow-downgrades
```


## Step 2: Source the Correct Profile

```
. ,choose-profile
```


### Contents of `,choose-profile'

This script lets you interactively select a profile using `fzf': 

```
#!/bin/env sh

export GUIX_PROFILE="$(guix package --list-profiles | fzf --multi)"
. "$GUIX_PROFILE/etc/profile"

hash guix

echo "Currently using: $GUIX_PROFILE"
```


## Step 3: Verify the Profile

```
guix describe
```


## Step 4: Pull the Latest Code

```
cd gn-machines
git pull
```


## Step 5: Run the Deployment Script

```
./genenetwork-development-deploy.sh
```


## Step 6: Restart the Development Container

```
sudo systemctl restart genenetwork-development-container
```


## Step 7: Verify Changes

Manually confirm that the intended changes were applied correctly. 


# Accessing the Development Container on tux02

To enter the running container shell, ensure you're using the *parent* PID of the `shepherd' process. 


## Step 1: Identify the Correct PID

Use this command to locate the correct container parent process: 

```
ps -u root -f --forest | grep -A4 '/usr/local/bin/genenetwork-development-container' | grep shepherd
```


## Step 2: Enter the Container

Replace `46804' with your actual parent PID: 

```
sudo /home/bonfacem/.config/guix/current/bin/guix container exec 46804 \
  /gnu/store/m6c5hgqg569mbcjjbp8l8m7q82ascpdl-bash-5.1.16/bin/bash \
  --init-file /home/bonfacem/.guix-profile/etc/profile --login
```


## Notes

* Ensure the PID is the container’s *shepherd parent*, not a child process. 
* Always double-check your environment and profiles before deploying.