Last active
December 20, 2015 21:09
-
-
Save CharlieSu/6195243 to your computer and use it in GitHub Desktop.
Chef recipe for installing SPM
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
# Author: Charles Sullivan (charles@fullcontact.com) | |
if node.spm[:token] # Will only run if a SPM token is present. | |
apt_repository "sematech" do | |
action :add | |
uri "http://pub-repo.sematext.com/ubuntu" | |
distribution node['lsb']['codename'] | |
components ["main"] | |
key "http://pub-repo.sematext.com/ubuntu/sematext.gpg.key" | |
notifies :run, "execute[apt-get update]", :immediately | |
end | |
package "spm-client" | |
service "spm-monitor" do | |
action :nothing | |
end | |
bash "spm-client-setup-conf.sh" do | |
user "root" | |
cwd "/tmp" | |
code "bash /opt/spm/bin/spm-client-setup-conf.sh #{node.spm[:token]} es standalone" | |
creates "/opt/spm/spm-monitor/conf/spm-monitor-config-#{node.spm[:token]}-default.properties" | |
notifies :restart, "service[spm-monitor]" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment