blob: 6996f346b5c93937b218074ed862f23ff3ba56e3 [file] [log] [blame]
Flaper Fesp06b345e2013-09-04 15:35:47 +02001#!/usr/bin/env bash
2
Malini Kamalambal9504bb32014-08-01 17:41:08 -04003# **zaqar.sh**
Flaper Fesp06b345e2013-09-04 15:35:47 +02004
Malini Kamalambal9504bb32014-08-01 17:41:08 -04005# Sanity check that Zaqar started if enabled
Flaper Fesp06b345e2013-09-04 15:35:47 +02006
7echo "*********************************************************************"
8echo "Begin DevStack Exercise: $0"
9echo "*********************************************************************"
10
11# This script exits on an error so that errors don't compound and you see
12# only the first error that occurred.
13set -o errexit
14
15# Print the commands being run so that we can see the command that triggers
16# an error. It is also useful for following allowing as the install occurs.
17set -o xtrace
18
19
20# Settings
21# ========
22
23# Keep track of the current directory
24EXERCISE_DIR=$(cd $(dirname "$0") && pwd)
25TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
26
27# Import common functions
28source $TOP_DIR/functions
29
30# Import configuration
31source $TOP_DIR/openrc
32
33# Import exercise configuration
34source $TOP_DIR/exerciserc
35
Malini Kamalambal9504bb32014-08-01 17:41:08 -040036is_service_enabled zaqar-server || exit 55
Flaper Fesp06b345e2013-09-04 15:35:47 +020037
Malini Kamalambal9504bb32014-08-01 17:41:08 -040038curl http://$SERVICE_HOST:8888/v1/ 2>/dev/null | grep -q 'queue_name' || die $LINENO "Zaqar API not functioning!"
Flaper Fesp06b345e2013-09-04 15:35:47 +020039
40set +o xtrace
41echo "*********************************************************************"
42echo "SUCCESS: End DevStack Exercise: $0"
43echo "*********************************************************************"