diff options
-rwxr-xr-x | ci/deploy.sh | 19 |
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 |