Created
October 30, 2016 22:09
-
-
Save kpettijohn/e816a86b10495ee6cf7070872e11c1e6 to your computer and use it in GitHub Desktop.
Revisions
-
kpettijohn created this gist
Oct 30, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ #!/bin/bash # Install # - Consul agent # - Prometheus node_exporter # - Jenkins curl -O -L -s https://github.com/prometheus/node_exporter/releases/download/v0.13.0-rc.1/node_exporter-0.13.0-rc.1.linux-amd64.tar.gz curl -O -L -s https://releases.hashicorp.com/consul/0.7.0/consul_0.7.0_linux_amd64.zip unzip consul_0.7.0_linux_amd64.zip mv consul /usr/bin/consul tar xf node_exporter-0.13.0-rc.1.linux-amd64.tar.gz mv node_exporter-0.13.0-rc.1.linux-amd64/node_exporter /usr/local/bin/node_exporter mkdir -p /var/node_exporter/textfile mkdir -p /etc/consul /etc/consul.d /var/consol/data # Cleanup rm -rf node_exporter-0.13.0-rc.1.linux-amd64.tar.gz node_exporter-0.13.0-rc.1.linux-amd64/ consul_0.7.0_linux_amd64.zip # Install Jenkins yum install java-1.8.0-openjdk.x86_64 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key yum install jenkins systemctl enable jenkins systemctl start jenkins This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ [Unit] Description=Consul agent - client After=syslog.target network.target [Service] Type=simple ExecStart=/usr/bin/consul agent -config-dir /etc/consul -config-dir /etc/consul.d -join 10.0.0.10 -join 10.0.0.11 -join 10.0.0.12 [Install] WantedBy=multi-user.target This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ { "datacenter": "hbc", "data_dir": "/var/consul/data", "encrypt": "my_secret_key", "log_level": "info", "enable_syslog": true } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ { "service": { "name": "jenkins", "tags": ["master"], "address": "127.0.0.1", "port": 8080, "enableTagOverride": false, "checks": [ { "http": "http://localhost:8080/login", "interval": "10s" } ] } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ [Unit] Description=Prometheus node_exporter - Exporter for machine metrics After=syslog.target network.target [Service] Type=simple ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/node_exporter/textfile --collectors.enabled systemd,textfile,conntrack,diskstats,entropy,filefd,filesystem,loadavg,meminfo,netdev,netstat,stat,time,vmstat [Install] WantedBy=multi-user.target