Super Saltstack Demo
Vagrant boxes to demo during my talk 'Super Saltstack'.
Install vagrant, then run
Two VMs will start - a salt-master, and a minion running nginx to serve a basic web page.
For the purposes of this demo, they will NOT be communicating yet. The VMs will not be provisioned.
Additionally, the host machine running vagrant should have a
salt-minion and a webcam reachable with the
A suitable minion config for the machine is at
This minion should have an id of
For the purposes of the demo, the minions should be added manually to
the master with
They should try to connect to the master automatically.
sudo salt \* state.highstate to get everything set up.
You can optionally run
./reset.sh on the master to deprovision the
web minion, but without uninstalling any packages.
The demo will then work without internet, providing you have run
highstate before the reset script.
./reset_all.sh will do this and also disconnect all minions with
Run the demo
192.168.4.3 in a browser (the web minion). Connection denied.
vagrant ssh master and
Watch the salt event bus in a pane with
sudo salt-run state.event pretty=True.
In another pane, check the minions are connected, accepting new
salt-key, and potentially starting the salt-minion
on the host.
Verify the beacon is setup on the master with
sudo salt \* beacons.list.
If not, run
sudo salt \*master state.sls beacon.motd.
/home/vagrant/motd.txt to set off the following sequence:
- An update to
/home/vagrant/motd.txton the master will cause a beacon event to fire.
- The salt reactor will notice this event and trigger an orchestrate
runner. This runner will copy the modified file to the web minion,
then run highstate on the web minion, creating a static html file
served by nginx. The contents of
motd.txtwill be added to this file.
- When the highstate on the web minion has completed, another reactor
will trigger another orchestrate runner, which will take a picture
imagesnapon the host minion.
- This picture will be grabbed by salt and placed in the nginx web root on the web minion.
192.168.4.3 again. A page should be returned with the message
motd.txt and the recently taken picture!
./reset.sh to tear down the web server and start the demo again.