summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-02-04 05:04:28 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2017-02-04 05:04:28 -0600
commit94a8edadc9581d3271a19a69648784aee95b3a5e (patch)
treea5ae25e0a262e080f4f26ef778ac0a52a1ac6ee9 /ci
parent2744c52b2a708a5a57f264f57f2fffe09dce4831 (diff)
modfiied to take care of using juju 2.1-beta4. Will switch once
get the final confirmation of release. Change-Id: Id5964a5fd458df9c0486051dd3c6fbbd2abaa7bd Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/03-maasdeploy.sh32
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml16
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/odl.yaml16
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml16
-rw-r--r--ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml16
5 files changed, 84 insertions, 12 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index 2dd0c269..425116c2 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -10,16 +10,19 @@ if [ ! -e $HOME/.ssh/id_rsa ]; then
fi
#install the packages needed
-sudo apt-add-repository ppa:juju/stable -y
+sudo apt-add-repository ppa:juju/dev -y
sudo apt-add-repository ppa:maas/stable -y
sudo apt-add-repository cloud-archive:newton -y
sudo apt-get update -y
-sudo apt-get dist-upgrade -y
-sudo apt-get install openssh-server bzr git juju virtinst qemu-kvm libvirt-bin \
+#sudo apt-get dist-upgrade -y
+sudo apt-get install openssh-server bzr git virtinst qemu-kvm libvirt-bin \
maas maas-region-controller python-pip python-psutil python-openstackclient \
python-congressclient gsutil charm-tools pastebinit python-jinja2 sshpass \
openssh-server vlan ipmitool jq -y
+wget https://launchpad.net/~juju/+archive/ubuntu/devel/+files/juju-2.0_2.1~beta4-0ubuntu1~16.04.1~juju1_amd64.deb
+sudo dpkg -i juju-2.0_2.1~beta4-0ubuntu1~16.04.1~juju1_amd64.deb
+
sudo pip install --upgrade pip
#first parameter should be custom and second should be either
@@ -320,7 +323,7 @@ addnodes(){
done
if [ "$virtinstall" -eq 1 ]; then
- ntew=virbr0
+ ntew=" --network bridge=virbr0,model=virtio"
else
brid=`brctl show | grep 8000 | cut -d "8" -f 1 | tr "\n" " " | tr "\t" " " | tr -s " "`
@@ -328,6 +331,8 @@ addnodes(){
for feature in $brid; do
if [ "$feature" == "" ]; then
netw=$netw
+ elif [ "$feature" == "virbr0" ]; then
+ netw=$netw
else
netw=$netw" --network bridge="$feature",model=virtio"
fi
@@ -338,11 +343,12 @@ addnodes(){
cirrus --arch x86_64 --disk size=20,format=qcow2,bus=virtio,io=native,pool=default \
$netw --boot network,hd,menu=off --noautoconsole \
--vnc --print-xml | tee bootstrap
+
if [ "$virtinstall" -eq 1 ]; then
bootstrapmac=`grep "mac address" bootstrap | head -1 | cut -d '"' -f 2`
else
bootstrapmac=""
- bootstrapmacs=`grep "mac address" bootstrap| cut -d "'" -f 2`
+ bootstrapmacs=`grep "mac address" bootstrap| cut -d '"' -f 2`
for mac in $bootstrapmacs; do
bootstrapmac=$bootstrapmac" mac_addresses="$mac
done
@@ -353,6 +359,7 @@ addnodes(){
tags='bootstrap' hostname='bootstrap' power_type='virsh' mac_addresses=$bootstrapmac \
power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \
architecture='amd64/generic' power_parameters_power_id='bootstrap'
+
bootstrapid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "bootstrap")[0].system_id')
maas $PROFILE tag update-nodes bootstrap add=$bootstrapid
@@ -361,18 +368,15 @@ addnodes(){
sudo virt-install --connect qemu:///system --name node1-control --ram 8192 --cpu host --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
- --network bridge=virbr0,model=virtio $netw \
- --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node1-control
+ $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node1-control
sudo virt-install --connect qemu:///system --name node2-compute --ram 8192 --cpu host --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
- --network bridge=virbr0,model=virtio $netw \
- --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node2-compute
+ $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node2-compute
sudo virt-install --connect qemu:///system --name node5-compute --ram 8192 --cpu host --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
- --network bridge=virbr0,model=virtio $netw \
- --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node5-compute
+ $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node5-compute
node1controlmac=`grep "mac address" node1-control | head -1 | cut -d '"' -f 2`
@@ -410,8 +414,12 @@ configuremaas
if [ "$virtinstall" -eq 1 ]; then
enablesubnetanddhcp
fi
+
+# lets sleep for around 5 more minutes to make sure all images are in sync.
+sleep(300)
+
+#lets add the nodes now. Currently works only for virtual deploymnet.
addnodes
-#sudo chown $USER:$USER environments.yaml
echo "... Deployment of maas finish ...."
diff --git a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
index 644de692..1cfa1e4f 100644
--- a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
@@ -1,6 +1,22 @@
mongodb:
charm: ./{{ ubuntu.release }}/mongodb
num_units: 1
+{% if os.service.bindings %}
+ bindings:
+ shared-db: internal-api
+ internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+ public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+ admin: admin-api
+{% else %}
+ admin: internal-api
+{% endif %}
+{% else %}
+ admin: internal-api
+ public: internal-api
+{% endif %}
+{% endif %}
to:
- "lxd:nodes/0"
ceilometer:
diff --git a/ci/config_tpl/juju2/bundle_tpl/odl.yaml b/ci/config_tpl/juju2/bundle_tpl/odl.yaml
index 27e22cbd..2be64b15 100644
--- a/ci/config_tpl/juju2/bundle_tpl/odl.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/odl.yaml
@@ -1,6 +1,22 @@
odl-controller:
charm: ./{{ ubuntu.release }}/odl-controller
num_units: 1
+{% if os.service.bindings %}
+ bindings:
+ shared-db: internal-api
+ internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+ public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+ admin: admin-api
+{% else %}
+ admin: internal-api
+{% endif %}
+{% else %}
+ admin: internal-api
+ public: internal-api
+{% endif %}
+{% endif %}
options:
install-url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.2-Boron-SR2/distribution-karaf-0.5.2-Boron-SR2.tar.gz"
{% if os.network.sfc %}
diff --git a/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml b/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
index aef9260b..28ad55c4 100644
--- a/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
@@ -1,6 +1,22 @@
openstack-dashboard:
charm: "./{{ ubuntu.release }}/openstack-dashboard"
num_units: {{ unit_qty() }}
+{% if os.service.bindings %}
+ bindings:
+ shared-db: internal-api
+ internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+ public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+ admin: admin-api
+{% else %}
+ admin: internal-api
+{% endif %}
+{% else %}
+ admin: internal-api
+ public: internal-api
+{% endif %}
+{% endif %}
options:
openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
secret: admin
diff --git a/ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml b/ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml
index d2372871..92bf37d1 100644
--- a/ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml
+++ b/ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml
@@ -1,6 +1,22 @@
opnfv-promise:
charm: ./{{ ubuntu.release }}/promise
num_units: 1
+{% if os.service.bindings %}
+ bindings:
+ shared-db: internal-api
+ internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+ public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+ admin: admin-api
+{% else %}
+ admin: internal-api
+{% endif %}
+{% else %}
+ admin: internal-api
+ public: internal-api
+{% endif %}
+{% endif %}
to:
- "lxd:nodes/0"
{# Empty block to avoid bad block trim #}