Add ceilometer client in devstack

Ceilometer client CLI is helpful to develop ceilometer related code. Add
it to devstack also involve more developer to use it.

Change-Id: I4147e50c00cb520ec15d63a0c34524ba8cb6654f
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
diff --git a/lib/ceilometer b/lib/ceilometer
index 76ab254..c31fcb9 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -29,6 +29,7 @@
 
 # Set up default directories
 CEILOMETER_DIR=$DEST/ceilometer
+CEILOMETERCLIENT_DIR=$DEST/python-ceilometerclient
 CEILOMETER_CONF_DIR=/etc/ceilometer
 CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
 CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api
@@ -46,6 +47,11 @@
     mongo ceilometer --eval "db.dropDatabase();"
 }
 
+# configure_ceilometerclient() - Set config files, create data dirs, etc
+function configure_ceilometerclient() {
+    setup_develop $CEILOMETERCLIENT_DIR
+}
+
 # configure_ceilometer() - Set config files, create data dirs, etc
 function configure_ceilometer() {
     setup_develop $CEILOMETER_DIR
@@ -87,6 +93,11 @@
     git_clone $CEILOMETER_REPO $CEILOMETER_DIR $CEILOMETER_BRANCH
 }
 
+# install_ceilometerclient() - Collect source and prepare
+function install_ceilometerclient() {
+    git_clone $CEILOMETERCLIENT_REPO $CEILOMETERCLIENT_DIR $CEILOMETERCLIENT_BRANCH
+}
+
 # start_ceilometer() - Start running processes, including screen
 function start_ceilometer() {
     screen_it ceilometer-acompute "cd $CEILOMETER_DIR && sg libvirtd \"$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF\""
diff --git a/stack.sh b/stack.sh
index 9f734b9..247b860 100755
--- a/stack.sh
+++ b/stack.sh
@@ -773,6 +773,7 @@
     install_cinder
 fi
 if is_service_enabled ceilometer; then
+    install_ceilometerclient
     install_ceilometer
 fi
 if is_service_enabled tempest; then
@@ -1218,6 +1219,7 @@
 if is_service_enabled ceilometer; then
     echo_summary "Configuring Ceilometer"
     configure_ceilometer
+    configure_ceilometerclient
     echo_summary "Starting Ceilometer"
     start_ceilometer
 fi
diff --git a/stackrc b/stackrc
index 0e84db8..4e03a2f 100644
--- a/stackrc
+++ b/stackrc
@@ -33,6 +33,10 @@
 CEILOMETER_REPO=${GIT_BASE}/openstack/ceilometer.git
 CEILOMETER_BRANCH=master
 
+# ceilometer client library
+CEILOMETERCLIENT_REPO=${GIT_BASE}/openstack/python-ceilometerclient
+CEILOMETERCLIENT_BRANCH=master
+
 # volume service
 CINDER_REPO=${GIT_BASE}/openstack/cinder
 CINDER_BRANCH=master