README.md 1.56 KB
Newer Older
o's avatar
initial  
o committed
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
## Starting an ibox as qubes AppVM

The main idea is to have:

1. An `ibox` template VM mirroring more or less a VM created by our [kickstart file](https://code.immerda.ch/immerda/ibox/stemcell/-/blob/master/http/centos8.ks).
1. An `ibox-base` AppVM which serves as "template" (not in the qubes sense) to create iboxes.

The second step is merely to avoid repeatedly downloading the ibox repository.

First start by checking out this repository in your development VM, that we'll assume
to be called `idev`:

```
git clone git@code-ssh.immerda.ch:immerda/ibox/qubes.git ibox-qubes
```

To create both VMs and install centos-8, there is a [setup/dom0.sh](setup/dom0.sh) script.
You can run it in dom0 with:

```
qvm-run -p idev "cat /home/user/Documents/ibox-qubes/setup/dom0.sh" > setup-ibox.sh
sh setup-ibox.sh
```

Now all the vms are created and we can start setting up the `ibox` template. Start
the VM and execute [setup/ibox.sh](setup/ibox.sh) in it, as root. It installs all
required packages and repositories.

Stop the `ibox` VM again.

Now, start the `ibox-base` and download the ibox repo:

```
git clone https://code.immerda.ch/immerda/ibox/boilerplate.git ibox
cd ibox
git submodule update --init --recursive
```

Stop `ibox-base` again.

Finally, you can start using your custom ibox. The easiest is, you clone it first, so you keep a clean state.
In dom0 `qvm-clone ibox-base ibox1`, then start `ibox1`.

In `ibox1` get going with:
```
sudo su -
hostnamectl set-hostname ibox1.local
cd /home/user/ibox
cp hieradata/vagrant.yaml.sample hieradata/vagrant.yaml
bin/local_apply.sh
```