summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/clean.sh12
-rwxr-xr-xci/deploy.sh21
2 files changed, 24 insertions, 9 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index d9a02e43..7fad2ef1 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -5,13 +5,13 @@
#
#Uses Vagrant and VirtualBox
#
+vm_index=4
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_0 --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_1 --remove-all-storage 2> /dev/null || echo -n ''
rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null
-rm -f /var/lib/libvirt/images/baremetalbrbm_0.qcow2 2> /dev/null
-rm -f /var/lib/libvirt/images/baremetalbrbm_1.qcow2 2> /dev/null
+for i in $(seq 0 vm_index); do
+ virsh destroy baremetalbrbm_$i 2> /dev/null || echo -n ''
+ virsh undefine baremetalbrbm_$i --remove-all-storage 2> /dev/null || echo -n ''
+ rm -f /var/lib/libvirt/images/baremetalbrbm_${i}.qcow2 2> /dev/null
+done
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 482c1bff..c707e73d 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -24,7 +24,7 @@ set -e
#red=`tput setaf 1`
#green=`tput setaf 2`
-vm_index=1
+vm_index=4
declare -i CNT
declare UNDERCLOUD
@@ -168,9 +168,14 @@ function setup_instack_vm {
ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "restorecon -r /home/stack"
}
+##Create virtual nodes in virsh
+##params: none
function setup_virtual_baremetal {
for i in $(seq 0 $vm_index); do
if ! virsh list --all | grep baremetalbrbm_${i} > /dev/null; then
+ if [ ! -e $CONFIG/baremetalbrbm_${i}.xml ]; then
+ define_virtual_node baremetalbrbm_${i}
+ fi
virsh define $CONFIG/baremetalbrbm_${i}.xml
else
echo "Found Baremetal ${i} VM, using existing VM"
@@ -180,7 +185,7 @@ function setup_virtual_baremetal {
}
##Copy over the glance images and instack json file
-##params: none
+##params: none
function copy_materials {
scp ${SSH_OPTIONS[@]} $RESOURCES/deploy-ramdisk-ironic.initramfs "stack@$UNDERCLOUD":
@@ -232,8 +237,14 @@ ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "cat /home/stack/.ssh/id_rsa.pub" >>
}
##preping it for deployment and launch the deploy
-##params: none
+##params: none
function undercloud_prep_overcloud_deploy {
+ # check if HA is enabled
+ if [ "$vm_index" -gt 1 ]; then
+ DEPLOY_OPTIONS+=" --control-scale 3 --compute-scale 2"
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml"
+ DEPLOY_OPTIONS+=" --ntp-server pool.ntp.org"
+ fi
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
source stackrc
@@ -302,6 +313,10 @@ parse_cmdline() {
floating_ip_count=$2
shift 2
;;
+ -n|--no_ha )
+ vm_index=1
+ shift 1
+ ;;
*)
display_usage
exit 1