aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_vm.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-10-09 18:32:31 +0800
committerbaigk <baiguoku@huawei.com>2015-10-10 10:17:48 +0800
commit80c770bb093ad2af54171de1a2c4630536d4daf0 (patch)
tree693a483f4b4f02eb7dcd908691e2db67f7b6003c /deploy/compass_vm.sh
parent00aaaac786bcec0d2de7c14c4f3c5a89ba2553f5 (diff)
bugfix: libvirt_type should be kvm when host is barebetal mode
JIRA: COMPASS-81 Change-Id: Iba3cb182a3e461ab89eb40fdba7800b8b2a1fc3e Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/compass_vm.sh')
-rw-r--r--deploy/compass_vm.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index d3fec236..944c6cff 100644
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -63,7 +63,26 @@ function launch_compass() {
sudo umount $old_mnt
chmod 755 -R $new_mnt
- sed -i -e "s/REPLACE_MGMT_IP/$MGMT_IP/g" -e "s/REPLACE_MGMT_NETMASK/$MGMT_MASK/g" -e "s/REPLACE_INSTALL_IP/$COMPASS_SERVER/g" -e "s/REPLACE_INSTALL_NETMASK/$INSTALL_MASK/g" -e "s/REPLACE_GW/$MGMT_GW/g" $new_mnt/isolinux/isolinux.cfg
+
+ cp $COMPASS_DIR/util/isolinux.cfg $new_mnt/isolinux/ -f
+
+ sed -i -e "s/REPLACE_MGMT_IP/$MGMT_IP/g" \
+ -e "s/REPLACE_MGMT_NETMASK/$MGMT_MASK/g" \
+ -e "s/REPLACE_GW/$MGMT_GW/g" \
+ -e "s/REPLACE_INSTALL_IP/$COMPASS_SERVER/g" \
+ -e "s/REPLACE_INSTALL_NETMASK/$INSTALL_MASK/g" \
+ -e "s/REPLACE_COMPASS_EXTERNAL_NETMASK/$COMPASS_EXTERNAL_MASK/g" \
+ -e "s/REPLACE_COMPASS_EXTERNAL_IP/$COMPASS_EXTERNAL_IP/g" \
+ -e "s/REPLACE_COMPASS_EXTERNAL_GW/$COMPASS_EXTERNAL_GW/g" \
+ $new_mnt/isolinux/isolinux.cfg
+
+ if [[ -n $COMPASS_DNS1 ]]; then
+ sed -i -e "s/REPLACE_COMPASS_DNS1/$COMPASS_DNS1/g" $new_mnt/isolinux/isolinux.cfg
+ fi
+
+ if [[ -n $COMPASS_DNS2 ]]; then
+ sed -i -e "s/REPLACE_COMPASS_DNS2/$COMPASS_DNS2/g" $new_mnt/isolinux/isolinux.cfg
+ fi
ssh-keygen -f $new_mnt/bootstrap/boot.rsa -t rsa -N ''
cp $new_mnt/bootstrap/boot.rsa $rsa_file
@@ -82,6 +101,7 @@ function launch_compass() {
-e "s#REPLACE_ISO#$compass_vm_dir/centos.iso#g" \
-e "s/REPLACE_NET_MGMT/mgmt/g" \
-e "s/REPLACE_BRIDGE_INSTALL/br_install/g" \
+ -e "s/REPLACE_BRIDGE_EXTERNAL/br_external/g" \
$COMPASS_DIR/deploy/template/vm/compass.xml \
> $WORK_DIR/vm/compass/libvirt.xml