An easy to run lab to learn Saltstack or test your formulas and states.
It will start one Saltstack master and two minions.
To run this lab you'll need Docker(17.12.0+) and Docker compose.
To start the lab use the following command at the root of the repository.
docker-compose up --detach --build
Use the salt-key command on the master until you see the two minions in the Unaccepted Keys list:
docker exec -t saltstack-master salt-key
Then accept the minion's keys:
docker exec -t saltstack-master salt-key -A -y
To test everything's went right run:
docker exec -t saltstack-master salt "*" test.ping
Note: the -t option is useful to get colors from Saltstack output.
docker-compose stop
After stopping the lab, if you want to destroy it, run:
docker-compose down --rmi all
Store your states in the salt directory and your pillars in the pillar directory.
To override Docker settings, create a file named docker-compose.override.yml at the root of the repository.
The following example shows how to customize the lab's network IP range:
version: "3.5"
networks:
saltstack:
name: saltstack
ipam:
driver: default
config:
- subnet: 192.168.0.0/24