{"id":25968773,"url":"https://github.com/shantoroy/saltstack-mini-docker-lab","last_synced_at":"2026-04-15T22:31:56.825Z","repository":{"id":280535712,"uuid":"939157280","full_name":"shantoroy/saltstack-mini-docker-lab","owner":"shantoroy","description":"This project demonstrates how to use SaltStack for configuration management and orchestration in a containerized environment.","archived":false,"fork":false,"pushed_at":"2025-03-04T00:03:47.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T17:53:37.239Z","etag":null,"topics":["configuration-management","docker","docker-compose","saltstack","site-reliability-engineering"],"latest_commit_sha":null,"homepage":"","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shantoroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T04:46:36.000Z","updated_at":"2025-03-04T00:03:51.000Z","dependencies_parsed_at":"2025-03-04T01:19:52.246Z","dependency_job_id":"8922604d-eb06-429f-99a6-a17b777fdf1d","html_url":"https://github.com/shantoroy/saltstack-mini-docker-lab","commit_stats":null,"previous_names":["shantoroy/saltstack-mini-docker-lab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shantoroy/saltstack-mini-docker-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shantoroy%2Fsaltstack-mini-docker-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shantoroy%2Fsaltstack-mini-docker-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shantoroy%2Fsaltstack-mini-docker-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shantoroy%2Fsaltstack-mini-docker-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shantoroy","download_url":"https://codeload.github.com/shantoroy/saltstack-mini-docker-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shantoroy%2Fsaltstack-mini-docker-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-management","docker","docker-compose","saltstack","site-reliability-engineering"],"created_at":"2025-03-04T22:25:11.010Z","updated_at":"2026-04-15T22:31:56.792Z","avatar_url":"https://github.com/shantoroy.png","language":"SaltStack","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SaltStack Mini Docker Lab\nThis project demonstrates how to use SaltStack for configuration management and orchestration in a containerized environment. It sets up a Salt Master and two Salt Minions using Docker Compose, allowing you to experiment with Salt states, pillars, and remote execution in an isolated environment.\n\n\n## Project Overview\nThis project uses Docker Compose to create a SaltStack environment with:\n\n1. Salt Master: The central server that manages the minions.\n\n2. Salt Minions: The client machines that are managed by the master.\n\nThe project includes example Salt states and pillars to install and manage Nginx on the minions. It’s a great way to learn SaltStack and showcase your skills in infrastructure automation.\n\n## Features\n* **Containerized Environment**: Uses Docker Compose for easy setup and teardown.\n\n* **SaltStack Basics**: Demonstrates Salt states, pillars, and remote execution.\n\n* **Nginx Example**: Includes a sample state to install and configure Nginx on minions.\n\n* **Scalable**: Easily add more minions or customize states for other use cases.\n\n## Prerequisites\nBefore running this project, ensure you have the following installed on your machine:\n\n1. **Docker**: Install Docker\n\n2. **Docker Compose**: Install Docker Compose\n\n\n## Setup and Usage\n#### Clone the Repository\n```bash\ngit clone https://github.com/shantoroy/saltstack-mini-docker-lab.git\ncd saltstack-mini-docker-lab\n```\n#### Start the Environment\nRun the following command to start the Salt master and minions:\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n#### Accept Minion Keys\nOnce the containers are running, accept the minion keys on the Salt master:\n\n```bash\ndocker exec -it salt-master salt-key -A\n```\n\n#### Apply Salt States\nApply the example state to install and configure Nginx on the minions:\n\n```bash\ndocker exec -it salt-master salt '*' state.apply\n```\n#### Verify the Setup\nCheck if Nginx is installed and running on the minions:\n\n```bash\ndocker exec -it salt-minion1 systemctl status nginx\ndocker exec -it salt-minion2 systemctl status nginx\n```\n#### Stop the Environment\nTo stop and remove the containers, run:\n\n```bash\ndocker-compose down\n```\n\n\n## Project Structure\n```\nsaltstack-docker-demo/\n├── docker-compose.yml          # Docker Compose configuration\n├── master/                     # Salt master configuration and files\n│   ├── config/                 # Master configuration files\n│   │   └── master.conf\n│   ├── salt/                   # Salt states and pillars\n│   │   ├── states/\n│   │   │   └── top.sls         # Top file for states\n│   │   │   └── example.sls     # Example state to install Nginx\n│   │   └── pillar/\n│   │       └── top.sls         # Top file for pillars\n│   │       └── example.sls     # Example pillar data\n├── minion1/                    # Configuration for minion1\n│   └── config/\n│       └── minion.conf\n├── minion2/                    # Configuration for minion2\n│   └── config/\n│       └── minion.conf\n└── README.md                   # Project documentation\n```\n\n\n## Salt States and Pillars\n#### Example State (example.sls)\nThis state installs and starts Nginx on the minions:\n\n```yml\ninstall_nginx:\n  pkg.installed:\n    - name: nginx\n\nstart_nginx:\n  service.running:\n    - name: nginx\n    - require:\n      - pkg: install_nginx\n```\n\n#### Example Pillar (example.sls)\nThis pillar file contains example data:\n\n```\nexample_key: example_value\n```\n\n## Example Commands\n#### Apply States\nApply the example state to all minions:\n\n```\ndocker exec -it salt-master salt '*' state.apply\n```\n\n#### Run Ad-Hoc Commands\nRun a command on all minions:\n\n```\ndocker exec -it salt-master salt '*' cmd.run 'echo Hello, Salt!'\n```\n\n#### Check Minion Status\nCheck the status of the minions:\n\n```\ndocker exec -it salt-master salt '*' test.ping\n```\n\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshantoroy%2Fsaltstack-mini-docker-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshantoroy%2Fsaltstack-mini-docker-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshantoroy%2Fsaltstack-mini-docker-lab/lists"}