Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xenion1987/saltstack-playground
A DevContainer for playing around with salt-stack
https://github.com/xenion1987/saltstack-playground
devcontainer docker docker-compose salt salt-stack saltstack vscode
Last synced: 17 days ago
JSON representation
A DevContainer for playing around with salt-stack
- Host: GitHub
- URL: https://github.com/xenion1987/saltstack-playground
- Owner: Xenion1987
- License: mit
- Created: 2023-11-04T17:21:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T09:49:34.000Z (about 1 year ago)
- Last Synced: 2024-11-05T12:03:06.609Z (2 months ago)
- Topics: devcontainer, docker, docker-compose, salt, salt-stack, saltstack, vscode
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# saltstack-playground
## Installing
### Install requirements
1. [vscode](https://code.visualstudio.com/Download)
1. [docker compose](https://docs.docker.com/compose/install/)
1. vscode plugins
1. [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)### Clone this repository
```sh
git clone https://github.com/Xenion1987/saltstack-playground.git
```## Start the playground
### Start the saltstack control container
Open the repository in vscode. Vscode should give you a hint, that it has detected a DevContainer config and asks you to reopen it in DevContainer. Accept to initialize and start the environment.
### Customize `salt-master-debian` container
> **This step will be executed automatically by starting the DevContainer**
Starting the DevContainer will execute the script [post-create-command.sh](./.devcontainer/scripts/post-create-command.sh). Feel free to modify it to fit to your favorite tools and configs.
### Check minion registration
Every minion should try to register with the **salt-master**:
```txt
root ➜ /workspace (main) $ salt-key
Accepted Keys:
Denied Keys:
Unaccepted Keys:
alma.salt.minion
debian.salt.minion
suse.salt.minion
ubuntu.salt.minion
Rejected Keys:
```Accept them individually via
```sh
salt-key -a
```or accept them all at once:
```
root ➜ /workspace (main) $ salt-key -y -A
The following keys are going to be accepted:
Unaccepted Keys:
alma.salt.minion
debian.salt.minion
suse.salt.minion
ubuntu.salt.minion
Key for minion alma.salt.minion accepted.
Key for minion debian.salt.minion accepted.
Key for minion suse.salt.minion accepted.
Key for minion ubuntu.salt.minion accepted.
```### Test minion connection
Test whether the accepted minions respond as expected:
```
root ➜ /workspace (main) $ salt '*' test.version
debian.salt.minion:
3006.4
alma.salt.minion:
3006.4
ubuntu.salt.minion:
3006.4
suse.salt.minion:
3006.0
```