Skip to content

Install and configure Docker or orchestrate a Docker Swarm cluster

License

Notifications You must be signed in to change notification settings

bogn83/salt-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker salt formula

This formula installs and configures Docker.

States

docker

Install docker, configure daemon.json according to the information in Salt pillar. See pillar.example for configuration options.

docker.prune

Setup a systemd timer that cleans up unused and dangling images every night by running docker system prune --force --all automatically.

docker.compose

Install docker-compose package.

Bootstrap cluster

This state configures Docker and Swarm. It defaults to use the interface eth0 for internal communication. The interface can be adjusted using the Pillar:

docker:
  swarm:
    interface: ens3
# Bootstrap the cluster
sudo salt-run state.orch docker.orch.bootstrap-swarm pillar='{"leader": "$leader", "nodes": ["$2nd_node", "3rd_node"]}'

About

Install and configure Docker or orchestrate a Docker Swarm cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SaltStack 94.4%
  • HTML 5.6%