summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/02-deploybundle.sh19
-rwxr-xr-xci/03-maasdeploy.sh26
-rwxr-xr-xci/cleanvm.sh4
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/ceph.yaml4
-rw-r--r--ci/config_tpl/juju2/deployconfig.yaml4
-rwxr-xr-xci/deploy.sh20
-rwxr-xr-xci/openstack.sh4
7 files changed, 59 insertions, 22 deletions
diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh
index 496707db..974d65ac 100755
--- a/ci/02-deploybundle.sh
+++ b/ci/02-deploybundle.sh
@@ -118,7 +118,7 @@ case "$opnfvlab" in
;;
esac
-# lets put the if seperateor as "," as this will save me from world.
+# lets put the if separator as "," as this will save me from world.
fea=""
IFS=","
for feature in $opnfvfeature; do
@@ -133,7 +133,7 @@ if [[ "$opnfvmodel" = "openstack" ]]; then
#update source if trusty is target distribution
var=os-$opnfvsdn-$fea-$opnfvtype"-"$opnfvdistro"_"$openstack
- if [ "$osdomname" != "None" ]; then
+ if ([ $osdomname ] && [ $osdomname != "null" ] && [ $osdomname != "None"]); then
var=$var"_"publicapi
fi
else
@@ -182,5 +182,20 @@ else
done
fi
+if [ "$opnfvsdn" = "ocl" ]
+then
+ ROLES="contrail-controller contrail-analytics contrail-analyticsdb"
+ TAG="ubuntu16.04-4.0.0.0-20.tar.gz"
+
+ for ROLE in $ROLES
+ do
+ FILE="${ROLE}-${TAG}"
+ if [ ! -f $FILE ]
+ then
+ curl -o $FILE http://artifacts.opnfv.org/ovno/containers/$FILE
+ fi
+ juju attach $ROLE ${ROLE}="./$FILE"
+done
+fi
#lets gather the status of deployment once juju-deployer completed.
juju status --format=tabular
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index 0207e89a..60ed0855 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -13,11 +13,15 @@ fi
NODE_ARCTYPE=`arch`
NODE_ARC="amd64/generic"
+NODE_ARCHES="amd64"
if [ "x86_64" == "$NODE_ARCTYPE" ]; then
NODE_ARC="amd64/generic"
elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then
NODE_ARC='ppc64el'
+elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ NODE_ARC="arm64/generic"
+ NODE_ARCHES="arm64"
else
NODE_ARC=$NODE_ARCTYPE
fi
@@ -96,8 +100,8 @@ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, i
MAAS_IP=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //')
MAAS_NAME=`grep "maas_name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
-API_SERVER="http://$MAAS_IP/MAAS/api/2.0"
-API_SERVERMAAS="http://$MAAS_IP/MAAS/"
+API_SERVER="http://$MAAS_IP:5240/MAAS/api/2.0"
+API_SERVERMAAS="http://$MAAS_IP:5240/MAAS/"
PROFILE=ubuntu
MY_UPSTREAM_DNS=`grep "upstream_dns" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
SSH_KEY=`cat ~/.ssh/id_rsa.pub`
@@ -211,7 +215,7 @@ installmaas(){
#
configuremaas(){
#reconfigure maas with correct MAAS address.
- #Below code is needed as MAAS have issue in commisoning without restart.
+ #Below code is needed as MAAS have issue in commissioning without restart.
#sudo ./maas-reconfigure-region.sh $MAAS_IP
sleep 30
sudo maas-rack config --region-url http://$MAAS_IP:5240/MAAS
@@ -243,6 +247,10 @@ configuremaas(){
maas $PROFILE boot-source update $SOURCE_ID \
url=$URL keyring_filename=$KEYRING_FILE || true
+ if [ $NODE_ARCTYPE != "x86_64" ] ; then
+ maas $PROFILE boot-source-selection update 1 1 arches="$NODE_ARCHES"
+ fi
+
maas $PROFILE boot-resources import || true
while [ "$(maas $PROFILE boot-resources is-importing)" == "true" ];
@@ -325,7 +333,7 @@ setupspacenetwork(){
fi
fi
if ([ $type == "admin" ]); then
- # If we have a network, we create it
+ # If we have a network, we create it
if ([ $NET_FABRIC_ID ]); then
# Set ranges
SUBNET_PREFIX=${SPACE_CIDR::-5}
@@ -403,10 +411,10 @@ addnodes(){
echo_info "Creating and adding bootstrap node"
- virt-install --connect $VIRSHURL --name bootstrap --ram 4098 --cpu host --vcpus 2 --video \
- cirrus --disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
+ virt-install --connect $VIRSHURL --name bootstrap --ram 4098 --cpu host --vcpus 2 \
+ --disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
$netw --boot network,hd,menu=off --noautoconsole \
- --vnc --print-xml | tee bootstrap
+ --print-xml | tee bootstrap
if [ "$virtinstall" -eq 1 ]; then
bootstrapmac=`grep "mac address" bootstrap | head -1 | cut -d '"' -f 2`
@@ -440,7 +448,7 @@ addnodes(){
virt-install --connect $VIRSHURL --name $NODE_NAME --ram 8192 --cpu host --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
- $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee $NODE_NAME
+ $netw $netw --boot network,hd,menu=off --noautoconsole --print-xml | tee $NODE_NAME
nodemac=`grep "mac address" $NODE_NAME | head -1 | cut -d '"' -f 2`
virsh -c $VIRSHURL define --file $NODE_NAME
@@ -471,6 +479,8 @@ addnodes(){
NODE_ARC="amd64/generic"
elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then
NODE_ARC='ppc64el'
+ elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ NODE_ARC="arm64/generic"
else
NODE_ARC=$NODE_ARCTYPE
fi
diff --git a/ci/cleanvm.sh b/ci/cleanvm.sh
index 5a5365b2..df069baf 100755
--- a/ci/cleanvm.sh
+++ b/ci/cleanvm.sh
@@ -5,7 +5,7 @@ set -x
echo " Cleanup Started ..."
#use the below commands if you needs to delete the virtual machine
-# also along with envuronment destroy.
+# also along with environment destroy.
./clean.sh
vm_list=$(sudo virsh list --all)
@@ -16,7 +16,7 @@ for vm in node1-control node2-compute node3-control node4-control \
do
echo "$vm_list" | grep -q " $vm " || continue
sudo virsh destroy $vm
- sudo virsh undefine $vm
+ sudo virsh undefine --nvram $vm
sudo rm -f /var/lib/libvirt/images/${vm}.qcow2
done
diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
index dc4e101b..6b20d986 100644
--- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
@@ -39,8 +39,8 @@
{% endfor %}
{% else %}
- "lxd:nodes/0"
- - "lxd:nodes/0"
- - "lxd:nodes/0"
+ - "lxd:nodes/1"
+ - "lxd:nodes/2"
{% endif %}
{% endif %}
ceph-osd:
diff --git a/ci/config_tpl/juju2/deployconfig.yaml b/ci/config_tpl/juju2/deployconfig.yaml
index 844ede6f..bc2e1277 100644
--- a/ci/config_tpl/juju2/deployconfig.yaml
+++ b/ci/config_tpl/juju2/deployconfig.yaml
@@ -15,12 +15,14 @@ opnfv:
{% set netdata_prefix = opnfv.spaces_dict.data.cidr[:-4] %}
dataNetwork: {{ opnfv.spaces_dict.data.cidr }}
{% endif %}
+{% if lab.racks[0].osdomainname is defined %}
domain: {{ lab.racks[0].osdomainname }}
+ os-domain-name: {{ lab.racks[0].osdomainname }}
+{% endif %}
ext-port: {{ lab.racks[0]['ext-port'] }}
ext_port: {{ lab.racks[0]['ext-port'] }}
floating-ip-range: {{ lab.racks[0]['floating-ip-range'] }}
interface-enable: {{ lab.racks[0].ifnamelist }}
- os-domain-name: {{ lab.racks[0].osdomainname }}
{% if opnfv.spaces_dict.public is defined %}
{% set netpublic_prefix = opnfv.spaces_dict.public.cidr[:-4] %}
publicNetwork: {{ opnfv.spaces_dict.public.cidr }}
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 8491ad45..15229e60 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -2,7 +2,7 @@
set -ex
-#need to put mutiple cases here where decide this bundle to deploy by default use the odl bundle.
+#need to put multiple cases here where decide this bundle to deploy by default use the odl bundle.
# Below parameters are the default and we can according the release
opnfvsdn=nosdn
@@ -14,6 +14,7 @@ opnfvfeature=none
opnfvdistro=xenial
opnfvarch=amd64
opnfvmodel=openstack
+virtinstall=0
jujuver=`juju --version`
@@ -33,9 +34,10 @@ usage() { echo "Usage: $0 [-s <nosdn|odl|opencontrail>]
[-d <trusty|xenial>]
[-a <amd64>]
[-m <openstack|kubernetes>]
+ [-i <0|1>]
[-r <a|b>]" 1>&2 exit 1; }
-while getopts ":s:t:o:l:h:r:f:d:a:m:" opt; do
+while getopts ":s:t:o:l:h:r:f:d:a:m:i:" opt; do
case "${opt}" in
s)
opnfvsdn=${OPTARG}
@@ -64,6 +66,9 @@ while getopts ":s:t:o:l:h:r:f:d:a:m:" opt; do
m)
opnfvmodel=${OPTARG}
;;
+ i)
+ virtinstall=${OPTARG}
+ ;;
h)
usage
;;
@@ -136,8 +141,8 @@ deploy() {
echo " MAAS not deployed please deploy MAAS first."
fi
fi
-#create json file which is missing in case of new deployment after maas and git tree cloned freshly.
+ #create json file which is missing in case of new deployment after maas and git tree cloned freshly.
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < labconfig.yaml > labconfig.json
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < deployconfig.yaml > deployconfig.json
@@ -179,7 +184,7 @@ check_status() {
retval=0
timeoutiter=0
- echo -n "executing the reltionship within charms ."
+ echo -n "executing the relationship within charms ."
while [ $retval -eq 0 ]; do
if juju status | grep -q $waitstatus; then
echo -n '.'
@@ -204,6 +209,11 @@ check_status() {
echo "...... deployment finishing ......."
}
+# In the case of a virtual deployment
+if [ "$virtinstall" -eq 1 ]; then
+ ./clean.sh || true
+fi
+
echo "...... deployment started ......"
deploy
@@ -245,7 +255,7 @@ echo "...... configure ......."
if ([ $opnfvmodel == "openstack" ]); then
./openstack.sh "$opnfvsdn" "$opnfvlab" "$opnfvdistro" "$openstack" || true
- # creating heat domain after puching the public API into /etc/hosts
+ # creating heat domain after pushing the public API into /etc/hosts
if [[ "$jujuver" > "2" ]]; then
status=`juju run-action heat/0 domain-setup`
echo $status
diff --git a/ci/openstack.sh b/ci/openstack.sh
index 3a9a7ebe..9020fd7c 100755
--- a/ci/openstack.sh
+++ b/ci/openstack.sh
@@ -150,7 +150,7 @@ export OS_AUTH_URL=$4
EOF
}
-if [ "$API_FQDN" != "None" ]; then
+if ([ $API_FQDN ] && [ $API_FQDN != "null" ] && [ $API_FQDN != "None"]); then
# Push api fqdn local ip to all /etc/hosts
if [[ "$jujuver" < "2" ]]; then
API_FQDN=$(juju get keystone | python -c "import yaml; import sys;\
@@ -170,7 +170,7 @@ if [ "$API_FQDN" != "None" ]; then
fi"
# remove this enhancement for heat that does not manage endpoints
- juju run --service=heat "cp /etc/hosts /tmp/hosts ; \
+ juju run --application=heat "cp /etc/hosts /tmp/hosts ; \
grep -v $API_FQDN /tmp/hosts > /etc/hosts"
#change in jumphost as well as below commands will run on jumphost