Last active
October 18, 2018 10:59
-
-
Save yesoreyeram/845764ae7ab40f931813e0666aeee9e1 to your computer and use it in GitHub Desktop.
Graphite Installation with Puppet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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