2016-11-03 00:26:30 +01:00
|
|
|
# Create a Virtual Machine
|
|
|
|
|
|
|
|
```shell
|
|
|
|
dd if=/dev/zero of=salt.hda bs=1M count=1 seek=10239
|
|
|
|
wget http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-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`
|
|
|
|
|
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
|
|
|
|
```
|