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:
parent
4a9a579ea3
commit
412a0953f3
9
deployment_scripts/puppet/manifests/influxdb.pp
Normal file
9
deployment_scripts/puppet/manifests/influxdb.pp
Normal 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,
|
||||
}
|
||||
|
||||
}
|
@ -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 http://get.influxdb.org/influxdb_0.9.0-rc12_amd64.deb
|
||||
download rpm http://get.influxdb.org/influxdb-0.9.0_rc12-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}
|
||||
|
10
tasks.yaml
10
tasks.yaml
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user