-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mofile
47 lines (42 loc) · 1.47 KB
/
Mofile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
tasks:
bootstrap:
steps:
- pipenv install
- pipenv run pip list
- docker pull chhibber/saltstack:v2017.7.2-minion-ubuntu1604
- docker pull chhibber/saltstack:v2017.7.2-master-ubuntu1604
up:
description: Stands up a salt master and a couple salt minion via docker-compose
steps:
- docker-compose up -d
- sleep 20
- docker ps | grep salt
- docker exec saltstackdocker_master_1 salt "*" state.highstate
- sleep 5
after:
- down
- bootstrap
down:
description: Shutdown the salt cluster
steps:
- docker-compose down
build-docker-images:
description: Build all our docker images and push to repo
steps:
- docker build -t chhibber/saltstack:v2017.7.2-minion-ubuntu1604 docker/salt-minion
- docker build -t chhibber/saltstack:v2017.7.2-master-ubuntu1604 docker/salt-master
- docker push chhibber/saltstack:v2017.7.2-master-ubuntu1604
- docker push chhibber/saltstack:v2017.7.2-minion-ubuntu1604
test:
steps:
- pipenv run py.test --verbose test/test.py --connection=docker --hosts saltstackdocker_minion1_1,saltstackdocker_minion2_1
example-run:
description: Run through salt changes and verification
steps:
- bash build/example-run.sh
- pipenv run py.test --verbose test/test-change.py --connection=docker --hosts saltstackdocker_minion1_1,saltstackdocker_minion2_1
after:
- down
- boostrap
- up
- test