Public Repository

Last pushed: 10 months ago
Short Description
Base images for running containers with a salt foundation.
Full Description

Running Salt Containers

This base images containes all the necessary binaries to run slat minion or master containers.
Basic configuration is determined through a series of environment variables - set durring docker run.

Tagging Scheme

salt-base:<salt-version>-<version-of-image>

Required variables

General Container Role

-e SALT_ROLE=<minion|master>

Salt Master

-e SALT_MASTER_AUTO_ACCEPT=<True|False>

Salt Minion

-e SALT_MINION_MASTER=<FQDN|IP>
-e SALT_MINION_ID=<Minion ID>
-e SALT_MINION_ROLE=<Role of Minion>
-e SALT_MINION_ENV=<Environment of Minion>

Examples

Master
Stand up a basic salt master with auto accept (accept minion keys automatically) set
to false.

docker run --name=my-salt-master -d \
-e SALT_ROLE="minion" \
-e SALT_MASTER_AUTO_ACCEPT=True \
-p 4505:4505 -p 4506:5606 \
salt-base:00

Minion
Stands up a salt minion with an id and sets the master to localhost. In addition, the grains for
role and env would also be set.

docker run --name=salt-minion-0 -d \
-e SALT_ROLE="minion" \
-e SALT_MINION_MASTER="192.168.204.133" \
-e SALT_MINION_ID="salt-minion-0" \
-e SALT_MINION_ROLE="build-node" \
-e SALT_MINION_ENV="dev" \
salt-base:00

Upon running the above (replacing the master ip with your master's IP), you should be able to log in using

docker exec -it my-salt-master /bin/bash

and be able to run and see the following

root@6668ebed6177:/# salt '*' test.ping
salt-minion-0:
    True
Docker Pull Command
Owner
slashfeed

Comments (0)