summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-07-26 00:05:54 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-07-27 09:32:35 -0500
commitadb9288685ac205decce04a1d8eba4c9989bcc48 (patch)
tree454e694c473205c15b4477d8dafba1f005702a4c /ci
parentb4f5b3523fe5740fb384856180d3c43f4faedc7d (diff)
adding script to enable juju on openstack.
Change-Id: If259c8ad3530cc8d67499d406bd96abdd98b46f0 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/01-deploybundle.sh10
-rwxr-xr-xci/deploy.sh5
-rwxr-xr-xci/smoketest.sh45
3 files changed, 14 insertions, 46 deletions
diff --git a/ci/01-deploybundle.sh b/ci/01-deploybundle.sh
index 6e2005df..10be1697 100755
--- a/ci/01-deploybundle.sh
+++ b/ci/01-deploybundle.sh
@@ -80,6 +80,14 @@ echo "... Deployment Started ...."
juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"-nodes
# seeing issue related to number of open files.
-juju run --service nodes 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances'
+# juju run --service nodes 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances'
+
+count=`juju status nodes --format=short | grep nodes | wc -l`
+
+c=0
+while [ $c -lt $count ]; do
+ juju ssh nodes/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances'
+ let c+=1
+done
juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2" || true
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 4d5f61e5..a4ef3b2c 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -106,6 +106,11 @@ createresource() {
#copy the files and create extra resources needed for HA deployment
# in case of default VM labs.
deploy() {
+
+ if [ ! -f ./environments.yaml ] && [ -e ~/.juju/environments.yaml ]; then
+ cp ~/.juju/environments.yaml ./environments.yaml
+ fi
+
#copy the script which needs to get deployed as part of ofnfv release
echo "...... deploying now ......"
echo " " >> environments.yaml
diff --git a/ci/smoketest.sh b/ci/smoketest.sh
deleted file mode 100755
index d65f7b5d..00000000
--- a/ci/smoketest.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash -ex
-
-. ./cloud/admin-openrc
-
-##enable extra stuff only if testing manually
-
-neutron security-group-rule-create --direction ingress --ethertype IPv4 --protocol icmp --remote-ip-prefix 0.0.0.0/0 default
-neutron security-group-rule-create --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 22 --port-range-max 22 --remote-ip-prefix 0.0.0.0/0 default
-
-wget -P /tmp/images http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
-openstack image create --file /tmp/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare "cirros-0.3.4-x86_64"
-wget -P /tmp/images http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img
-openstack image create --file /tmp/images/trusty-server-cloudimg-amd64-disk1.img --disk-format qcow2 --container-format bare "ubuntu-trusty-daily"
-#wget -P /tmp/images http://cloud-images.ubuntu.com/trusty/current/xenial-server-cloudimg-amd64.tar.gz
-#openstack image create --file /tmp/images/xenial-server-cloudimg-amd64.tar.gz --container-format bare --disk-format raw "xenial-server-cloudimg-amd64"
-
-rm -rf /tmp/images
-
-## import key pair
-openstack project create --description "Demo Tenant" demo
-openstack user create --project demo --password demo --email demo@demo.demo demo
-
-openstack keypair create --public-key ~/.ssh/id_rsa.pub ubuntu-keypair
-
-## create vm network
-neutron net-create demo-net
-neutron subnet-create demo-net 10.20.5.0/24 --name demo-subnet --gateway 10.20.5.1 --enable-dhcp --allocation-pool start=10.20.0.5,end=10.20.0.254 --dns-nameserver 8.8.8.8
-neutron router-create demo-router
-neutron router-gateway-set demo-router ext-net
-neutron router-interface-add demo-router subnet=demo-subnet
-
-# add a delay since the previous command takes the neutron-api offline for a while (?)
-sleep 30
-
-## create pool of floating ips
-i=0
-while [ $i -ne 3 ]; do
- flip=`neutron floatingip-create ext-net`
- i=$((i + 1))
-done
-
-##http://docs.openstack.org/juno/install-guide/install/apt/content/launch-instance-neutron.html
- netid=`neutron net-show demo-net -c id -f value`
- nova boot --flavor m1.small --image cirros-0.3.4-x86_64 --nic net-id=$netid --security-group default --key-name ubuntu-keypair demo-instance1
- nova floating-ip-associate demo-instance1 $flip