Skip to content

Instantly share code, notes, and snippets.

@masutaka
Last active December 21, 2015 01:19
Show Gist options
  • Select an option

  • Save masutaka/6227256 to your computer and use it in GitHub Desktop.

Select an option

Save masutaka/6227256 to your computer and use it in GitHub Desktop.
A chef recipe of GrowthForecast
requires 'GrowthForecast';
directory '/home/masutaka/growthforecast' do
owner 'masutaka'
group 'masutaka'
mode 0755
action :create
end
cookbook_file '/home/masutaka/growthforecast/cpanfile' do
owner 'masutaka'
group 'masutaka'
mode 0644
end
bash 'Install packages depending RRDTool' do
code <<-EOC
apt-get -y build-dep rrdtool
EOC
creates '/home/masutaka/growthforecast/local/bin/growthforecast.pl'
end
bash 'GrowthForcast install' do
user 'masutaka'
group 'masutaka'
code <<-EOC
export PATH=$HOME/.plenv/bin:$PATH
eval "$(plenv init -)"
cd $HOME/growthforecast
plenv exec carton install
EOC
creates '/home/masutaka/growthforecast/local/bin/growthforecast.pl'
end
@masutaka

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment