aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_vm.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-12-27 21:23:33 +0800
committerbaigk <baiguoku@huawei.com>2015-12-28 06:45:58 +0000
commit0ccb2434dc7bbafa2d5e60ec5777dd03b00bc258 (patch)
tree0b8f8b92c5f2e95f20e9d67b82ba30f1592db22d /deploy/compass_vm.sh
parentc1f8ed8e836fb05eec5814e1a721352e64bc84d0 (diff)
support redeploy
JIRA: COMPASS-216 Change-Id: Ide78ac82c1615259eeb7093c7a4485fbe493c6d9 Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/compass_vm.sh')
-rw-r--r--deploy/compass_vm.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 71d9ad6c..5b94b603 100644
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -14,14 +14,26 @@ function tear_down_compass() {
}
function install_compass_core() {
+ install_compass "compass_nodocker.yml"
+}
+
+function set_compass_machine() {
+ local config_file=$WORK_DIR/installer/compass-install/install/group_vars/all
+
+ sed -i -e '/test: true/d' -e '/pxe_boot_macs/d' $config_file
+ echo "test: true" >> $config_file
+ echo "pxe_boot_macs: [${machines}]" >> $config_file
+
+ install_compass "compass_machine.yml"
+}
+
+function install_compass() {
local inventory_file=$compass_vm_dir/inventory.file
- log_info "install_compass_core enter"
sed -i "s/mgmt_next_ip:.*/mgmt_next_ip: ${COMPASS_SERVER}/g" $WORK_DIR/installer/compass-install/install/group_vars/all
echo "compass_nodocker ansible_ssh_host=$MGMT_IP ansible_ssh_port=22" > $inventory_file
- PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' python /usr/local/bin/ansible-playbook -e pipeline=true --private-key=$rsa_file --user=root --connection=ssh --inventory-file=$inventory_file $WORK_DIR/installer/compass-install/install/compass_nodocker.yml
+ PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' python /usr/local/bin/ansible-playbook -e pipeline=true --private-key=$rsa_file --user=root --connection=ssh --inventory-file=$inventory_file $WORK_DIR/installer/compass-install/install/$1
exit_status=$?
rm $inventory_file
- log_info "install_compass_core exit"
if [[ $exit_status != 0 ]];then
/bin/false
fi