diff options
author | 2017-11-21 15:29:11 +0800 | |
---|---|---|
committer | 2018-01-19 14:39:32 +0800 | |
commit | 4956657410d57861f9157167a291aefc437d9218 (patch) | |
tree | d878afd06be85dc2d4e6f4cbb75f5ffbf40b7e33 /deploy/compass_vm.sh | |
parent | 522bce77aee6680a977fa7d0acac3d4091202377 (diff) |
Support multi-cluster deploy
JIRA: COMPASS-566
1. set DEPLOY_HOST to "true "no longer refresh
compass-core
2. patch depends on merged compass-tasks
3. support assign cluster name in scenario file
Change-Id: I28d201c201cff5baefee9993d195be16ef1e830b
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/compass_vm.sh')
-rwxr-xr-x | deploy/compass_vm.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh index 7689f41c..cf215f3b 100755 --- a/deploy/compass_vm.sh +++ b/deploy/compass_vm.sh @@ -10,6 +10,26 @@ compass_vm_dir=$WORK_DIR/vm/compass rsa_file=$compass_vm_dir/boot.rsa ssh_args="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $rsa_file" + +function check_container_alive() { + docker exec -it compass-deck bash -c "exit" 1>/dev/null 2>&1 + local deck_state=$? + docker exec -it compass-tasks bash -c "exit" 1>/dev/null 2>&1 + local tasks_state=$? + docker exec -it compass-cobbler bash -c "exit" 1>/dev/null 2>&1 + local cobbler_state=$? + docker exec -it compass-db bash -c "exit" 1>/dev/null 2>&1 + local db_state=$? + docker exec -it compass-mq bash -c "exit" 1>/dev/null 2>&1 + local mq_state=$? + + if [ $((deck_state||tasks_state||cobbler_state||db_state||mq-state)) == 0 ]; then + echo "true" + else + echo "false" + fi +} + function tear_down_compass() { sudo virsh destroy compass > /dev/null 2>&1 sudo virsh undefine compass > /dev/null 2>&1 |