esac
+#read the value from deployment.yaml
+if [ -e ~/.juju/deployment.yaml ]; then
+ extport=`grep "ext-port" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+ sed --i "s@#ext-port: \"eth1\"@ext-port: \"$extport\"@g" ./bundles.yaml
+ datanet=`grep "dataNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+ sed --i "s@#os-data-network: 10.4.8.0/21@os-data-network: $datanet@g" ./bundles.yaml
+ admnet=`grep "admNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+ sed --i "s@10.4.1.1@$admnet@g" ./bundles.yaml
+fi
+
case "$3" in
- 'orangepod1' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/192.168.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.11.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
- # Use host for public API for Orange pod2
- # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
- ;;
- 'orangepod2' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
- # Use host for public API for Orange pod2
- # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
- ;;
'intelpod9' )
# As per your lab vip address list be deafult uses 10.9.1.11 - 10.9.1.20
sed -i -- 's/10.4.1.1/10.9.1.2/g' ./bundles.yaml
# Provide the gateway MAC to route the traffic externally.
sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
;;
- 'intelpod6' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/10.6.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.6.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
- # Provide the gateway MAC to route the traffic externally.
- sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
- ;;
- 'intelpod5' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/10.5.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.5.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
- # Provide the gateway MAC to route the traffic externally.
- sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
- ;;
'attvirpod1' )
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
esac
echo "... Deployment Started ...."
- juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
- juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"
+ juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
+ juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"
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
-cp maas/deployment.yaml ./deployment.yaml
-
#first parameter should be custom and second should be either
# absolute location of file (including file name) or url of the
# file to download.
cp ../labconfig/default/deployment.yaml ./
cp ../labconfig/default/labconfig.yaml ./
fi
- labname=`grep "lab_location" labconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
+ labname=`grep "maas_name" deployment.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
else
case "$1" in
'intelpod5' )
done
}
-#convert labconfig file to deployment.yaml to consume by MAAS.
-#python deploy.py
-
#just make sure the ssh keys added into maas for the current user
sed --i "s@/home/ubuntu@$HOME@g" ./deployment.yaml
sed --i "s@qemu+ssh://ubuntu@qemu+ssh://$USER@g" ./deployment.yaml
+cp ./deployment.yaml ~/.juju/
+
sudo maas-deployer -c deployment.yaml -d --force
sudo chown $USER:$USER environments.yaml
}\
}
+opnfvcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':''}
-opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:maas/stable")
-opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:juju/stable")
+opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:maas/stable")
+opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:juju/stable")
# lets modify the maas general settings:
ethbrAdmin = getFromDict(labcfg, ["opnfv","spaces",c,"bridge"])
brgway = getFromDict(labcfg, ["opnfv","spaces",c,"gateway"])
tmpcidr = brcidr[:-4]
+ opnfvcfg["opnfv"]["admNetwork"]=tmpcidr+"2"
nodegroup={"device": "eth"+str(y), "ip": tmpcidr+"5","subnet_mask": "255.255.255.0", \
"broadcast_ip": tmpcidr+"255", "router_ip": brgway,\
' address '+ipaddress+'\n'
' netmask 255.255.255.0\n')
opnfvcfg["demo-maas"]["juju-bootstrap"]["interfaces"].append("bridge="+brname+",model=virtio")
+ if brtype == "data":
+ opnfvcfg["opnfv"]["dataNetwork"]=brcidr
c=c+1
c=c+1
+opnfvcfg["opnfv"]["floating-ip-range"]=labcfg["lab"]["racks"][0]["floating-ip-range"]
+opnfvcfg["opnfv"]["ext-port"]=labcfg["lab"]["racks"][0]["ext-port"]
+
with open('deployment.yaml', 'wa') as opnfvf:
yaml.dump(opnfvcfg, opnfvf, default_flow_style=False)
+++ /dev/null
-#!/bin/sh -ex
-
-distro=$distro
-mkdir -p $distro
-
-# openstack
-bzr branch lp:~openstack-charmers/charms/$distro/ceilometer/next $distro/ceilometer
-bzr branch lp:~openstack-charmers/charms/$distro/ceilometer-agent/next $distro/ceilometer-agent
-bzr branch lp:~openstack-charmers/charms/$distro/ceph/next $distro/ceph
-bzr branch lp:~openstack-charmers/charms/$distro/ceph-osd/next $distro/ceph-osd
-bzr branch lp:~openstack-charmers/charms/$distro/ceph-radosgw/next $distro/ceph-radosgw
-bzr branch lp:~openstack-charmers/charms/$distro/cinder/next $distro/cinder
-bzr branch lp:~openstack-charmers/charms/$distro/cinder-ceph/next $distro/cinder-ceph
-bzr branch lp:~openstack-charmers/charms/$distro/glance/next $distro/glance
-bzr branch lp:~narindergupta/charms/$distro/promise/trunk $distro/promise
-bzr branch lp:~openstack-charmers/charms/$distro/keystone/next $distro/keystone
-bzr branch lp:~openstack-charmers/charms/$distro/percona-cluster/next $distro/percona-cluster
-bzr branch lp:~openstack-charmers/charms/$distro/neutron-api/next $distro/neutron-api
-bzr branch lp:~openstack-charmers/charms/$distro/neutron-gateway/next $distro/neutron-gateway
-bzr branch lp:~openstack-charmers/charms/$distro/neutron-openvswitch/next $distro/neutron-openvswitch
-bzr branch lp:~openstack-charmers/charms/$distro/nova-cloud-controller/next $distro/nova-cloud-controller
-bzr branch lp:~openstack-charmers/charms/$distro/nova-compute/next $distro/nova-compute
-bzr branch lp:~openstack-charmers/charms/$distro/openstack-dashboard/next $distro/openstack-dashboard
-bzr branch lp:~openstack-charmers/charms/$distro/rabbitmq-server/next $distro/rabbitmq-server
-bzr branch lp:~openstack-charmers/charms/$distro/hacluster/next $distro/hacluster
-bzr branch lp:~openstack-charmers/charms/$distro/heat/next $distro/heat
-bzr branch lp:~opnfv-team/charms/$distro/haproxy/trunk $distro/haproxy
-
-# Controller specific charm
-bzr branch lp:~sdn-charmers/charms/$distro/keepalived/trunk $distro/keepalived
-bzr branch lp:~stub/charms/$distro/cassandra/noauthentication $distro/cassandra-noauthentication
-bzr branch lp:~sdn-charmers/charms/$distro/contrail-analytics/trunk $distro/contrail-analytics
-bzr branch lp:~sdn-charmers/charms/$distro/contrail-configuration/trunk $distro/contrail-configuration
-bzr branch lp:~sdn-charmers/charms/$distro/contrail-control/trunk $distro/contrail-control
-bzr branch lp:~sdn-charmers/charms/$distro/contrail-webui/trunk $distro/contrail-webui
-bzr branch lp:~charmers/charms/precise/zookeeper/trunk src/charms/precise/zookeeper
-bzr branch lp:~opnfv-team/charms/$distro/neutron-api-contrail/trunk $distro/neutron-api-contrail
-bzr branch lp:~opnfv-team/charms/$distro/neutron-contrail/trunk $distro/neutron-contrail
-