summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-05-24 20:26:03 -0400
committerDan Radez <dradez@redhat.com>2016-05-27 11:48:52 -0400
commit0fe6416c69128ba37c2598559a44ff8a30aefee2 (patch)
tree3acde6835c6b27df78e08a073c5b51a69020567c /ci/deploy.sh
parentdd0329db043514ea9f89630060712323a773f73a (diff)
adding control of number of virtual compute nodes
JIRA: APEX-86 Change-Id: Iae2f34337479ad0a399eecc46459f5afea938d57 Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 6b38c336..a3b17baf 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -22,7 +22,6 @@ blue=$(tput setaf 4 || echo "")
red=$(tput setaf 1 || echo "")
green=$(tput setaf 2 || echo "")
-vm_index=4
interactive="FALSE"
ping_site="8.8.8.8"
ntp_server="pool.ntp.org"
@@ -43,6 +42,8 @@ CONFIG=${CONFIG:-'/var/opt/opnfv'}
OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network"
VM_CPUS=4
VM_RAM=8
+VM_COMPUTES=2
+
# Netmap used to map networks to OVS bridge names
NET_MAP['admin_network']="br-admin"
NET_MAP['private_network']="br-private"
@@ -494,6 +495,16 @@ function setup_virtual_baremetal {
EOF
# next create the virtual machines and add their definitions to the file
+ if [ ha_enabled != "FALSE" && "$ha_enabled" != "false" ]; then
+ # 1 controller + computes
+ # zero based so just pass compute count
+ vm_index=$VM_COMPUTES
+ else
+ # 3 controller + computes
+ # zero based so add 2 to compute count
+ vm_index=$((2+$VM_COMPUTES))
+ fi
+
for i in $(seq 0 $vm_index); do
if ! virsh list --all | grep baremetal${i} > /dev/null; then
define_vm baremetal${i} network 41 'admin_network' $vcpus $ramsize
@@ -1109,7 +1120,6 @@ parse_cmdline() {
;;
--no-ha )
ha_enabled="False"
- vm_index=1
echo "HA Deployment Disabled"
shift 1
;;
@@ -1143,6 +1153,11 @@ parse_cmdline() {
echo "Amount of RAM per VM set to $VM_RAM"
shift 2
;;
+ --virtual-computes )
+ VM_COMPUTES=$2
+ echo "Virtual Compute nodes set to $VM_COMPUTES"
+ shift 2
+ ;;
*)
display_usage
exit 1