diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-06-13 15:01:18 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-06-13 15:01:18 +0300 |
commit | 83b3574f3abf2c367a7a687867273e6259975ce6 (patch) | |
tree | bf963ee59b71a10d0a187b8e1ff8e36ecb1acbe1 /run-cluster.sh | |
parent | 363fbccdbe5e9e6774f9a949cc1d8670d6287c48 (diff) | |
download | ick2-ansible-83b3574f3abf2c367a7a687867273e6259975ce6.tar.gz |
Change: update stuff for deploying working ick instances
Diffstat (limited to 'run-cluster.sh')
-rwxr-xr-x | run-cluster.sh | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/run-cluster.sh b/run-cluster.sh index 8311fb7..4c987ab 100755 --- a/run-cluster.sh +++ b/run-cluster.sh @@ -3,26 +3,36 @@ set -eu -hosts_in="$1" -shift 1 - - -getip() +getaddr() { - awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" + awk -v "name=$1" '$1 == name { print $2 }' "$hosts_in" | + sed 's/ansible_ssh_host=//' } mkhosts() { cat <<EOF -[ick] -qvisqve hostname=controller ansible_ssh_host=$(getip qvisqve) -controller hostname=controller ansible_ssh_host=$(getip controller) -artifacts hostname=blob_service ansible_ssh_host=$(getip artifacts) -apt hostname=apt ansible_ssh_host=$(getip apt) -worker1 hostname=worker1 ansible_ssh_host=$(getip worker1) -worker2 hostname=worker2 ansible_ssh_host=$(getip worker2) +ick ansible_ssh_host=$(getaddr controller) +worker1 hostname=worker1 ansible_ssh_host=$(getaddr worker1) +worker2 hostname=worker2 ansible_ssh_host=$(getaddr worker2) + +[ickhost] +ick +worker1 +worker2 + +[controller] +ick + +[qvisqve] +ick + +[apt] +ick + +[notify] +ick [workers] worker1 @@ -30,10 +40,13 @@ worker2 EOF } +hosts_in="$1" +shift 1 mkhosts > hosts.tmp ansible-playbook -i hosts.tmp ick-cluster.yml \ - -e "qvisqve_domain=$(getip qvisqve)" \ - -e "controller_domain=$(getip controller)" \ - -e "artifact_store_domain=$(getip artifacts)" \ - -e "apt_domain=$(getip apt)" \ + -e "qvisqve_domain=$(getaddr controller)" \ + -e "controller_domain=$(getaddr controller)" \ + -e "artifact_store_domain=$(getaddr controller)" \ + -e "apt_domain=$(getaddr controller)" \ + -e "notify_domain=$(getaddr controller)" \ "$@" |