-
Notifications
You must be signed in to change notification settings - Fork 12
/
kolla.sh
executable file
·29 lines (25 loc) · 894 Bytes
/
kolla.sh
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
#!/bin/bash
build () {
docker build -t shreddedbacon/kolla-ansible -f Dockerfile.kolla .
}
genpwd () {
docker run -v $(pwd)/kolla-ansible:/etc/kolla -it shreddedbacon/kolla-ansible cp /usr/local/share/kolla-ansible/etc_examples/kolla/passwords.yml /etc/kolla/passwords.yml
docker run -v $(pwd)/kolla-ansible:/etc/kolla -it shreddedbacon/kolla-ansible cp /usr/local/share/kolla-ansible/etc_examples/kolla/globals.yml /etc/kolla/globals.yml
docker run -v $(pwd)/kolla-ansible:/etc/kolla -it shreddedbacon/kolla-ansible kolla-genpwd
}
kolla_ansible () {
docker run \
-v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \
-e SSH_AUTH_SOCK=/ssh-agent \
-v $(pwd)/kolla-ansible:/etc/kolla \
-it shreddedbacon/kolla-ansible kolla-ansible -i multinode [email protected] $@
}
if [ "$1" == "genpwd" ]
then
genpwd
elif [ "$1" == "build" ]
then
build
else
kolla_ansible $@
fi