barometer: move to opnfv puppet repo
[apex.git] / build / barometer-install.sh
index bde7479..ca9b79c 100755 (executable)
@@ -17,6 +17,7 @@
 # Get and install packages needed for Barometer service.
 # These are: collectd rpm's and dependencies, collectd-openstack-plugins,
 # puppet-barometer module.
+source ./variables.sh
 
 # Versions/branches
 COLLECTD_OPENSTACK_PLUGINS_BRANCH="stable/pike"
@@ -28,7 +29,7 @@ GETFLAG="--no-check-certificate"
 # Locations of repos
 ARTIFACTS_BAROM="artifacts.opnfv.org/barometer"
 COLLECTD_OPENSTACK_REPO="https://github.com/openstack/collectd-ceilometer-plugin"
-PUPPET_BAROMETER_REPO="https://github.com/johnhinman/puppet-barometer"
+PUPPET_BAROMETER_REPO="https://github.com/opnfv/barometer.git"
 
 # upload barometer packages tar, extract, and install
 
@@ -86,7 +87,8 @@ function barometer_pkgs {
 
   # get the barometer puppet module and tar it
   rm -rf puppet-barometer
-  git clone $PUPPET_BAROMETER_REPO
+  git clone $PUPPET_BAROMETER_REPO puppet-barometer
+  cd puppet-barometer
   pushd puppet-barometer/ > /dev/null
   git archive --format=tar.gz HEAD > ${BUILD_DIR}/puppet-barometer.tar.gz
   popd > /dev/null
@@ -101,7 +103,7 @@ function barometer_pkgs {
   # Upload tar files to image
   # untar collectd packages
   # install dependencies
-  LIBGUESTFS_BACKEND=direct virt-customize \
+  LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
     --upload ${BUILD_DIR}/collectd.tar.gz:/opt/ \
     --upload ${BUILD_DIR}/collectd-openstack-plugins.tar.gz:/opt/ \
     --upload ${BUILD_DIR}/puppet-barometer.tar.gz:/etc/puppet/modules/ \
@@ -111,12 +113,12 @@ function barometer_pkgs {
     --install libvirt,libvirt-devel,gcc \
     -a $OVERCLOUD_IMAGE
 
-  LIBGUESTFS_BACKEND=direct virt-customize \
+  LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
     --run-command 'python3.4 /opt/get-pip.py' \
     --run-command 'pip3 install requests libvirt-python pbr babel future six' \
     -a $OVERCLOUD_IMAGE
 
-  LIBGUESTFS_BACKEND=direct virt-customize \
+  LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
     --run-command "yum install -y \
     /opt/libcollectdclient-${SUFFIX} \
     /opt/libcollectdclient-devel-${SUFFIX} \
@@ -136,7 +138,7 @@ function barometer_pkgs {
   # install collectd-openstack-plugins
   # install puppet-barometer module
   # make directories for config files and mibs
-  LIBGUESTFS_BACKEND=direct virt-customize \
+  LIBGUESTFS_BACKEND=direct $VIRT_CUSTOMIZE \
     --run-command 'mkdir /opt/stack/collectd-openstack' \
     --run-command "tar xfz /opt/collectd-openstack-plugins.tar.gz -C /opt/stack/collectd-openstack" \
     --run-command "cd /etc/puppet/modules/ && mkdir barometer && \