mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-02 03:37:40 +02:00
update
This commit is contained in:
parent
f212a1303d
commit
fe2cd6919c
75
salt-master/README.md
Normal file
75
salt-master/README.md
Normal file
@ -0,0 +1,75 @@
|
||||
salt-master
|
||||
===========
|
||||
|
||||
![](https://badge.imagelayers.io/vimagick/salt-master:latest.svg)
|
||||
|
||||
Salt is a new approach to infrastructure management. Easy enough to get running
|
||||
in minutes, scalable enough to manage tens of thousands of servers, and fast
|
||||
enough to communicate with them in seconds.
|
||||
|
||||
Salt delivers a dynamic communication bus for infrastructures that can be used
|
||||
for orchestration, remote execution, configuration management and much more.
|
||||
|
||||
## network topology
|
||||
|
||||
- master
|
||||
- coreos: 192.168.1.1
|
||||
- minions
|
||||
- arch: 192.168.1.100
|
||||
- debian: 192.168.1.101
|
||||
- ubuntu: 192.168.1.102
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```
|
||||
master:
|
||||
image: vimagick/salt-master
|
||||
ports:
|
||||
- "4505:4505"
|
||||
- "4506:4506"
|
||||
restart: always
|
||||
```
|
||||
|
||||
> Please backup volumes regularly!
|
||||
|
||||
## salt-master
|
||||
|
||||
```
|
||||
$ cd ~/fig/salt/
|
||||
$ docker-compose up -d
|
||||
$ docker exec -it salt_master_1 bash
|
||||
```
|
||||
|
||||
## salt-minion
|
||||
|
||||
```
|
||||
# create roster
|
||||
$ cat > /etc/salt/roster << _EOF_
|
||||
arch:
|
||||
host: 192.168.1.100
|
||||
user: root
|
||||
passwd: XcAreP36
|
||||
|
||||
debian:
|
||||
host: 192.168.1.101
|
||||
user: root
|
||||
passwd: 0Q4yEQw7
|
||||
|
||||
ubuntu:
|
||||
host: 192.168.1.102
|
||||
user: root
|
||||
passwd: pc2wW6Dv
|
||||
_EOF_
|
||||
|
||||
# deploy master key
|
||||
$ salt-ssh -i --passwd xxxxxx --key-deploy '*' test.ping
|
||||
|
||||
# install salt-minion
|
||||
$ salt-ssh '*' -r 'curl -L https://bootstrap.saltstack.com | sudo sh -s -- -A 192.168.1.1'
|
||||
|
||||
# list minion keys
|
||||
$ salt-key -L
|
||||
|
||||
# accept minion keys
|
||||
$ salt-key -y -A
|
||||
```
|
6
salt-master/docker-compose.yml
Normal file
6
salt-master/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
||||
master:
|
||||
image: vimagick/salt-master
|
||||
ports:
|
||||
- "4505:4505"
|
||||
- "4506:4506"
|
||||
restart: always
|
Loading…
Reference in New Issue
Block a user