Personal Saltstack lab environment in Docker (Centos7 containers)
Contact: Robert Nowotniak [email protected]
Tested on ArchLinux as the Docker host.
git clone https://github.com/rnowotniak/saltlab
docker pull rnowotniak/saltlab
cd saltlab
docker-compose up
Enter the Salt master container, accept all minions keys:
docker exec -it salt1 bash -l
salt-key
salt-key -A -y
Run some tests from Salt master to the minions:
salt '*' test.ping
Change number of minions dynamically:
docker-compose up --scale minions=6
docker pull centos:centos7
docker run -it --rm centos:centos7
yum install salt-master
yum install salt-minion
vi /etc/salt/minion (update master: hostname)
/usr/bin/salt-master -d
/usr/bin/salt-minion -d -l info
tail /var/log/salt/{master,minion}
salt-key
salt-key -A
docker build -t rnowotniak/saltlab .
docker run --name salt1 --rm rnowotniak/saltlab
docker-compose
up ( -d )
scale minions=3
logs master
ps
restart minions
run
stop