Git Product home page Git Product logo

docker-salt-master's Introduction

Docker Salt-Master

A Docker image which allows you to run a containerised Salt-Master server.

Running the Container

You can easily run the container like so:

docker run --rm -it soon/salt-master

Environment Variables

The following environment variables can be set:

  • LOG_LEVEL: The level to log at, defaults to error

Volumes

There are several volumes which can be mounted to Docker data container as described here: https://docs.docker.com/userguide/dockervolumes/. The following volumes can be mounted:

  • /etc/salt/pki - This holds the Salt Minion authentication keys
  • /var/cache/salt - Job and Minion data cache
  • /var/logs/salt - Salts log directory
  • /etc/salt/master.d - Master configuration include directory
  • /srv/salt - Holds your states, pillars etc

Data Container

To create a data container you are going to want the thinnest possible docker image, simply run this docker command, which will download the simplest possible docker image:

docker run -v /etc/salt/pki -v /var/salt/cache -v /var/logs/salt -v /etc/salt/master.d -v /srv/salt --name salt-master-data busybox true

This will create a stopped container with the name of salt-master-data and will hold our persistant salt master data. Now we just need to run our master container with the --volumes-from command:

docker run --rm -it --volumes-from salt-master-data soon/salt-master

Sharing Local Folders

To share folders on your local system so you can have your own master configuration, states, pillars etc just alter the salt-master-data command:

docker run -v /etc/salt/pki -v /var/salt/cache -v /var/logs/salt -v /path/to/local:/etc/salt/master.d -v /path/to/local:/srv/salt --name salt-master-data busybox true

Now /path/to/local can hold your states and master configuration.

Ports

The following ports are exposed:

  • 4505
  • 4506

These ports allow minions to communicate with the Salt Master.

Running Salt Commands

You can run commands on the salt-master via the docker exec command. For one off commands, you can use: docker exec salt-master-data salt "*" test.ping or for an interactive shell use: docker exec -it salt-master-data sh

docker-salt-master's People

Contributors

baskraai avatar enigmacurry avatar jamesjwarren avatar krak3n avatar theonlyjohnny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.