Skip to content

Instantly share code, notes, and snippets.

@yesoreyeram
Last active October 18, 2018 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yesoreyeram/845764ae7ab40f931813e0666aeee9e1 to your computer and use it in GitHub Desktop.
Save yesoreyeram/845764ae7ab40f931813e0666aeee9e1 to your computer and use it in GitHub Desktop.
Graphite Installation with Puppet
#/bin/bash
### Install Puppet and Modules
yum check-update -y
rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm
yum check-update -y
yum groupinstall "Development Tools" -y
yum install ruby nc puppet-agent facter -y
ln -sf /opt/puppetlabs/bin/puppet /usr/bin/puppet
ln -sf /opt/puppetlabs/bin/facter /usr/bin/facter
mkdir -p /etc/puppet/{modules,data}
puppet module install --target-dir /etc/puppet/modules dwerder-graphite --version 7.3.0
### Puppet configuration
cat > /etc/puppet/hiera.yaml <<EOF
version: 5
defaults:
datadir: /etc/puppet/data
hierarchy:
- name: "YAML data: environments, stages, roles, common"
data_hash: yaml_data
paths:
- common.yaml
EOF
cat > /etc/puppet/data/common.yaml <<EOF
graphite::gr_timezone : "Europe/London"
EOF
### Apply Puppet
puppet apply --hiera_config=/etc/puppet/hiera.yaml --modulepath=/etc/puppet/modules/ -e "include graphite"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment