network/doc/test-environment.md

44 lines
781 B
Markdown
Raw Normal View History

2016-11-03 00:26:30 +01:00
# Create a Virtual Machine
2021-04-08 02:35:46 +02:00
TODO: nixify
2016-11-03 00:26:30 +01:00
```shell
dd if=/dev/zero of=salt.hda bs=1M count=1 seek=10239
2017-01-19 15:46:15 +01:00
wget http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso
2016-11-03 00:26:30 +01:00
kvm -hda salt.hda -m 1024 -smp 2 -net nic,model=e1000 -net user -cdrom
```
Now run the Debian installation. Hostname: `server1`
2016-11-09 01:18:00 +01:00
```shell
brctl addbr br-up1
ifdown eth0
brctl addif br-up1 eth0
dhclient br-up1
```
2016-11-03 00:26:30 +01:00
# Bootstrap
Configure a recent version, eg. *stretch*
```shell
apt-get install salt-master salt-minion
```
Set `master` to `localhost` in `/etc/salt/minion`, restart the
minion. `salt-key -A` to accept the minion in the master.
2016-11-08 23:39:50 +01:00
```shell
salt \* state.apply
```
Then accept the container minions:
```shell
salt-key -A
```
And again:
```shell
salt \* state.apply
```