summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-08-08 05:18:47 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2017-08-08 05:20:04 -0500
commit557a376940c3c0ce3ed47850e3604a3301340bdc (patch)
treeaebcfeb9a31da9c010586782c9d91a9b41f45288 /ci
parentba4effc7aa09a44d0a19a4a652eb92b6c7b48143 (diff)
adding openbaton requirement for relationship. and modify the
check status logic. Change-Id: I0242005c0de8bb2d57f2db75c22c63307c4cbc91 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/02-deploybundle.sh15
-rwxr-xr-xci/deploy.sh15
2 files changed, 21 insertions, 9 deletions
diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh
index b24b728a..496707db 100755
--- a/ci/02-deploybundle.sh
+++ b/ci/02-deploybundle.sh
@@ -25,18 +25,23 @@ fi
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
+ waitstatus=$1
retval=0
timeoutiter=0
+
+ echo -n "executing the reltionship within charms ."
while [ $retval -eq 0 ]; do
- sleep 30
- juju status > status.txt
- if [ "$(grep -c "waiting" status.txt )" -ge 3 ]; then
- echo " still waiting for machines ..."
+ if juju status | grep -q $waitstatus; then
+ echo -n '.'
if [ $timeoutiter -ge 240 ]; then
+ echo 'timed out'
retval=1
+ else
+ sleep 30
fi
timeoutiter=$((timeoutiter+1))
else
+ echo 'done'
retval=1
fi
done
@@ -164,7 +169,7 @@ else
# with JUJU 2.0 bundles has to be deployed only once.
juju deploy bundles.yaml --debug
sleep 120
- check_status
+ check_status allocating
# seeing issue related to number of open files.
count=`juju status nodes --format=short | grep nodes | wc -l`
c=0
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 207482e2..b0aec737 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -175,17 +175,19 @@ deploy() {
#check whether charms are still executing the code even juju-deployer says installed.
check_status() {
+ waitstatus=$1
retval=0
timeoutiter=0
echo -n "executing the reltionship within charms ."
while [ $retval -eq 0 ]; do
- sleep 30
- if juju status | grep -q "executing"; then
+ if juju status | grep -q $waitstatus; then
echo -n '.'
if [ $timeoutiter -ge 120 ]; then
echo 'timed out'
retval=1
+ else
+ sleep 30
fi
timeoutiter=$((timeoutiter+1))
else
@@ -198,13 +200,14 @@ check_status() {
juju expose ceph-radosgw || true
#juju ssh ceph/0 \ 'sudo radosgw-admin user create --uid="ubuntu" --display-name="Ubuntu Ceph"'
fi
+
echo "...... deployment finishing ......."
-}
+ }
echo "...... deployment started ......"
deploy
-check_status
+check_status executing
echo "...... deployment finished ......."
@@ -254,6 +257,10 @@ if ([ $opnfvmodel == "openstack" ]); then
sudo ../juju/get-cloud-images || true
../juju/joid-configure-openstack || true
+ if grep -q 'openbaton' bundles.yaml; then
+ juju add-relation openbaton keystone
+ fi
+
elif ([ $opnfvmodel == "kubernetes" ]); then
./k8.sh
fi