Change destination of snmp mibs files from
[apex.git] / ci / deploy.sh
index 482e134..f1a807f 100755 (executable)
@@ -24,11 +24,12 @@ green=$(tput setaf 2 || echo "")
 
 interactive="FALSE"
 ping_site="8.8.8.8"
+dnslookup_site="www.google.com"
 post_config="TRUE"
 debug="FALSE"
 
-ovs_rpm_name=openvswitch-2.5.90-1.el7.centos.x86_64.rpm
-ovs_kmod_rpm_name=openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm
+ovs_rpm_name=openvswitch-2.6.1-1.el7.centos.x86_64.rpm
+ovs_kmod_rpm_name=openvswitch-kmod-2.6.1-1.el7.centos.x86_64.rpm
 
 declare -i CNT
 declare UNDERCLOUD
@@ -39,10 +40,11 @@ declare -A NET_MAP
 APEX_TMP_DIR=$(python3 -c "import tempfile; print(tempfile.mkdtemp())")
 SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
 DEPLOY_OPTIONS=""
-CONFIG=${CONFIG:-'/var/opt/opnfv'}
-RESOURCES=${RESOURCES:-"$CONFIG/images"}
-LIB=${LIB:-"$CONFIG/lib"}
+BASE=${BASE:-'/var/opt/opnfv'}
+IMAGES=${IMAGES:-"$BASE/images"}
+LIB=${LIB:-"$BASE/lib"}
 OPNFV_NETWORK_TYPES="admin tenant external storage api"
+ENV_FILE="opnfv-environment.yaml"
 
 VM_CPUS=4
 VM_RAM=8
@@ -67,7 +69,6 @@ $LIB/undercloud-functions.sh
 $LIB/overcloud-deploy-functions.sh
 $LIB/post-install-functions.sh
 $LIB/utility-functions.sh
-$LIB/installer/onos/onos_gw_mac_update.sh
 )
 for lib_file in ${lib_files[@]}; do
   if ! source $lib_file; then
@@ -82,12 +83,15 @@ display_usage() {
   echo -e "   --inventory | -i : Full path to inventory yaml file. Required only for baremetal"
   echo -e "   --net-settings | -n : Full path to network settings file. Optional."
   echo -e "   --ping-site | -p : site to use to verify IP connectivity. Optional. Defaults to 8.8.8.8"
+  echo -e "   --dnslookup-site : site to use to verify DNS resolution. Optional. Defaults to www.google.com"
   echo -e "   --virtual | -v : Virtualize overcloud nodes instead of using baremetal."
   echo -e "   --no-post-config : disable Post Install configuration."
   echo -e "   --debug : enable debug output."
   echo -e "   --interactive : enable interactive deployment mode which requires user to confirm steps of deployment."
   echo -e "   --virtual-cpus : Number of CPUs to use per Overcloud VM in a virtual deployment (defaults to 4)."
-  echo -e "   --virtual-ram : Amount of RAM to use per Overcloud VM in GB (defaults to 8)."
+  echo -e "   --virtual-computes : Number of Virtual Compute nodes to create and use during deployment (defaults to 1 for noha and 2 for ha)."
+  echo -e "   --virtual-default-ram : Amount of default RAM to use per Overcloud VM in GB (defaults to 8)."
+  echo -e "   --virtual-compute-ram : Amount of RAM to use per Overcloud Compute VM in GB (defaults to 8). Overrides --virtual-default-ram arg for computes"
 }
 
 ##translates the command line parameters into variables
@@ -118,11 +122,21 @@ parse_cmdline() {
                 echo "Network Settings Configuration file: $2"
                 shift 2
             ;;
+        -e|--environment-file)
+                ENV_FILE=$2
+                echo "Base OOO Environment file: $2"
+                shift 2
+            ;;
         -p|--ping-site)
                 ping_site=$2
                 echo "Using $2 as the ping site"
                 shift 2
             ;;
+        --dnslookup-site)
+                dnslookup_site=$2
+                echo "Using $2 as the dnslookup site"
+                shift 2
+            ;;
         -v|--virtual)
                 virtual="TRUE"
                 echo "Executing a Virtual Deployment"
@@ -148,9 +162,9 @@ parse_cmdline() {
                 echo "Number of CPUs per VM set to $VM_CPUS"
                 shift 2
             ;;
-        --virtual-ram )
+        --virtual-default-ram )
                 VM_RAM=$2
-                echo "Amount of RAM per VM set to $VM_RAM"
+                echo "Amount of Default RAM per VM set to $VM_RAM"
                 shift 2
             ;;
         --virtual-computes )
@@ -158,6 +172,11 @@ parse_cmdline() {
                 echo "Virtual Compute nodes set to $VM_COMPUTES"
                 shift 2
             ;;
+        --virtual-compute-ram )
+                VM_COMPUTE_RAM=$2
+                echo "Virtual Compute RAM set to $VM_COMPUTE_RAM"
+                shift 2
+            ;;
         *)
                 display_usage
                 exit 1
@@ -232,14 +251,6 @@ main() {
       echo -e "${blue}INFO: Post Install Configuration Complete${reset}"
     fi
   fi
-  if [[ "${deploy_options_array['sdn_controller']}" == 'onos' ]]; then
-    if ! onos_update_gw_mac ${external_cidr} ${external_gateway}; then
-      echo -e "${red}ERROR:ONOS Post Install Configuration Failed, Exiting.${reset}"
-      exit 1
-    else
-      echo -e "${blue}INFO: ONOS Post Install Configuration Complete${reset}"
-    fi
-  fi
 }
 
 main "$@"