Merge "Auto Generated INFO.yaml file"
[joid.git] / ci / deploy.sh
index a061f0e..3bbddb6 100755 (executable)
@@ -9,7 +9,7 @@ source common/tools.sh
 
 opnfvsdn=nosdn
 opnfvtype=noha
-openstack=ocata
+openstack=queens
 opnfvlab=default
 opnfvlabfile=
 opnfvrel=e
@@ -21,11 +21,11 @@ virtinstall=0
 maasinstall=0
 
 usage() { echo "Usage: $0
-    [-s|--sdn <nosdn|odl|opencontrail>]
+    [-s|--sdn <nosdn|odl|ocl>]
     [-t|--type <noha|ha|tip>]
-    [-o|--openstack <ocata>]
+    [-o|--openstack <ocata|queens>]
     [-l|--lab <default|custom>]
-    [-f|--feature <ipv6,dpdk,lxd,dvr,openbaton>]
+    [-f|--feature <ipv6,dpdk,lxd,dvr,openbaton,multus>]
     [-d|--distro <xenial>]
     [-a|--arch <amd64|ppc64el|aarch64>]
     [-m|--model <openstack|kubernetes>]
@@ -90,7 +90,7 @@ for argument in $options
 
             -d|--distro )
                 if ([ "arguments[index]" != "" ]); then
-                    opnfdistro=${arguments[index]}
+                    opnfvdistro=${arguments[index]}
                 fi;
                 ;;
 
@@ -261,9 +261,10 @@ deploy() {
     fi
 
     #bootstrap the node
-    ./01-bootstrap.sh
+    ./01-bootstrap.sh $opnfvdistro
 
     juju model-config default-series=$opnfvdistro enable-os-refresh-update=false enable-os-upgrade=false
+    juju set-model-constraints tags=
 
     # case default deploy the opnfv platform:
     ./02-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro $opnfvmodel
@@ -320,6 +321,7 @@ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, i
 
 # Configuring deployment
 if ([ $opnfvmodel == "openstack" ]); then
+
     echo_info "Configuring OpenStack deployment"
 
     ./openstack.sh "$opnfvsdn" "$opnfvlab" "$opnfvdistro" "$openstack" || true
@@ -327,6 +329,24 @@ if ([ $opnfvmodel == "openstack" ]); then
     # creating heat domain after pushing the public API into /etc/hosts
     status=`juju run-action heat/0 domain-setup`
     echo $status
+    if  ([ $opnfvsdn != "ocl" ]) then
+      status=`juju run-action ceilometer/0 ceilometer-upgrade`
+    fi
+    echo $status
+    if ([ $opnftype == "ha" ]); then
+        status=`juju run-action heat/1 domain-setup`
+        echo $status
+        if  ([ $opnfvsdn != "ocl" ]) then
+          status=`juju run-action ceilometer/1 ceilometer-upgrade`
+        fi
+        echo $status
+        status=`juju run-action heat/2 domain-setup`
+        echo $status
+        if  ([ $opnfvsdn != "ocl" ]) then
+          status=`juju run-action ceilometer/2 ceilometer-upgrade`
+        fi
+        echo $status
+    fi
 
     sudo ../juju/get-cloud-images || true
     ../juju/joid-configure-openstack || true
@@ -341,7 +361,7 @@ elif ([ $opnfvmodel == "kubernetes" ]); then
     check_status executing 50
     echo_info "Configuring Kubernetes deployment"
 
-    ./k8.sh
+    ./k8.sh $opnfvfeature
 fi
 
 # expose the juju gui-url to login into juju gui