network/doc/test-environment.md

781 B

Create a Virtual Machine

TODO: nixify

dd if=/dev/zero of=salt.hda bs=1M count=1 seek=10239
wget http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso
kvm -hda salt.hda -m 1024 -smp 2 -net nic,model=e1000 -net user -cdrom

Now run the Debian installation. Hostname: server1

brctl addbr br-up1
ifdown eth0
brctl addif br-up1 eth0
dhclient br-up1

Bootstrap

Configure a recent version, eg. stretch

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.

salt \* state.apply

Then accept the container minions:

salt-key -A

And again:

salt \* state.apply