From 5159209c95c6f3bfa6f5edac9d8fa2d6c9f83e88 Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Fri, 8 Jul 2016 17:44:36 -0500 Subject: modfied to use the trusty as extra feature. Change-Id: I3fe1f9bcae7c4458116202ae14a059c3fbcfcb0e Signed-off-by: Narinder Gupta --- ci/01-deploybundle.sh | 90 +++---------------------------------------- ci/02-maasdeploy.sh | 3 +- ci/bundle_tpl/odl.yaml | 8 ++++ ci/deploy.sh | 2 +- ci/genBundle.py | 12 ++++++ ci/maas/sshkeys/DominoKey.pub | 1 + 6 files changed, 30 insertions(+), 86 deletions(-) create mode 100644 ci/maas/sshkeys/DominoKey.pub diff --git a/ci/01-deploybundle.sh b/ci/01-deploybundle.sh index e53f3f50..6c8e9b80 100755 --- a/ci/01-deploybundle.sh +++ b/ci/01-deploybundle.sh @@ -12,23 +12,6 @@ set -ex osdomname='' -case "$1" in - 'nonha' ) - cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml - ;; - 'ha' ) - cp $4/juju-deployer/ovs-$4-ha.yaml ./bundles.yaml - ;; - 'tip' ) - cp $4/juju-deployer/ovs-$4-tip.yaml ./bundles.yaml - cp common/source/* ./ - sed -i -- "s|branch: master|branch: stable/$2|g" ./*.yaml - ;; - * ) - cp $4/juju-deployer/ovs-$4-nonha.yaml ./bundles.yaml - ;; -esac - #check whether charms are still executing the code even juju-deployer says installed. check_status() { retval=0 @@ -55,22 +38,10 @@ 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 "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` - sed --i "s@osd-devices: /srv@osd-devices: $cephdisk@g" ./bundles.yaml osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` - if [ "$osdomname" != "''" ]; then - sed --i "s@#use-internal-endpoints: true@use-internal-endpoints: true@g" ./bundles.yaml - sed --i "s@#endpoint-type: internalURL@endpoint-type: internalURL@g" ./bundles.yaml - sed --i "s@#os-public-hostname: pod.maas@os-public-hostname: api.$osdomname@g" ./bundles.yaml - sed --i "s@#console-proxy-ip: pod.maas@console-proxy-ip: $osdomname@g" ./bundles.yaml - fi fi fi @@ -82,10 +53,6 @@ case "$3" in 'ravellodemopod' ) sed -i -- 's/#ext-port: "eth1"/ext-port: "eth2"/g' ./bundles.yaml ;; - 'default' ) - sed -i -- 's/10.4.1.1/192.168.122.1/g' ./bundles.yaml - sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml - ;; esac # lets put the if seperateor as "," as this will save me from world. @@ -97,65 +64,20 @@ for feature in $5; do else fea=$fea"_"$feature fi - case "$feature" in - 'ipv6' ) - sed -i -- 's/#prefer-ipv6: true/prefer-ipv6: true/g' ./bundles.yaml - ;; - 'dvr' ) - sed -i -- 's/#enable-dvr: true/enable-dvr: true/g' ./bundles.yaml - sed -i -- 's/#l2-population: true/l2-population: true/g' ./bundles.yaml - ;; - 'sfc' ) - sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-sfc"/g' ./bundles.yaml - ;; - 'vpn' ) - sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-vpn"/g' ./bundles.yaml - ;; - 'odl_l3' ) - sed -i -- 's/profile: "openvswitch-odl-Be"/profile: "openvswitch-odl-beryllium-l3"/g' ./bundles.yaml - ;; - 'dpdk' ) - sed -i -- 's/#enable-dpdk: true/enable-dpdk: true/g' ./bundles.yaml - sed -i -- 's/#hugepages: "50%"/hugepages: "50%"/g' ./bundles.yaml - ;; - 'lxd' ) - sed -i -- 's/#- - nova-compute:lxd/- - nova-compute:lxd/g' ./bundles.yaml - sed -i -- 's/#- lxd:lxd/- lxd:lxd/g' ./bundles.yaml - sed -i -- 's/#virt-type: lxd/virt-type: lxd/g' ./bundles.yaml - # adding the lxd subordinate charm - echo " lxd:" >> ./bundles.yaml - echo " charm: local:xenial/lxd" >> ./bundles.yaml - ;; - esac done -#changing the target to the openstack release we want to deploy. -sed -i -- "s|mitaka|$2|g" ./bundles.yaml - #update source if trusty is target distribution -case "$6" in - 'trusty' ) - sed -i -- "s|#source|source|g" ./bundles.yaml - sed -i -- "s|#source-branch:|source-branch:|g" ./bundles.yaml - ;; - 'xenial' ) - #changing the target to the ubuntu distro we want to deploy. - sed -i -- "s|trusty|$6|g" ./bundles.yaml - ;; -esac +var=os-$4-$fea-$1"-"$6"_"$2 if [ "$osdomname" != "''" ]; then - var=os-$4-$fea-$1-publicapi -else - var=os-$4-$fea-$1 + var=$var"_"publicapi fi #lets generate the bundle for all target using genBundle.py python genBundle.py -l deployconfig.yaml -s $var > bundles.yaml echo "... Deployment Started ...." - juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"-nodes - juju ssh nodes/0 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances" - juju ssh nodes/1 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances" - juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2" - #check_status +juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"-nodes +juju ssh nodes/0 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances" +juju ssh nodes/1 "echo 512 | sudo tee /proc/sys/fs/inotify/max_user_instances" +juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2" diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index d19f7d6a..07acfe2a 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -14,7 +14,7 @@ sudo apt-get update -y sudo apt-get dist-upgrade -y sudo apt-get install openssh-server bzr git maas-deployer juju juju-deployer \ maas-cli python-pip python-psutil python-openstackclient \ - python-congressclient gsutil -y + python-congressclient gsutil charm-tools -y #first parameter should be custom and second should be either # absolute location of file (including file name) or url of the @@ -213,6 +213,7 @@ maas maas sshkeys new key="`cat $HOME/.ssh/id_rsa.pub`" #Added the Qtip public to run the Qtip test after install on bare metal nodes. maas maas sshkeys new key="`cat ./maas/sshkeys/QtipKey.pub`" +maas maas sshkeys new key="`cat ./maas/sshkeys/DominoKey.pub`" #adding compute and control nodes VM to MAAS for deployment purpose. if [ "$virtinstall" -eq 1 ]; then diff --git a/ci/bundle_tpl/odl.yaml b/ci/bundle_tpl/odl.yaml index 8705c934..66f2e58a 100644 --- a/ci/bundle_tpl/odl.yaml +++ b/ci/bundle_tpl/odl.yaml @@ -2,7 +2,15 @@ charm: local:{{ ubuntu.release }}/odl-controller options: install-url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.2-Beryllium-SR2/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz" +{% if os.network.sfc %} + profile: "openvswitch-odl-beryllium-vpn" +{% elif os.network.bgpvpn %} + profile: "openvswitch-odl-beryllium-sfc" +{% elif os.network.odll3 %} + profile: "openvswitch-odl-beryllium-l3" +{% else %} profile: "openvswitch-odl-beryllium" +{% endif %} http-proxy: "http://squid.internal:3128" https-proxy: "http://squid.internal:3128" to: diff --git a/ci/deploy.sh b/ci/deploy.sh index 0382bb36..5b85b4dd 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -10,7 +10,7 @@ opnfvtype=nonha openstack=mitaka opnfvlab=default opnfvrel=c -opnfvfeature=odl_l2 +opnfvfeature=none opnfvdistro=xenial opnfvarch=amd64 diff --git a/ci/genBundle.py b/ci/genBundle.py index 89f41ce6..8c7d3a3c 100644 --- a/ci/genBundle.py +++ b/ci/genBundle.py @@ -146,6 +146,14 @@ if 'ipv6' in features: config['os']['network']['ipv6'] = True if 'ovs' in features: config['os']['network']['enhanced_ovs'] = True +if 'sfc' in features: + config['os']['network']['sfc'] = True +if 'dpdk' in features: + config['os']['network']['dpdk'] = True +if 'bgpvpn' in features: + config['os']['network']['bgpvpn'] = True +if 'odll3' in features: + config['os']['network']['odll3'] = True # Set beta option from extra if 'publicapi' in extra: @@ -154,6 +162,10 @@ if 'radosgwcluster' in extra: config['os']['beta']['hacluster_ceph_radosgw'] = True if 'hugepages' in extra: config['os']['beta']['huge_pages'] = True +if 'trusty' in extra: + config['ubuntu']['release'] = 'trusty' + if 'liberty' in extra: + config['os']['release'] = 'liberty' # pp(config) diff --git a/ci/maas/sshkeys/DominoKey.pub b/ci/maas/sshkeys/DominoKey.pub new file mode 100644 index 00000000..0a282b7a --- /dev/null +++ b/ci/maas/sshkeys/DominoKey.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPewJw9ezpriINTdlOqLnBqh68ntIl26F0DhF6KdPZDsPDVFvUZ5HxJV1t3yBqQ5JpvUN3c7KEH+wxkEchfkarTL7ekIvUF+Q/0zjmKtBQitertlcyQSpsc8zuvA2h2YYnJWrkCt+obXoWxN2AQv1efkrr+LQuFr9j79ORdpwB7S2d2yDCwOd0R8xxpEfMbiKwNGWMANDnlNr9CoCYhU1JIE4i9xUrbIoDTtfYqVJBVo4jZb6qx9EKY4Srz2hEoL1h7xOOG2XUVhQ50FI6XK540Q1Xa5VXW1+FQPg9ew7uyG1vR4SwWRBlF4CDiSWxo+qXG/ELgosFoucPsriSnRlF kozat@Kozat-MacBook-Pro.local -- cgit 1.2.3-korg