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' )
#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
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
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
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' )
;;
esac
-echo " .... MAAS deployment finished successfully ...."
+enable_if
-#echo "... Deployment of opnfv release Started ...."
-#python deploy.py $maas_ip
+echo " .... MAAS deployment finished successfully ...."
}\
}
-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")
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
#lets insert the node details here:
c=0
+ifnamelist=[]
#
while c < len(labcfg["lab"]["racks"][0]["nodes"]):
valuemac=[]
"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"]\
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)
-#!/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
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
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
- 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"
charm: "local:trusty/heat"
to:
- "lxc:nodes=0"
+ congress:
+ charm: local:trusty/congress
+ options:
+ source-branch: stable/liberty
+ to:
+ - "lxc:nodes=1"