summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/01-deploybundle.sh12
-rwxr-xr-xci/02-maasdeploy.sh62
-rw-r--r--ci/deploy.py10
-rwxr-xr-xci/nosdn/fetch-charms.sh13
-rw-r--r--ci/nosdn/juju-deployer/ovs-nosdn-nonha.yaml12
5 files changed, 69 insertions, 40 deletions
diff --git a/ci/01-deploybundle.sh b/ci/01-deploybundle.sh
index 7addbce2..bf9784f4 100755
--- a/ci/01-deploybundle.sh
+++ b/ci/01-deploybundle.sh
@@ -8,8 +8,7 @@ set -ex
cp $4/fetch-charms.sh ./fetch-charms.sh
#modify the ubuntu series wants to deploy
sed -i -- "s|distro=trusty|distro=$6|g" ./fetch-charms.sh
- sh ./fetch-charms.sh $6
-
+ ./fetch-charms.sh $6
case "$1" in
'nonha' )
@@ -31,24 +30,17 @@ esac
#read the value from deployment.yaml
if [ -e ~/.juju/deployment.yaml ]; then
-
cp ~/.juju/deployment.yaml ./deployment.yaml
-
- if [ -e ~/.juju/deployment.yaml ]; then
+ if [ -e ~/.juju/deployconfig.yaml ]; then
cp ~/.juju/deployconfig.yaml ./deployconfig.yaml
-
extport=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
sed --i "s@#ext-port: \"eth1\"@ext-port: \"$extport\"@g" ./bundles.yaml
-
datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
-
if [ "$datanet" != "''" ]; then
sed -i -- "s@#os-data-network: 10.4.8.0/21@os-data-network: $datanet@g" ./bundles.yaml
fi
-
admnet=`grep "admNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
sed --i "s@10.4.1.1@$admnet@g" ./bundles.yaml
-
cephdisk=`grep "disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
sed --i "s@osd-devices: /srv@osd-devices: $cephdisk@g" ./bundles.yaml
fi
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh
index 839d29f4..b1b7e214 100755
--- a/ci/02-maasdeploy.sh
+++ b/ci/02-maasdeploy.sh
@@ -9,7 +9,7 @@ labname=$1
sudo apt-add-repository ppa:maas-deployers/stable -y
sudo apt-add-repository ppa:juju/stable -y
sudo apt-add-repository ppa:maas/stable -y
-sudo apt-add-repository cloud-archive:liberty -y
+sudo apt-add-repository cloud-archive:mitaka -y
sudo apt-get update -y
sudo apt-get dist-upgrade -y
sudo apt-get install openssh-server git maas-deployer juju juju-deployer maas-cli python-pip python-openstackclient gsutil -y
@@ -237,16 +237,40 @@ if [ "$virtinstall" -eq 1 ]; then
maas maas tag update-nodes compute add=$computenodeid
fi
+#read interface needed in Auto mode and enable it. Will be rmeoved once auto enablement will be implemented in the maas-deployer.
+enable_if(){
+ if [ -e ~/.juju/deployconfig.yaml ]; then
+ cp ~/.juju/deployconfig.yaml ./deployconfig.yaml
+
+ enableiflist=`grep "interface-enable" deployconfig.yaml | cut -d ' ' -f 4 `
+ datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+ stornet=`grep "storageNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+
+ # split EXTERNAL_NETWORK=first ip;last ip; gateway;network
+
+ if [ "$datanet" != "''" ]; then
+ EXTNET=(${enableiflist//,/ })
+ i="0"
+ while [ ! -z "${EXTNET[i]}" ];
+ do
+ enableautomode ${EXTNET[i]} AUTO $datanet || true
+ i=$[$i+1]
+ done
+ fi
+ if [ "$stornet" != "''" ]; then
+ EXTNET=(${enableiflist//,/ })
+ i="0"
+ while [ ! -z "${EXTNET[i]}" ];
+ do
+ echo enableautomode ${EXTNET[i]} AUTO $stornet || true
+ i=$[$i+1]
+ done
+ fi
+ fi
+}
+
# Enable vlan interfaces with maas
case "$labname" in
- 'intelpod5' )
- maas refresh
- enableautomode eth4 AUTO "10.5.12.0/24" || true
- ;;
- 'intelpod6' )
- maas refresh
- enableautomode eth4 AUTO "10.6.12.0/24" || true
- ;;
'intelpod9' )
maas refresh
crvlanupdsubnet vlan902 1 "DataNetwork" 902 2 || true
@@ -258,21 +282,6 @@ case "$labname" in
enableautomodebyname eth0.902 AUTO "10.9.12.0/24" control || true
enableautomodebyname eth1.905 AUTO "10.9.15.0/24" control || true
;;
- 'orangepod1' )
- maas refresh
- enableautomode eth2 DHCP "192.168.21.0/24" || true
- enableautomode eth3 AUTO "192.168.11.0/24" || true
- ;;
- 'orangepod2' )
- maas refresh
- enableautomode eth4 DHCP "192.168.22.0/24" || true
- enableautomode eth2 DHCP "192.168.22.0/24" || true
- enableautomode eth5 AUTO "192.168.12.0/24" || true
- enableautomode eth3 AUTO "192.168.12.0/24" || true
- ;;
- 'attvirpod1' )
- enableautomode eth1 AUTO "192.168.10.0/24" || true
- ;;
'juniperpod1' )
;;
'cengnlynxpod1' )
@@ -286,7 +295,6 @@ case "$labname" in
;;
esac
-echo " .... MAAS deployment finished successfully ...."
+enable_if
-#echo "... Deployment of opnfv release Started ...."
-#python deploy.py $maas_ip
+echo " .... MAAS deployment finished successfully ...."
diff --git a/ci/deploy.py b/ci/deploy.py
index fffe1bdc..65e19246 100644
--- a/ci/deploy.py
+++ b/ci/deploy.py
@@ -53,7 +53,8 @@ opnfvcfg['demo-maas']={'juju-bootstrap':{'memory': 4096,'name': "bootstrap",\
}\
}
-opnfvlabcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':'','ceph-disk':'/srv/'}
+opnfvlabcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':'','ceph-disk':'/srv/',\
+ 'storageNetwork':'','interface-enable':""}
opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:maas/stable")
opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:juju/stable")
@@ -141,6 +142,8 @@ while c < len(labcfg["opnfv"]["spaces"]):
opnfvcfg["demo-maas"]["juju-bootstrap"]["interfaces"].append("bridge="+brname+",model=virtio")
if brtype == "data":
opnfvlabcfg["opnfv"]["dataNetwork"]=brcidr
+ if brtype == "storage":
+ opnfvlabcfg["opnfv"]["storageNetwork"]=brcidr
c=c+1
@@ -157,6 +160,7 @@ if len(labcfg["lab"]["racks"][0]["nodes"]) < 1:
#lets insert the node details here:
c=0
+ifnamelist=[]
#
while c < len(labcfg["lab"]["racks"][0]["nodes"]):
valuemac=[]
@@ -188,7 +192,10 @@ while c < len(labcfg["lab"]["racks"][0]["nodes"]):
"power":power,'tags':noderoles})
y = 0
while y < len(labcfg["lab"]["racks"][0]["nodes"][c]["nics"]):
+ valuespaces = labcfg["lab"]["racks"][0]["nodes"][c]["nics"][y]["spaces"]
valueifname = labcfg["lab"]["racks"][0]["nodes"][c]["nics"][y]["ifname"]
+ if "admin" not in valuespaces:
+ ifnamelist += [valueifname]
valueifmac = labcfg["lab"]["racks"][0]["nodes"][c]["nics"][y]["mac"][0]
valuemac += labcfg["lab"]["racks"][0]["nodes"][c]["nics"][y]["mac"]
opnfvcfg["demo-maas"]["maas"]["nodes"][c]["interfaces"]\
@@ -204,6 +211,7 @@ while c < len(labcfg["lab"]["racks"][0]["nodes"]):
opnfvlabcfg["opnfv"]["floating-ip-range"]=labcfg["lab"]["racks"][0]["floating-ip-range"]
opnfvlabcfg["opnfv"]["ext-port"]=labcfg["lab"]["racks"][0]["ext-port"]
opnfvlabcfg["opnfv"]["ceph-disk"]=labcfg["opnfv"]["storage"][0]["disk"]
+opnfvlabcfg["opnfv"]["interface-enable"]=",".join(list(set(ifnamelist)))
with open('deployment.yaml', 'wa') as opnfvf:
yaml.dump(opnfvcfg, opnfvf, default_flow_style=False)
diff --git a/ci/nosdn/fetch-charms.sh b/ci/nosdn/fetch-charms.sh
index d715bd80..0a659af0 100755
--- a/ci/nosdn/fetch-charms.sh
+++ b/ci/nosdn/fetch-charms.sh
@@ -1,8 +1,14 @@
-#!/bin/sh -ex
+#!/bin/bash -ex
distro=$1
mkdir -p $distro
+function build {
+ sudo apt-get install charm-tools
+ (cd $distro/charm-congress; charm build -s $distro -obuild src)
+ mv $distro/charm-congress/build/$distro/congress $distro
+}
+
# openstack
bzr branch lp:~narindergupta/charms/trusty/promise/trunk $distro/promise
bzr branch lp:~billy-olsen/charms/xenial/mongodb/trunk $distro/mongodb
@@ -16,7 +22,8 @@ git clone https://github.com/openstack/charm-ceph-radosgw.git $distro/ceph-rados
git clone https://github.com/openstack/charm-cinder.git $distro/cinder
git clone https://github.com/openstack/charm-cinder-ceph.git $distro/cinder-ceph
git clone https://github.com/openstack/charm-glance.git $distro/glance
-git clone https://github.com/openstack/charm-keystone.git $distro/keystone
+#git clone https://github.com/openstack/charm-keystone.git $distro/keystone
+git clone -b bug/congress-fix https://github.com/gnuoy/charm-keystone.git $distro/keystone
git clone https://github.com/openstack/charm-percona-cluster.git $distro/percona-cluster
git clone https://github.com/openstack/charm-neutron-api.git $distro/neutron-api
git clone https://github.com/openstack/charm-neutron-gateway.git $distro/neutron-gateway
@@ -27,3 +34,5 @@ git clone https://github.com/openstack/charm-openstack-dashboard.git $distro/ope
git clone https://github.com/openstack/charm-rabbitmq-server.git $distro/rabbitmq-server
git clone https://github.com/openstack/charm-heat.git $distro/heat
git clone https://github.com/openstack/charm-lxd.git xenial/lxd
+git clone https://github.com/gnuoy/charm-congress.git $distro/charm-congress
+build
diff --git a/ci/nosdn/juju-deployer/ovs-nosdn-nonha.yaml b/ci/nosdn/juju-deployer/ovs-nosdn-nonha.yaml
index 3601d2c5..db7474e8 100644
--- a/ci/nosdn/juju-deployer/ovs-nosdn-nonha.yaml
+++ b/ci/nosdn/juju-deployer/ovs-nosdn-nonha.yaml
@@ -127,6 +127,12 @@ openstack-phase2:
- rabbitmq-server:amqp
#- - nova-compute:lxd
#- lxd:lxd
+ - - congress:shared-db
+ - mysql:shared-db
+ - - congress:identity-service
+ - keystone:identity-service
+ - - congress:amqp
+ - rabbitmq-server:amqp
services:
ceilometer:
charm: "local:trusty/ceilometer"
@@ -257,3 +263,9 @@ openstack-phase2:
charm: "local:trusty/heat"
to:
- "lxc:nodes=0"
+ congress:
+ charm: local:trusty/congress
+ options:
+ source-branch: stable/liberty
+ to:
+ - "lxc:nodes=1"