Install Influxdb.

Currently the server is not bind to any IP but the nodes has no public
IP.

Change-Id: Iee1919efda6d8f7e83c02c454faa24369d42a55d
This commit is contained in:
Guillaume Thouvenin 2015-03-17 11:35:22 +01:00
parent 64da803326
commit ae55da79b4
3 changed files with 62 additions and 5 deletions

View File

@ -0,0 +1,9 @@
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
if $fuel_settings['influxdb_grafana']['node_name'] == $fuel_settings['user_node_name'] {
class { 'influxdb':
install_from_repository => true,
}
}

View File

@ -1,5 +1,47 @@
#!/bin/bash
set -eux
# Add here any the actions which are required before plugin build
# like packages building, packages downloading from mirrors and so on.
# The script should return 0 if there were no errors.
ROOT="$(dirname `readlink -f $0`)"
MODULES="${ROOT}"/deployment_scripts/puppet/modules
RPM_REPO="${ROOT}"/repositories/centos/
DEB_REPO="${ROOT}"/repositories/ubuntu/
# Puppet manifests for influx
INFLUXDB_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/jdowning-influxdb-0.3.0.tar.gz"
STAGING_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/nanliu-staging-1.0.3.tar.gz"
# Puppet manifests from fuel-lib
FUEL_LIB_VERSION="6.0"
FUEL_LIB_TARBALL_URL="https://github.com/stackforge/fuel-library/archive/${FUEL_LIB_VERSION}.tar.gz"
# Downloads needed RPM or DEB packages
function download {
case "$1" in
deb) REPO=$DEB_REPO;;
rpm) REPO=$RPM_REPO;;
esac
shift
while [ $# -gt 0 ]; do
FILE=$(basename $1)
wget -qO - $1 > $REPO/$FILE
shift
done
}
download deb https://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb
download rpm https://s3.amazonaws.com/influxdb/influxdb-latest-1.x86_64.rpm
# Install puppet manifests
# Clean-up first
rm -rf ${MODULES}/{influxdb,staging,stdlib,inifile}
mkdir -p ${MODULES}/{influxdb,staging}
# Include influxdb manifest from puppetlabs
wget -qO- "${INFLUXDB_TARBALL_URL}" | tar -C "${MODULES}/influxdb" --strip-components=1 -xz
wget -qO- "${STAGING_TARBALL_URL}" | tar -C "${MODULES}/staging" --strip-components=1 -xz
# Include dependent manifests from fuel-library
wget -qO- "${FUEL_LIB_TARBALL_URL}" | \
tar -C "${MODULES}" --strip-components=3 -zxvf - \
fuel-library-${FUEL_LIB_VERSION}/deployment/puppet/{stdlib,inifile}

View File

@ -8,7 +8,7 @@
timeout: 720
# TODO: Configure disks
#
# "reboot" task reboots the nodes and waits until they get back online
# - role: 'base-os'
# stage: pre_deployment
@ -16,6 +16,12 @@
# parameters:
# timeout: 600
# TODO: install influxdb
- role: ['base-os']
stage: post_deployment
type: puppet
parameters:
puppet_manifest: puppet/manifests/influxdb.pp
puppet_modules: puppet/modules
timeout: 600
# TODO: install grafana