Skip to content

Docker Compose file which creates a Salt master and minion(s) with help of Docker for testing.

License

Notifications You must be signed in to change notification settings

tv0ll/One-Salty-Docker

 
 

Repository files navigation

That's One Salty Docker!

If you aren't using Docker-Compose, you can spin up individual Salt Masters & Minions like this:

docker run tvoll/one-salty-docker:salt-master
docker run tvoll/one-salty-docker:salt-minion

Docker Compose file will create a Salt master and minion(s). The Salt master auto accepts all minions. Used for testing the salt master with > 1000 minions.

Start the stack

Start the salt master and 1 minion.

docker-compose up -d

Registering minions

When using auto_accept: False (default setting) every minion needs to be accepted. List minions waiting for keys to be accepted. This part can be skipped when using this repo as is.

docker-compose exec master salt-key -L

Accept all pending keys for all minions

docker-compose exec master salt-key -A

Using salt

Scale some extra minions

docker-compose up --scale minion=5

Run some commands on the minions

docker-compose exec master salt '*' test.ping

Using salt with Rancher

Scale the minion service

rancher scale minion=100

Run a ping

rancher exec master salt '*' test.ping

Time the ping

time rancher exec master salt '*' test.ping

Collatz

rancher exec master salt '*' test.collatz 1

Instructions for Portainer

Since Portainer doesn't come with an App Template for SaltStack, you can use these docker compose files in order to build the stack in seconds.

  • On your Portainer dashboard, select the App Templates option on the last hand side.
  • Once inside of the App Templates section, find the option 'Add Template'
  • After the title and the description, choose the template type as 'Compose stack'
  • Name would be SaltStack, and Logo for SaltStack can be: https://saltstack.com/wp-content/uploads/2018/05/SaltStack_logo_blk__400x126.png
  • Change the Platform to Linux
  • Choose or type whatever category best describes the SaltStack
  • The Github Repo will be: https://github.com/tvollscw/One-Salty-Docker
  • The Compose File Path will be: docker-compose.yml
  • Create the template, search for it in your App Template Index, select the new SaltStack Template, then within it you will have the option to Deploy the Stack.

About

Docker Compose file which creates a Salt master and minion(s) with help of Docker for testing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published