summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-05-31 12:21:17 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-31 12:21:17 +0000
commit079f0d3bc65ea1289c3c46b1881f8693810a5cd9 (patch)
tree7d57ababd5d050bedfe4359a528658aff190cc1b /ci
parent0c42080ac45da4ee0688198b2e9150e7687ffc85 (diff)
parent0fe6416c69128ba37c2598559a44ff8a30aefee2 (diff)
Merge "adding control of number of virtual compute nodes"
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 639fd0f6..b99a5693 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"
@@ -45,6 +44,8 @@ OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_networ
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"
@@ -501,6 +502,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
@@ -1104,7 +1115,6 @@ parse_cmdline() {
;;
--no-ha )
ha_enabled="False"
- vm_index=1
echo "HA Deployment Disabled"
shift 1
;;
@@ -1138,6 +1148,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