README.md 1.38 KB
Newer Older
o@immerda.ch's avatar
initial  
o@immerda.ch committed
1
2
3
4
5
## 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).
o@immerda.ch's avatar
o@immerda.ch committed
6
1. An `ibox-instance` AppVM.
o@immerda.ch's avatar
initial  
o@immerda.ch committed
7

o@immerda.ch's avatar
o@immerda.ch committed
8
9
First start by checking out this repository in your development VM. We'll assume
it to be called `devqube`:
o@immerda.ch's avatar
initial  
o@immerda.ch committed
10
11
12
13
14
15
16
17
18

```
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:

```
o@immerda.ch's avatar
o@immerda.ch committed
19
qvm-run -p devqube "cat /home/user/Documents/ibox-qubes/setup/dom0.sh" > setup-ibox.sh
o@immerda.ch's avatar
initial  
o@immerda.ch committed
20
21
22
sh setup-ibox.sh
```

o@immerda.ch's avatar
o@immerda.ch committed
23
24
25
Troubleshoot: If updating centos-8-minimal fails you might have a broken template. Removing and re-installing the `qubes-template-centos-8-minimal` might help.

Now all the vms are created and we can start setting up the `ibox-template` template. Start
o@immerda.ch's avatar
initial  
o@immerda.ch committed
26
27
28
the VM and execute [setup/ibox.sh](setup/ibox.sh) in it, as root. It installs all
required packages and repositories.

o@immerda.ch's avatar
o@immerda.ch committed
29
Stop the `ibox-template` VM again.
o@immerda.ch's avatar
initial  
o@immerda.ch committed
30

o@immerda.ch's avatar
o@immerda.ch committed
31
Now, start the `ibox-instance` and download the ibox repo:
o@immerda.ch's avatar
initial  
o@immerda.ch committed
32
33
34
35
36

```
git clone https://code.immerda.ch/immerda/ibox/boilerplate.git ibox
cd ibox
git submodule update --init --recursive
o@immerda.ch's avatar
o@immerda.ch committed
37
cp hieradata/vagrant.yaml.sample hieradata/vagrant.yaml
o@immerda.ch's avatar
initial  
o@immerda.ch committed
38
39
40
41
42
sudo su -
hostnamectl set-hostname ibox1.local
cd /home/user/ibox
bin/local_apply.sh
```