summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
l---------ci/00-maasdeploy.sh1
-rwxr-xr-xci/01-bootstrap.sh21
-rwxr-xr-xci/02-deploybundle.sh28
-rwxr-xr-xci/03-maasdeploy.sh196
-rwxr-xr-xci/clean.sh62
-rwxr-xr-xci/cleanmaas.sh11
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/ceph.yaml14
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/keystone.yaml2
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml3
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml6
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/canal.yaml8
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/ceph.yaml35
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/relations.yaml9
-rw-r--r--ci/config_tpl/juju2/bundlek8_tpl/spaces.yaml23
-rw-r--r--ci/default_deployment_config.yaml5
-rw-r--r--ci/depMAAS.py9
-rwxr-xr-xci/deploy.sh32
-rw-r--r--ci/genBundle.py8
-rw-r--r--ci/genDeploymentConfig.py9
-rw-r--r--ci/genK8Bundle.py5
-rw-r--r--ci/genMAASConfig.py9
-rwxr-xr-xci/kubernetes/fetch-charms.sh5
-rwxr-xr-xci/nosdn/fetch-charms.sh42
-rwxr-xr-xci/odl/fetch-charms.sh48
-rwxr-xr-xci/onos/fetch-charms.sh38
-rwxr-xr-xci/opencontrail/fetch-charms.sh2
-rwxr-xr-xci/openstack.sh55
27 files changed, 355 insertions, 331 deletions
diff --git a/ci/00-maasdeploy.sh b/ci/00-maasdeploy.sh
deleted file mode 120000
index 33b6f4dd..00000000
--- a/ci/00-maasdeploy.sh
+++ /dev/null
@@ -1 +0,0 @@
-03-maasdeploy.sh \ No newline at end of file
diff --git a/ci/01-bootstrap.sh b/ci/01-bootstrap.sh
index 88f87dd5..e45c2ee0 100755
--- a/ci/01-bootstrap.sh
+++ b/ci/01-bootstrap.sh
@@ -2,21 +2,6 @@
set -ex
-#export JUJU_DEV_FEATURE_FLAGS=address-allocation
-
-jujuver=`juju --version`
-
-if [[ "$jujuver" < "2" ]]; then
- juju bootstrap --debug --to bootstrap.maas --agent-version 1.25.5
- sleep 5
- #disable juju gui until xenial charms are in charm store.
- juju deploy cs:juju-gui-130 --to 0
-
- JUJU_REPOSITORY=
- juju set-constraints tags=
-
-else
- controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- juju bootstrap $controllername $cloudname --debug --to bootstrap.maas
-fi
+controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
+cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
+juju bootstrap $controllername $cloudname --debug --to bootstrap.maas
diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh
index 5a72445e..df669a88 100755
--- a/ci/02-deploybundle.sh
+++ b/ci/02-deploybundle.sh
@@ -12,9 +12,6 @@ opnfvfeature=$5
opnfvdistro=$6
opnfvmodel=$7
-jujuver=`juju --version`
-maasver=`apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/ //'`
-
if [[ "$opnfvmodel" = "openstack" ]]; then
#copy and download charms
./$opnfvsdn/fetch-charms.sh $opnfvdistro
@@ -54,19 +51,10 @@ check_status() {
PROFILE=maas
MAAS_IP=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //')
API_SERVERMAAS="http://$MAAS_IP:5240/MAAS/"
-if [[ "$maasver" > "2" ]]; then
- API_KEY=`sudo maas-region apikey --username=ubuntu || true`
-else
- API_KEY=`sudo maas-region-admin apikey --username=ubuntu || true`
-fi
-
+API_KEY=`sudo maas-region apikey --username=ubuntu || true`
if [[ "$API_KEY" = "" ]]; then
- if [[ "$maasver" > "2" ]]; then
- API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region apikey --username=ubuntu'`
- else
- API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region-admin apikey --username=ubuntu'`
- fi
+ API_KEY=`sshpass -p ubuntu ssh ubuntu@$MAAS_IP 'sudo maas-region apikey --username=ubuntu'`
fi
maas login $PROFILE $API_SERVERMAAS $API_KEY
@@ -75,16 +63,12 @@ if [[ "$opnfvmodel" = "openstack" ]]; then
if [ -e ./deployconfig.yaml ]; then
extport=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
- admnet=`grep "admNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
cephdisk=`grep "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
+ admnet=`grep "admNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
fi
- if [[ "$maasver" > "2" ]]; then
- workmutiple=`maas maas nodes read | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
- else
- workmutiple=`maas maas nodes list | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
- fi
+ workmutiple=`maas maas nodes read | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '`
max=0
for v in ${workmutiple[@]}; do
if (( $v > $max )); then max=$v; fi;
@@ -107,6 +91,8 @@ if [[ "$opnfvmodel" = "openstack" ]]; then
else
sed -i "s/cpu_pin_set: all/cpu_pin_set: 1/g" default_deployment_config.yaml
fi
+else
+ cephdisk=`grep "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
fi
case "$opnfvlab" in
@@ -170,7 +156,7 @@ openfile_fix() {
if [ "$opnfvsdn" = "ocl" ]
then
- TAG="ubuntu16.04-4.0.1.0-32.tar.gz"
+ TAG="ubuntu16.04-4.0.2.0-34.tar.gz"
for ROLE in contrail-controller contrail-analytics contrail-analyticsdb
do
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index bc0c2cbb..27a72a40 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -21,9 +21,16 @@ then
usage;
fi
-
virtinstall=0
labname=$1
+snapinstall=0
+
+opnfvdistro=`cat /etc/lsb-release | grep CODENAME | cut -d "=" -f 2`
+
+if [ "bionic" == "$opnfvdistro" ]; then
+ snapinstall=1
+fi
+
if [ ! -e $HOME/.ssh/id_rsa ]; then
ssh-keygen -N '' -f $HOME/.ssh/id_rsa
@@ -45,26 +52,45 @@ NODE_ARC="$NODE_ARCHES/generic"
# Install the packages needed
echo_info "Installing and upgrading required packages"
-sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
-sudo apt-get update -y
+#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
+sudo apt-get update -y || true
sudo apt-get install software-properties-common -y
-sudo apt-add-repository ppa:juju/stable -y
-sudo apt-add-repository ppa:maas/stable -y
-sudo apt-add-repository cloud-archive:ocata -y
-sudo apt-get update -y
+
+if [ "$snapinstall" -eq "0" ]; then
+ sudo apt-add-repository ppa:juju/stable -y
+ sudo apt-add-repository ppa:maas/stable -y
+fi
+if [ "bionic" != "$opnfvdistro" ]; then
+ sudo apt-add-repository cloud-archive:pike -y
+ if [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ sudo add-apt-repository ppa:ubuntu-cloud-archive/pike-staging -y
+ fi
+fi
+
+sudo apt-get update -y || true
#sudo apt-get dist-upgrade -y
-sudo apt-get install bridge-utils openssh-server bzr git virtinst qemu-kvm libvirt-bin \
+
+if [ "$snapinstall" -eq "1" ]; then
+ sudo apt-get install bridge-utils openssh-server bzr git virtinst qemu-kvm libvirt-bin \
+ maas maas-region-controller juju python-pip python-psutil python-openstackclient \
+ python-congressclient gsutil pastebinit python-jinja2 sshpass \
+ openssh-server vlan ipmitool jq expect snap -y --allow-unauthenticated
+ sudo service ntp stop
+ sudo snap install charm
+ sudo snap install --devmode --stable maas
+else
+ sudo apt-get install bridge-utils openssh-server bzr git virtinst qemu-kvm libvirt-bin \
maas maas-region-controller juju python-pip python-psutil python-openstackclient \
python-congressclient gsutil charm-tools pastebinit python-jinja2 sshpass \
- openssh-server vlan ipmitool jq expect snap -y
+ openssh-server vlan ipmitool jq expect snap -y --allow-unauthenticated
+fi
-#sudo apt-get install snap -y
-#sudo snap install maas --classic
-#sudo snap install juju --classic
+if [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ sudo apt-get install qemu qemu-efi qemu-system-aarch64 -y --allow-unauthenticated
+fi
sudo -H pip install --upgrade pip
-
#
# Config preparation
#
@@ -137,9 +163,7 @@ PRIMARY_RACK_CONTROLLER="$MAAS_IP"
VLAN_UNTTAGED="untagged"
# In the case of a virtual deployment get deployconfig.yaml
-if [ "$virtinstall" -eq 1 ]; then
- ./cleanvm.sh || true
-fi
+./cleanvm.sh || true
#create backup directory
mkdir ~/joid_config/ || true
@@ -206,31 +230,46 @@ if [ $(pip list --format=columns | grep google-api-python-client | wc -l) == 1 ]
sudo pip uninstall google-api-python-client
fi
-
-if [ ! -e ~maas/.ssh/id_rsa.pub ]; then
- if [ ! -e $HOME/id_rsa_maas.pub ]; then
- [ -e $HOME/id_rsa_maas ] && rm -f $HOME/id_rsa_maas
- sudo su - $USER -c "echo |ssh-keygen -t rsa -f $HOME/id_rsa_maas"
+if [ "$snapinstall" -eq "0" ]; then
+ if [ ! -e ~maas/.ssh/id_rsa.pub ]; then
+ if [ ! -e $HOME/id_rsa_maas.pub ]; then
+ [ -e $HOME/id_rsa_maas ] && rm -f $HOME/id_rsa_maas
+ sudo su - $USER -c "echo |ssh-keygen -t rsa -f $HOME/id_rsa_maas"
+ fi
+ sudo -u maas mkdir ~maas/.ssh/ || true
+ sudo cp $HOME/id_rsa_maas ~maas/.ssh/id_rsa
+ sudo cp $HOME/id_rsa_maas.pub ~maas/.ssh/id_rsa.pub
+ sudo chown maas:maas ~maas/.ssh/id_rsa
+ sudo chown maas:maas ~maas/.ssh/id_rsa.pub
+ sudo cat ~maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
+ fi
+else
+ if [ ! -e /root/.ssh/id_rsa.pub ]; then
+ if [ ! -e $HOME/id_rsa_maas.pub ]; then
+ [ -e $HOME/id_rsa_maas ] && rm -f $HOME/id_rsa_maas
+ sudo su - $USER -c "echo |ssh-keygen -t rsa -f $HOME/id_rsa_maas"
+ fi
+ sudo -u root mkdir /root/.ssh/ || true
+ sudo cp $HOME/id_rsa_maas /root/.ssh/id_rsa
+ sudo cp $HOME/id_rsa_maas.pub /root/.ssh/id_rsa.pub
+ sudo chown root:root /root/.ssh/id_rsa
+ sudo chown root:root /root/.ssh/id_rsa.pub
+ sudo cat /root/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
fi
- sudo -u maas mkdir ~maas/.ssh/ || true
- sudo cp $HOME/id_rsa_maas ~maas/.ssh/id_rsa
- sudo cp $HOME/id_rsa_maas.pub ~maas/.ssh/id_rsa.pub
- sudo chown maas:maas ~maas/.ssh/id_rsa
- sudo chown maas:maas ~maas/.ssh/id_rsa.pub
fi
# Ensure virsh can connect without ssh auth
-sudo cat ~maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
sudo cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
-#
-# MAAS deploy
-#
-
-installmaas(){
- sudo apt-get install maas maas-region-controller -y
-}
-
+if [ "$snapinstall" -eq "1" ]; then
+ sudo maas init --mode all --maas-url http://$MAAS_IP:5240/MAAS --admin-username $PROFILE \
+ --admin-password $PROFILE --admin-email ubuntu@ubuntu.com || true
+ API_KEY=`sudo maas apikey --username=$PROFILE`
+else
+ sudo maas-rack config --region-url http://$MAAS_IP:5240/MAAS
+ sudo maas createadmin --username=$PROFILE --email=ubuntu@ubuntu.com --password=$PROFILE || true
+ API_KEY=`sudo maas-region apikey --username=$PROFILE`
+fi
#
# MAAS config
# https://insights.ubuntu.com/2016/01/23/maas-setup-deploying-openstack-on-maas-1-9-with-juju/
@@ -238,13 +277,6 @@ installmaas(){
#
configuremaas(){
#reconfigure maas with correct MAAS address.
- #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
-
- sudo maas createadmin --username=ubuntu --email=ubuntu@ubuntu.com --password=ubuntu || true
- API_KEY=`sudo maas-region apikey --username=ubuntu`
maas login $PROFILE $API_SERVERMAAS $API_KEY
maas $PROFILE maas set-config name='main_archive' value=$MAIN_ARCHIVE || true
maas $PROFILE maas set-config name=upstream_dns value=$MY_UPSTREAM_DNS || true
@@ -257,6 +289,14 @@ configuremaas(){
maas $PROFILE tags create name=$tag || true
done
+ #below tag would be used to enable huge pages for DPDK and SRIOV enablement in Ubuntu kernel via MAAS
+ maas $PROFILE tags create name='opnfv-dpdk' comment='OPNFV DPDK enablement' \
+ kernel_opts='hugepagesz=2M hugepages=1024 hugepagesz=1G hugepages=20 default_hugepagesz=1G intel_iommu=on' || true
+
+ maas $PROFILE package-repositories create name="Ubuntu Proposed new" \
+ url="http://archive.ubuntu.com/ubuntu" components="main" \
+ distributions="xenial-proposed" arches=amd64,i386
+
#create the required spaces.
maas $PROFILE space update 0 name=default || true
for space in admin-api internal-api public-api \
@@ -274,7 +314,9 @@ configuremaas(){
maas $PROFILE boot-source-selection update 1 1 arches="$NODE_ARCHES"
fi
- maas $PROFILE boot-resources import || true
+ if [ "$snapinstall" -eq "0" ]; then
+ maas $PROFILE boot-resources import || true
+ fi
while [ "$(maas $PROFILE boot-resources is-importing)" == "true" ];
do
@@ -283,7 +325,6 @@ configuremaas(){
}
setupspacenetwork(){
-
#get space, subnet and vlan and create accordingly.
#for type in admin osapi data storage external floating public; do
nettypes=`cat labconfig.json | jq '.opnfv.spaces[]'.type | cut -d \" -f 2`
@@ -302,7 +343,7 @@ setupspacenetwork(){
NET_VLAN_ID=$(maas $PROFILE vlans read $NET_FABRIC_ID | jq -r ".[] | select(.vid==\"$SPACE_VLAN\")".id)
NET_VLAN_VID=$(maas $PROFILE vlans read $NET_FABRIC_ID | jq -r ".[] | select(.vid==\"$SPACE_VLAN\")".vid)
if ([ $SPACE_GWAY ] && [ "$SPACE_GWAY" != "null" ]); then
- maas $PROFILE subnet update $SPACE_CIDR gateway_ip=$SPACE_GWAY
+ maas $PROFILE subnet update $SPACE_CIDR gateway_ip=$SPACE_GWAY || true
fi
if ([ $NET_VLAN_VID ] && [ $NET_VLAN_VID == "0" ]); then
config_done=1
@@ -311,7 +352,7 @@ setupspacenetwork(){
else
NET_VLAN_ID=$(maas $PROFILE vlans create $NET_FABRIC_ID vid=$SPACE_VLAN | jq --raw-output ".id")
if ([ $NET_VLAN_ID ] && [ $NET_VLAN_ID != "null" ]); then
- maas $PROFILE subnet update $SPACE_CIDR vlan=$NET_VLAN_ID
+ maas $PROFILE subnet update $SPACE_CIDR vlan=$NET_VLAN_ID || true
NET_FABRIC_VID=$SPACE_VLAN
fi
fi
@@ -323,16 +364,16 @@ setupspacenetwork(){
if ([ $SPACE_VLAN ] && [ "$SPACE_VLAN" != "null" ]); then
NET_VLAN_ID=$(maas $PROFILE vlans create $FABRIC_ID vid=$SPACE_VLAN | jq --raw-output ".id")
if ([ $SPACE_GWAY ] && [ "$SPACE_GWAY" != "null" ]); then
- maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid=$VID_ID gateway_ip=$SPACE_GWAY
+ maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid=$VID_ID gateway_ip=$SPACE_GWAY || true
else
- maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid=$VID_ID
+ maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid=$VID_ID || true
fi
NET_FABRIC_VID=$VLAN_ID
else
if ([ $SPACE_GWAY ] && [ "$SPACE_GWAY" != "null" ]); then
- maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid="0" gateway_ip=$SPACE_GWAY
+ maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid="0" gateway_ip=$SPACE_GWAY || true
else
- maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid="0"
+ maas $PROFILE subnets create fabric=$FABRIC_ID cidr=$SPACE_CIDR vid="0" || true
fi
fi
NET_FABRIC_NAME=$(maas $PROFILE subnets read | jq -r ".[] | select(.cidr==\"$SPACE_CIDR\")".vlan.fabric)
@@ -353,7 +394,7 @@ setupspacenetwork(){
NET_FABRIC_ID=$(maas $PROFILE fabric read $NET_FABRIC_NAME | jq -r ".id")
if ([ $NET_FABRIC_ID ] && [ $NET_FABRIC_ID != "null" ]); then
if ([ $JUJU_VLAN_VID ] && [ $JUJU_VLAN_VID != "null" ]); then
- maas $PROFILE vlan update $NET_FABRIC_ID $JUJU_VLAN_VID space=$JUJU_SPACE_ID
+ maas $PROFILE vlan update $NET_FABRIC_ID $JUJU_VLAN_VID space=$JUJU_SPACE_ID || true
fi
fi
if ([ $type == "admin" ]); then
@@ -375,14 +416,36 @@ setupspacenetwork(){
PRIMARY_RACK_CONTROLLER=$(maas $PROFILE rack-controllers read | jq -r '.[0].system_id')
maas $PROFILE vlan update $NET_FABRIC_ID $NET_FABRIC_VID dhcp_on=True primary_rack=$PRIMARY_RACK_CONTROLLER || true
fi
+ elif ([ $type == "public" ] || [ $type == "osapi" ]); then
+ # If we have a network, we create reserve IPS for public IP range
+ if ([ $NET_FABRIC_ID ]); then
+ # Set ranges
+ SUBNET_PREFIX=${SPACE_CIDR::-5}
+ IP_RES_RANGE_LOW="$SUBNET_PREFIX.1"
+ IP_RES_RANGE_HIGH="$SUBNET_PREFIX.39"
+ maas $PROFILE ipranges create type=reserved \
+ start_ip=$IP_RES_RANGE_LOW end_ip=$IP_RES_RANGE_HIGH \
+ comment='This is a reserved range' || true
+ fi
+ else
+ if ([ $NET_FABRIC_ID ]); then
+ # Set ranges
+ SUBNET_PREFIX=${SPACE_CIDR::-5}
+ IP_RES_RANGE_LOW="$SUBNET_PREFIX.1"
+ IP_RES_RANGE_HIGH="$SUBNET_PREFIX.5"
+ maas $PROFILE ipranges create type=reserved \
+ start_ip=$IP_RES_RANGE_LOW end_ip=$IP_RES_RANGE_HIGH \
+ comment='This is a reserved range' || true
+ fi
fi
done
}
addnodes(){
- API_KEY=`sudo maas-region apikey --username=ubuntu`
maas login $PROFILE $API_SERVERMAAS $API_KEY
+ maas $PROFILE maas set-config name=default_min_hwe_kernel value=hwe-16.04-edge || true
+
# make sure there is no machine entry in maas
for m in $(maas $PROFILE machines read | jq -r '.[].system_id')
do
@@ -439,8 +502,8 @@ addnodes(){
virt-install --connect $VIRSHURL --name bootstrap --ram 4098 --cpu $CPU_MODEL --vcpus 2 \
--disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
- $netw --boot network,hd,menu=off --noautoconsole \
- --print-xml | tee bootstrap
+ $netw --boot network,hd,menu=off --video virtio --noautoconsole --autostart \
+ --accelerate --print-xml | tee bootstrap
if [ "$virtinstall" -eq 1 ]; then
bootstrapmac=`grep "mac address" bootstrap | head -1 | cut -d '"' -f 2`
@@ -452,7 +515,6 @@ addnodes(){
done
fi
virsh -c $VIRSHURL define --file bootstrap
- virsh -c $VIRSHURL autostart bootstrap
rm -f bootstrap
@@ -476,11 +538,11 @@ addnodes(){
virt-install --connect $VIRSHURL --name $NODE_NAME --ram 8192 --cpu $CPU_MODEL --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
- $netw $netw --boot network,hd,menu=off --noautoconsole --print-xml | tee $NODE_NAME
+ $netw $netw --boot network,hd,menu=off --video virtio --noautoconsole --autostart \
+ --accelerate --print-xml | tee $NODE_NAME
nodemac=`grep "mac address" $NODE_NAME | head -1 | cut -d '"' -f 2`
virsh -c $VIRSHURL define --file $NODE_NAME
- virsh -c $VIRSHURL autostart $NODE_NAME
rm -f $NODE_NAME
maas $PROFILE machines create autodetect_nodegroup='yes' name=$NODE_NAME \
@@ -552,10 +614,12 @@ sleep 30
setupspacenetwork
-#just make sure rack controller has been synced and import only
-# just whether images have been imported or not.
-sudo ./maas-reconfigure-region.sh $MAAS_IP
-sleep 120
+if [ "$snapinstall" -eq 0 ]; then
+ sudo sed -i 's/localhost/'$MAAS_IP'/g' /etc/maas/rackd.conf
+ sudo service maas-rackd restart
+ sudo service maas-regiond restart
+ sleep 120
+fi
# Let's add the nodes now. Currently works only for virtual deployment.
addnodes
@@ -567,7 +631,6 @@ echo_info "Initial deployment of MAAS finished"
#maas $PROFILE sshkeys new key="`cat ./maas/sshkeys/DominoKey.pub`"
addcredential() {
- API_KEY=`sudo maas-region apikey --username=ubuntu`
controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
@@ -597,7 +660,6 @@ addcloud() {
#
# Enable MAAS nodes interfaces
#
-API_KEY=`sudo maas-region apikey --username=ubuntu`
maas login $PROFILE $API_SERVERMAAS $API_KEY
if [ -e ./labconfig.json ]; then
@@ -688,12 +750,8 @@ if [ -e ./labconfig.json ]; then
fi
# Add the cloud and controller credentials for MAAS for that lab.
-jujuver=`juju --version`
-
-if [[ "$jujuver" > "2" ]]; then
- addcloud
- addcredential
-fi
+addcloud
+addcredential
#
# End of scripts
diff --git a/ci/clean.sh b/ci/clean.sh
index 5005b594..1f3ef54f 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -2,52 +2,22 @@
set -ex
-jujuver=`juju --version`
-
-if [[ "$jujuver" > "2" ]]; then
- if [ ! -d labconfig.yaml ]; then
- cp ~/joid_config/labconfig.yaml ./labconfig.yaml || true
- if [ -d $HOME/joid_config/deployconfig.yaml ]; then
- cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml || true
- else
- python genDeploymentConfig.py -l labconfig.yaml > deployconfig.yaml
- fi
- fi
-else
- if [ ! -d environments.yaml ]; then
- cp ~/joid_config/environments.yaml ./environments.yaml || true
- cp ~/.juju/environments.yaml ./environments.yaml || true
- fi
-fi
-
-
-if [[ "$jujuver" > "2" ]]; then
- controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- juju destroy-controller $controllername --destroy-all-models -y || true
-# juju kill-controller $controllername --timeout 10s -y || true
- rm -rf precise
- rm -rf trusty
- rm -rf xenial
- rm -rf ~/joid_config/admin-openrc
- sleep 10
- sudo sysctl -w vm.drop_caches=3
-elif [ -d $HOME/.juju/environments ]; then
- echo " " > status.txt
- juju status &>>status.txt || true
- if [ "$(grep -c "environment is not bootstrapped" status.txt )" -ge 1 ]; then
- echo " environment is not bootstrapped ..."
+if [ ! -d labconfig.yaml ]; then
+ cp ~/joid_config/labconfig.yaml ./labconfig.yaml || true
+ if [ -d $HOME/joid_config/deployconfig.yaml ]; then
+ cp ~/joid_config/deployconfig.yaml ./deployconfig.yaml || true
else
- echo " environment is bootstrapped ..."
- jujuenv=`juju status | grep environment | cut -d ":" -f 2`
- juju destroy-environment $jujuenv -y || true
+ python genDeploymentConfig.py -l labconfig.yaml > deployconfig.yaml
fi
- rm -rf precise
- rm -rf trusty
- rm -rf xenial
- rm -rf $HOME/.juju/j*
- rm -rf $HOME/.juju/.deployer-store-cache
- rm -rf $HOME/.juju/environments
- rm -rf $HOME/.juju/ssh
- sudo sysctl -w vm.drop_caches=3
fi
+
+controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
+cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
+juju destroy-controller $controllername --destroy-all-models -y || true
+#juju kill-controller $controllername --timeout 10s -y || true
+rm -rf precise
+rm -rf trusty
+rm -rf xenial
+rm -rf ~/joid_config/admin-openrc
+sleep 10
+sudo sysctl -w vm.drop_caches=3
diff --git a/ci/cleanmaas.sh b/ci/cleanmaas.sh
index 41a74196..1cad80dd 100755
--- a/ci/cleanmaas.sh
+++ b/ci/cleanmaas.sh
@@ -2,10 +2,7 @@
set -ex
-maasver=$(apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/^[ ]*//')
-
-if [[ "$maasver" > "2" ]]; then
- echo "removing existing maas ..."
- sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y
- sudo rm -rf /var/lib/maas
-fi
+echo "removing existing maas ..."
+sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y
+sudo rm -rf /var/lib/maas
+sudo snap remove maas || true
diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
index 0568b38a..b8948e61 100644
--- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml
@@ -33,11 +33,7 @@
ceph-osd:
charm: "./{{ ubuntu.release }}/ceph-osd"
{% if os.hyperconverged %}
-{% if opnfv.units >= 3 %}
- num_units: {{ unit_ceph_qty() }}
-{% else %}
num_units: {{ opnfv.units }}
-{% endif %}
{% else %}
num_units: 3
{% endif %}
@@ -57,15 +53,9 @@
{% endif %}
to:
{% if os.hyperconverged %}
-{% if opnfv.units >= 3 %}
-{% for unit_id in range(0, 3) %}
- - "nodes/{{ unit_id }}"
-{% endfor %}
-{% else %}
- {% for unit_id in range(0, opnfv.units) %}
+{% for unit_id in range(0, opnfv.units) %}
- "nodes/{{ unit_id }}"
- {% endfor %}
-{% endif %}
+{% endfor %}
{% else %}
{% if os.ha.mode == 'ha' %}
{% for unit_id in range(0, 3) %}
diff --git a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
index 233d1d72..1c6b78f6 100644
--- a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml
@@ -17,9 +17,7 @@
region: *openstack-region
admin-role: {{ os.admin.role }}
keystone-admin-role: {{ os.admin.role }}
-{% if os.network.controller != 'ocl' %}
preferred-api-version: 3
-{% endif %}
{% if os.network.ipv6 %}
prefer-ipv6: {{ os.network.ipv6 }}
{% endif %}
diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
index e59530c1..823e251a 100644
--- a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
@@ -37,6 +37,9 @@
{% elif os.network.controller == 'onos' %}
flat-network-providers: physnet1
manage-neutron-plugin-legacy-mode: False
+{% elif os.network.controller == 'ocl' %}
+ flat-network-providers: physnet1
+ manage-neutron-plugin-legacy-mode: False
{% endif %}
{% if os.network.dvr %}
enable-dvr: true
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
index b4ed14ac..6d777720 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/bundle.yaml
@@ -23,10 +23,14 @@
{% if k8.network.controller == 'ovn' %}
{% include 'ovn.yaml' %}
+{% elif k8.network.controller == 'canal' %}
+{% include 'canal.yaml' %}
{% else %}
{% include 'flannel.yaml' %}
{% endif %}
-
+{% if k8.feature.storage == 'ceph' %}
+{% include 'ceph.yaml' %}
+{% endif %}
relations:
- [ 'ntp:juju-info', 'nodes:juju-info' ]
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml b/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml
new file mode 100644
index 00000000..2b130652
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/canal.yaml
@@ -0,0 +1,8 @@
+
+ canal:
+ charm: "cs:~containers/canal-6"
+{% if os.service.bindings %}
+ bindings:
+ "": *oam-space
+{% endif %}
+
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/ceph.yaml b/ci/config_tpl/juju2/bundlek8_tpl/ceph.yaml
new file mode 100644
index 00000000..56149033
--- /dev/null
+++ b/ci/config_tpl/juju2/bundlek8_tpl/ceph.yaml
@@ -0,0 +1,35 @@
+
+ ceph-mon:
+ charm: "./{{ ubuntu.release }}/ceph-mon"
+ num_units: {{ unit_ceph_qty() }}
+{% if os.service.bindings %}
+ bindings:
+ "": *oam-space
+ public: *ceph-public-space
+ cluster: *ceph-cluster-space
+{% endif %}
+ options:
+ expected-osd-count: {{ unit_ceph_qty() }}
+ to:
+{% for unit_id in to_select(unit_ceph_qty()) %}
+ - "lxd:nodes/{{ unit_id }}"
+{% endfor %}
+
+ ceph-osd:
+ charm: "./{{ ubuntu.release }}/ceph-osd"
+ num_units: {{ opnfv.units }}
+{% if os.service.bindings %}
+ bindings:
+ "": *oam-space
+ public: *ceph-public-space
+ cluster: *ceph-cluster-space
+{% endif %}
+ options:
+ osd-devices: *osd-devices
+ osd-journal: *osd-journal
+ osd-reformat: 'yes'
+ to:
+ {% for unit_id in range(0, opnfv.units) %}
+ - "nodes/{{ unit_id }}"
+ {% endfor %}
+
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
index 44018201..602fbaad 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/relations.yaml
@@ -10,6 +10,10 @@
{% if k8.network.controller == 'ovn' %}
- [ 'ovn:cni', 'kubernetes-master:cni' ]
- [ 'ovn:cni', 'kubernetes-worker:cni' ]
+{% elif k8.network.controller == 'canal' %}
+ - [ 'canal:etcd', 'etcd:db' ]
+ - [ 'canal:cni', 'kubernetes-master:cni' ]
+ - [ 'canal:cni', 'kubernetes-worker:cni' ]
{% else %}
- [ 'flannel:etcd', 'etcd:db' ]
- [ 'flannel:cni', 'kubernetes-master:cni' ]
@@ -21,4 +25,7 @@
- [ 'kubernetes-worker:kube-api-endpoint', 'kubeapi-load-balancer:website' ]
- [ 'kubeapi-load-balancer:certificates', 'easyrsa:client' ]
{% endif %}
-
+{% if k8.feature.storage == 'ceph' %}
+ - [ 'ceph-osd:mon', 'ceph-mon:osd' ]
+ - [ 'ceph-mon:admin', 'kubernetes-master:ceph-storage' ]
+{% endif %}
diff --git a/ci/config_tpl/juju2/bundlek8_tpl/spaces.yaml b/ci/config_tpl/juju2/bundlek8_tpl/spaces.yaml
index 17dbd7da..01afb34d 100644
--- a/ci/config_tpl/juju2/bundlek8_tpl/spaces.yaml
+++ b/ci/config_tpl/juju2/bundlek8_tpl/spaces.yaml
@@ -1,5 +1,24 @@
-
-
# OAM - Operations, Administration and Maintenance
oam-space: &oam-space internal-api
+ # CEPH configuration
+ # CEPH access network
+{% if opnfv.spaces_dict.storageaccess is defined %}
+ ceph-public-space: &ceph-public-space storage-access-space
+ ceph-access-constr: &ceph-access-constr spaces=storage-access-space
+{% else %}
+ ceph-public-space: &ceph-public-space internal-api
+ ceph-access-constr: &ceph-access-constr spaces=internal-api
+{% endif %}
+
+ # CEPH replication network
+{% if opnfv.spaces_dict.storage is defined %}
+ ceph-cluster-space: &ceph-cluster-space storage-cluster
+{% else %}
+ ceph-cluster-space: &ceph-cluster-space internal-api
+{% endif %}
+
+ # CEPH OSD and journal devices; temporary workaround for #1674148
+ osd-devices: &osd-devices {{ opnfv.storage_dict.ceph.disk }}
+ osd-journal: &osd-journal
+
diff --git a/ci/default_deployment_config.yaml b/ci/default_deployment_config.yaml
index 0ea2a438..0a0f055b 100644
--- a/ci/default_deployment_config.yaml
+++ b/ci/default_deployment_config.yaml
@@ -1,10 +1,10 @@
ubuntu:
release: xenial
os:
- release: ocata
+ release: pike
git_repo:
origin_git: False
- branch: ocata
+ branch: pike
hyperconverged: True
ha:
mode: ha
@@ -39,5 +39,6 @@ os:
k8:
feature:
loadbalancer: False
+ storage: none
network:
controller: nosdn
diff --git a/ci/depMAAS.py b/ci/depMAAS.py
index 5592bc46..3a16b1e4 100644
--- a/ci/depMAAS.py
+++ b/ci/depMAAS.py
@@ -31,14 +31,7 @@ labconfig_file = options.lab
#
# Set Path and configs path
#
-
-# Capture our current directory
-jujuver = subprocess.check_output(["juju", "--version"])
-
-if LooseVersion(jujuver) >= LooseVersion('2'):
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas_tpl'
-else:
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas2/maas_tpl'
+TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas_tpl'
HOME = os.environ['HOME']
USER = os.environ['USER']
diff --git a/ci/deploy.sh b/ci/deploy.sh
index a6a1b182..ab3e5e34 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -9,7 +9,7 @@ source common/tools.sh
opnfvsdn=nosdn
opnfvtype=noha
-openstack=ocata
+openstack=pike
opnfvlab=default
opnfvlabfile=
opnfvrel=e
@@ -23,7 +23,7 @@ maasinstall=0
usage() { echo "Usage: $0
[-s|--sdn <nosdn|odl|opencontrail>]
[-t|--type <noha|ha|tip>]
- [-o|--openstack <ocata>]
+ [-o|--openstack <ocata|pike>]
[-l|--lab <default|custom>]
[-f|--feature <ipv6,dpdk,lxd,dvr,openbaton,multus>]
[-d|--distro <xenial>]
@@ -227,7 +227,7 @@ deploy() {
./cleanvm.sh || true
if [ "$virtinstall" -eq 1 ]; then
- ./00-maasdeploy.sh virtual
+ ./03-maasdeploy.sh virtual
else
if [ -z "$labfile" ]; then
if [ ! -e ./labconfig.yaml ]; then
@@ -248,7 +248,7 @@ deploy() {
cp $labfile ./labconfig.yaml
fi
- ./00-maasdeploy.sh custom
+ ./03-maasdeploy.sh custom
fi
fi
@@ -318,20 +318,32 @@ juju status --format=tabular
# translate bundle.yaml to json
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < bundles.yaml > bundles.json
-jujuver=`juju --version`
-
# Configuring deployment
if ([ $opnfvmodel == "openstack" ]); then
+ if ([ $opnfvsdn == "ocl" ]); then
+ echo_info "Patching OpenContrail controller container"
+ juju run --application contrail-controller sudo docker cp contrail-controller:/etc/contrail/vnc_api_lib.ini /tmp
+ juju run --application contrail-controller cp /tmp/vnc_api_lib.ini /tmp/vnc_api_lib.ini2
+ juju run --application contrail-controller 'echo "AUTHN_DOMAIN = admin_domain" >> /tmp/vnc_api_lib.ini2'
+ juju run --application contrail-controller sudo docker cp /tmp/vnc_api_lib.ini2 contrail-controller:/etc/contrail/vnc_api_lib.ini
+ juju run --application contrail-controller sudo docker exec contrail-controller service contrail-api restart
+
+ juju run --application contrail-controller sudo docker cp /tmp/vnc_api_lib.ini2 contrail-analytics:/etc/contrail/vnc_api_lib.ini
+ echo_info "Wait for OpenContrail components to stabilize"
+ sleep 600
+ fi
+
echo_info "Configuring OpenStack deployment"
./openstack.sh "$opnfvsdn" "$opnfvlab" "$opnfvdistro" "$openstack" || true
# creating heat domain after pushing the public API into /etc/hosts
- if [[ "$jujuver" > "2" ]]; then
- status=`juju run-action heat/0 domain-setup`
+ status=`juju run-action heat/0 domain-setup`
+ echo $status
+ if ([ $opnftype == "ha" ]); then
+ status=`juju run-action heat/1 domain-setup`
echo $status
- else
- status=`juju action do heat/0 domain-setup`
+ status=`juju run-action heat/2 domain-setup`
echo $status
fi
diff --git a/ci/genBundle.py b/ci/genBundle.py
index 1bd09bb0..ffe9cb8f 100644
--- a/ci/genBundle.py
+++ b/ci/genBundle.py
@@ -35,13 +35,7 @@ labconfig_file = options.lab
#
scenarioconfig_file = 'default_deployment_config.yaml'
-# Capture our current directory
-jujuver = subprocess.check_output(["juju", "--version"])
-
-if LooseVersion(jujuver) >= LooseVersion('2'):
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2/bundle_tpl'
-else:
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/bundle_tpl'
+TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2/bundle_tpl'
#
# Prepare variables
diff --git a/ci/genDeploymentConfig.py b/ci/genDeploymentConfig.py
index 0a21fffa..0d3a1c95 100644
--- a/ci/genDeploymentConfig.py
+++ b/ci/genDeploymentConfig.py
@@ -30,14 +30,7 @@ labconfig_file = options.lab
#
# Set Path and configs path
#
-
-# Capture our current directory
-jujuver = subprocess.check_output(["juju", "--version"])
-
-if LooseVersion(jujuver) >= LooseVersion('2'):
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2'
-else:
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl'
+TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2'
HOME = os.environ['HOME']
USER = os.environ['USER']
diff --git a/ci/genK8Bundle.py b/ci/genK8Bundle.py
index 2f0b63d5..688d18eb 100644
--- a/ci/genK8Bundle.py
+++ b/ci/genK8Bundle.py
@@ -35,9 +35,6 @@ labconfig_file = options.lab
#
scenarioconfig_file = 'default_deployment_config.yaml'
-# Capture our current directory
-jujuver = subprocess.check_output(["juju", "--version"])
-
TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2/bundlek8_tpl'
#
@@ -164,6 +161,8 @@ if 'dpdk' in features:
config['os']['network']['dpdk'] = True
if 'lb' in features:
config['k8']['feature']['loadbalancer'] = True
+if 'ceph' in features:
+ config['k8']['feature']['storage'] = 'ceph'
# change ha mode
config['k8']['network']['controller'] = sdn
diff --git a/ci/genMAASConfig.py b/ci/genMAASConfig.py
index 9417f71c..8a3f5571 100644
--- a/ci/genMAASConfig.py
+++ b/ci/genMAASConfig.py
@@ -31,14 +31,7 @@ labconfig_file = options.lab
#
# Set Path and configs path
#
-
-# Capture our current directory
-jujuver = subprocess.check_output(["juju", "--version"])
-
-if LooseVersion(jujuver) >= LooseVersion('2'):
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas2/maas_tpl'
-else:
- TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas_tpl'
+TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/maas2/maas_tpl'
HOME = os.environ['HOME']
USER = os.environ['USER']
diff --git a/ci/kubernetes/fetch-charms.sh b/ci/kubernetes/fetch-charms.sh
index 255f1eb7..4ab94a98 100755
--- a/ci/kubernetes/fetch-charms.sh
+++ b/ci/kubernetes/fetch-charms.sh
@@ -10,5 +10,6 @@ function build {
}
# openstack
-bzr branch lp:~narindergupta/opnfv/ntp $distro/ntp
-
+charm pull cs:ntp $distro/ntp
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
diff --git a/ci/nosdn/fetch-charms.sh b/ci/nosdn/fetch-charms.sh
index 48feb590..7ada1697 100755
--- a/ci/nosdn/fetch-charms.sh
+++ b/ci/nosdn/fetch-charms.sh
@@ -12,31 +12,31 @@ function build {
# openstack
bzr branch lp:~narindergupta/charms/trusty/promise/trunk $distro/promise
-git clone -b stable/17.08 https://github.com/openstack/charm-hacluster.git $distro/hacluster
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder.git $distro/cinder
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
-git clone -b stable/17.08 https://github.com/openstack/charm-glance.git $distro/glance
-git clone -b stable/17.08 https://github.com/openstack/charm-keystone.git $distro/keystone
-git clone -b stable/17.08 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-gateway.git $distro/neutron-gateway
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
-git clone -b stable/17.08 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
-git clone -b stable/17.08 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
-git clone -b stable/17.08 https://github.com/openstack/charm-heat.git $distro/heat
-git clone -b stable/17.08 https://github.com/openstack/charm-lxd.git $distro/lxd
+git clone -b stable/17.11 https://github.com/openstack/charm-hacluster.git $distro/hacluster
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder.git $distro/cinder
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
+git clone -b stable/17.11 https://github.com/openstack/charm-glance.git $distro/glance
+git clone -b stable/17.11 https://github.com/openstack/charm-keystone.git $distro/keystone
+git clone -b stable/17.11 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-gateway.git $distro/neutron-gateway
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
+git clone -b stable/17.11 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
+git clone -b stable/17.11 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
+git clone -b stable/17.11 https://github.com/openstack/charm-heat.git $distro/heat
+git clone -b stable/17.11 https://github.com/openstack/charm-lxd.git $distro/lxd
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
charm pull cs:$distro/aodh $distro/aodh
charm pull cs:$distro/mongodb $distro/mongodb
-charm pull cs:$distro/ntp $distro/ntp
+charm pull cs:ntp $distro/ntp
charm pull cs:$distro/haproxy $distro/haproxy
charm pull cs:~narindergupta/congress-1 $distro/congress
diff --git a/ci/odl/fetch-charms.sh b/ci/odl/fetch-charms.sh
index 9b7adaed..cf8c6dc8 100755
--- a/ci/odl/fetch-charms.sh
+++ b/ci/odl/fetch-charms.sh
@@ -12,34 +12,34 @@ function build {
# openstack
bzr branch lp:~narindergupta/charms/trusty/promise/trunk $distro/promise
-git clone -b stable/17.08 https://github.com/openstack/charm-hacluster.git $distro/hacluster
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder.git $distro/cinder
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
-git clone -b stable/17.08 https://github.com/openstack/charm-glance.git $distro/glance
-git clone -b stable/17.08 https://github.com/openstack/charm-keystone.git $distro/keystone
-git clone -b stable/17.08 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-gateway.git $distro/neutron-gateway
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
-git clone -b stable/17.08 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
-git clone -b stable/17.08 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
-git clone -b stable/17.08 https://github.com/openstack/charm-heat.git $distro/heat
-git clone -b stable/17.08 https://github.com/openstack/charm-lxd.git $distro/lxd
-git clone -b stable/17.08 https://github.com/openstack/charm-odl-controller.git $distro/odl-controller
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-api-odl.git $distro/neutron-api-odl
-git clone -b stable/17.08 https://github.com/openstack/charm-openvswitch-odl.git $distro/openvswitch-odl
+git clone -b stable/17.11 https://github.com/openstack/charm-hacluster.git $distro/hacluster
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder.git $distro/cinder
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
+git clone -b stable/17.11 https://github.com/openstack/charm-glance.git $distro/glance
+git clone -b stable/17.11 https://github.com/openstack/charm-keystone.git $distro/keystone
+git clone -b stable/17.11 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-gateway.git $distro/neutron-gateway
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
+git clone -b stable/17.11 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
+git clone -b stable/17.11 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
+git clone -b stable/17.11 https://github.com/openstack/charm-heat.git $distro/heat
+git clone -b stable/17.11 https://github.com/openstack/charm-lxd.git $distro/lxd
+git clone -b stable/17.11 https://github.com/openstack/charm-odl-controller.git $distro/odl-controller
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-api-odl.git $distro/neutron-api-odl
+git clone -b stable/17.11 https://github.com/openstack/charm-openvswitch-odl.git $distro/openvswitch-odl
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
charm pull cs:$distro/aodh $distro/aodh
charm pull cs:$distro/mongodb $distro/mongodb
-charm pull cs:$distro/ntp $distro/ntp
+charm pull cs:ntp $distro/ntp
#pulling scaleio charms.
charm pull cs:~cloudscaling/scaleio-mdm $distro/scaleio-mdm
diff --git a/ci/onos/fetch-charms.sh b/ci/onos/fetch-charms.sh
index 3ffc628f..fc093cdb 100755
--- a/ci/onos/fetch-charms.sh
+++ b/ci/onos/fetch-charms.sh
@@ -12,29 +12,29 @@ function build {
# openstack
bzr branch lp:~narindergupta/charms/trusty/promise/trunk $distro/promise
bzr branch lp:~billy-olsen/charms/xenial/mongodb/trunk $distro/mongodb
-bzr branch lp:~narindergupta/opnfv/ntp $distro/ntp
-git clone -b stable/17.08 https://github.com/openstack/charm-hacluster.git $distro/hacluster
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
-git clone -b stable/17.08 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
-git clone -b stable/17.08 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder.git $distro/cinder
-git clone -b stable/17.08 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
-git clone -b stable/17.08 https://github.com/openstack/charm-glance.git $distro/glance
-git clone -b stable/17.08 https://github.com/openstack/charm-keystone.git $distro/keystone
-git clone -b stable/17.08 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
-git clone -b stable/17.08 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
-git clone -b stable/17.08 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
-git clone -b stable/17.08 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
-git clone -b stable/17.08 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
-git clone -b stable/17.08 https://github.com/openstack/charm-heat.git $distro/heat
+git clone -b stable/17.11 https://github.com/openstack/charm-hacluster.git $distro/hacluster
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer.git $distro/ceilometer
+git clone -b stable/17.11 https://github.com/openstack/charm-ceilometer-agent.git $distro/ceilometer-agent
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-mon.git $distro/ceph-mon
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-osd.git $distro/ceph-osd
+git clone -b stable/17.11 https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-radosgw
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder.git $distro/cinder
+git clone -b stable/17.11 https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
+git clone -b stable/17.11 https://github.com/openstack/charm-glance.git $distro/glance
+git clone -b stable/17.11 https://github.com/openstack/charm-keystone.git $distro/keystone
+git clone -b stable/17.11 https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
+git clone -b stable/17.11 https://github.com/openstack/charm-neutron-openvswitch.git $distro/neutron-openvswitch
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-cloud-controller.git $distro/nova-cloud-controller
+git clone -b stable/17.11 https://github.com/openstack/charm-nova-compute.git $distro/nova-compute
+git clone -b stable/17.11 https://github.com/openstack/charm-openstack-dashboard.git $distro/openstack-dashboard
+git clone -b stable/17.11 https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
+git clone -b stable/17.11 https://github.com/openstack/charm-heat.git $distro/heat
git clone https://github.com/openstack/charm-lxd.git $distro/lxd
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
+charm pull cs:ntp $distro/ntp
charm pull cs:$distro/aodh $distro/aodh
charm pull cs:~narindergupta/congress-1 $distro/congress
diff --git a/ci/opencontrail/fetch-charms.sh b/ci/opencontrail/fetch-charms.sh
index 2a88ba63..62fbbd6b 100755
--- a/ci/opencontrail/fetch-charms.sh
+++ b/ci/opencontrail/fetch-charms.sh
@@ -35,7 +35,7 @@ git clone -b stable/17.08 https://github.com/openstack/charm-lxd.git $distro/lxd
git clone https://github.com/openbaton/juju-charm.git $distro/openbaton
charm pull cs:$distro/mongodb $distro/mongodb
-charm pull cs:$distro/ntp $distro/ntp
+charm pull cs:ntp $distro/ntp
charm pull cs:$distro/aodh $distro/aodh
charm pull cs:~free.ekanayaka/xenial/haproxy-1 $distro/haproxy
charm pull cs:~narindergupta/congress-1 $distro/congress
diff --git a/ci/openstack.sh b/ci/openstack.sh
index a32bb998..3c8f9757 100755
--- a/ci/openstack.sh
+++ b/ci/openstack.sh
@@ -17,8 +17,6 @@ opnfvlab=$2
opnfvdistro=$3
opnfvos=$4
-jujuver=`juju --version`
-
if [ -f ./deployconfig.yaml ];then
EXTERNAL_NETWORK=`grep floating-ip-range deployconfig.yaml | cut -d ' ' -f 4 `
@@ -49,38 +47,22 @@ update_gw_mac() {
## get gateway mac
EXTNET_GW_MAC=$(juju ssh nova-compute/0 "arp -a ${EXTNET_GW} | grep -Eo '([0-9a-fA-F]{2})(([/\s:-][0-9a-fA-F]{2}){5})'")
## set external gateway mac in onos
- if [[ "$jujuver" < "2" ]]; then
- juju set onos-controller gateway-mac=$EXTNET_GW_MAC
- else
- juju config onos-controller gateway-mac=$EXTNET_GW_MAC
- fi
+ juju config onos-controller gateway-mac=$EXTNET_GW_MAC
}
unitAddress() {
- if [[ "$jujuver" < "2" ]]; then
- juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null
- else
- juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"applications\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null
- fi
+ juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"applications\"][\"$1\"][\"units\"][\"$1/$2\"][\"public-address\"]" 2> /dev/null
}
unitMachine() {
- if [[ "$jujuver" < "2" ]]; then
- juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"services\"][\"$1\"][\"units\"][\"$1/$2\"][\"machine\"]" 2> /dev/null
- else
- juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"applications\"][\"$1\"][\"units\"][\"$1/$2\"][\"machine\"]" 2> /dev/null
- fi
+ juju status --format yaml | python -c "import yaml; import sys; print yaml.load(sys.stdin)[\"applications\"][\"$1\"][\"units\"][\"$1/$2\"][\"machine\"]" 2> /dev/null
}
keystoneIp() {
if [ $(juju status keystone --format=short | grep " keystone"|wc -l) == 1 ];then
unitAddress keystone 0
else
- if [[ "$jujuver" < "2" ]]; then
- juju get keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['vip']['value']" | cut -d " " -f 1
- else
- juju config keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['vip']['value']" | cut -d " " -f 1
- fi
+ juju config keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['vip']['value']" | cut -d " " -f 1
fi
}
@@ -90,11 +72,7 @@ create_openrc() {
mkdir -m 0700 -p cloud
keystoneIp=$(keystoneIp)
- if [[ "$jujuver" < "2" ]]; then
- adminPasswd=$(juju get keystone | grep admin-password -A 5 | grep value | awk '{print $2}' 2> /dev/null)
- else
- adminPasswd=$(juju config keystone | grep admin-password -A 5 | grep value | awk '{print $2}' 2> /dev/null)
- fi
+ adminPasswd=$(juju config keystone | python -c "import yaml; import sys; print yaml.load(sys.stdin)['settings']['admin-password']['value']" | cut -d " " -f 1)
v3api=`juju config keystone preferred-api-version`
@@ -138,6 +116,7 @@ export OS_PROJECT_NAME=$3
export OS_PASSWORD=$2
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=$5
+export OS_INTERFACE=public
#export OS_INSECURE=true
#export OS_CASSL=~/joid_config/ca.pem
EOF
@@ -167,22 +146,22 @@ echo_info "Creating external network with neutron"
if [ "onos" == "$opnfvsdn" ]; then
launch_eth
- neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \
- --router:external=True
+ openstack network show ext-net > /dev/null 2>&1 || openstack network create \
+ --external --share --enable ext-net
elif [ "ocl" == "$opnfvsdn" ]; then
- neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \
- --router:external=True
+ openstack network show ext-net > /dev/null 2>&1 || openstack network create \
+ --external --share --enable ext-net
else
- neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \
- --router:external=True \
- --provider:network_type flat \
- --provider:physical_network physnet1
+ openstack network show ext-net > /dev/null 2>&1 || openstack network create \
+ --provider-network-type flat \
+ --provider-physical-network physnet1 \
+ --external --share --enable ext-net
fi
-neutron subnet-show ext-subnet > /dev/null 2>&1 || neutron subnet-create ext-net \
- --name ext-subnet --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
- --disable-dhcp --gateway $EXTNET_GW $EXTNET_NET
+openstack subnet show ext-subnet > /dev/null 2>&1 || openstack subnet create \
+ --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
+ --no-dhcp --gateway $EXTNET_GW --network ext-net --subnet-range $EXTNET_NET ext-subnet
# Ocl can push packets to the fabric network in order to reach a gateway if BGP/L3VPN hasn't been configured.
if [ "ocl" == "$opnfvsdn" ]; then