implement some make targets to ease testing of a bootCD layout, esp. wrt the ping_nod...
[bootcd.git] / ping-node.md
1 # Purpose
2 Let us try to shorten the devel loop when playing with changes to the bootcd internals.
3 And namely, the set of systemd files that describe booting off the CD image
4
5
6 # Environment
7
8 ## the 'try this out several times' utility
9
10 * The utility sits in `git/tests/system`  
11
12 * you can push it onto a specific build using `make sync` as usual
13
14 * and then run it on the testmaster side like this
15
16     iterate-ping-node <nb_iterations>
17
18 * This allows to run a given bootcd (the iso computed for one node) several times over, and to gather all logs from qemu
19 * This is **only** restarting the kvm/qemu node several times, nothing is done to recompute the .iso itself (see below for that). So the game is to easily simulate how a change to `bootcd` would affect a node ISO without rebuilding the whole damn thing.
20
21 ## Easily redo a .iso
22
23 * select a running test in testmaster/; like e.g. one that has failed the `ping_node` step already
24
25 * you will need 2 local terminals with that
26   * one in `git/bootcd`
27   * one in `git/tests` 
28
29 * do the usual routine on running `exp`, exposing variables in both terminals,
30
31 * then run `make sync` from workdir `tests/system` (just for `iterate-ping-node`)
32
33 * and run `make sync-unwrap` from workdir bootcd
34
35 At that point there will be the following files and subdirs on the KVM host (in my case boxtops)
36
37 * the normal node bootCD iso, like e.g. 
38   * `vnode01.pl.sophia.inria.fr.iso` 
39 * a copy of that file, like e.g. 
40   * `vnode01.pl.sophia.inria.fr.iso.ref` 
41 * a read-only copy of the bootcd image in `bootcd.ref/`
42 * a writable version of this in `bootcd/`
43 * a read-only copy of the overlay image in `overlay.ref/`
44 * a writable version of this in `overlay/`
45
46 The workflow from then on is you can change the layout/contents of the bootcd/ directory, and then repeatedly run
47
48 * `make sync-rewrap` from the `bootcd/` workdir, and then
49 * `iterate-ping-node` from the `tests/` workdir
50
51 Once you're satisfied you can make a difference between bootcd/ and bootcd.ref/ to see how the changes need to be implemented in `build.sh` and/or `prep.sh`