diff options
Diffstat (limited to 'deploy/deploy_host.sh')
-rwxr-xr-x | deploy/deploy_host.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh index 7173e3e3..9617b241 100755 --- a/deploy/deploy_host.sh +++ b/deploy/deploy_host.sh @@ -1,13 +1,25 @@ #!/bin/bash +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## rsa_file=$compass_vm_dir/boot.rsa + +function rename_nics(){ + python $COMPASS_DIR/deploy/rename_nics.py $DHA $rsa_file $MGMT_IP +} + function deploy_host(){ ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks scp $ssh_args -r ${COMPASS_DIR}/deploy/status_callback.py root@${MGMT_IP}:/opt/compass/bin/ansible_callbacks/status_callback.py # avoid nodes reboot to fast, cobbler can not give response - (sleep 20;reboot_hosts) & - + (sleep 20; rename_nics; reboot_hosts) & if [[ "$REDEPLOY_HOST" == true ]]; then deploy_flag="redeploy" else |