Created
April 21, 2015 08:30
-
-
Save muratayusuke/c49d07d364c165c4e1ad to your computer and use it in GitHub Desktop.
itamae sample
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 characters
# apt | |
execute 'sudo apt-get update --fix-missing' | |
# git | |
package 'git' | |
# nginx | |
package 'nginx' | |
directory '/var/log/nginx/myapp' do | |
action :create | |
mode '2755' | |
owner ENV['AWS_SSH_USERNAME'] | |
group ENV['AWS_SSH_USERNAME'] | |
end | |
service 'nginx' do | |
action :enable | |
end | |
template '/etc/nginx/conf.d/myapp.conf' do | |
source 'myapp.conf.erb' | |
notifies :restart, 'service[nginx]', :delayed | |
end | |
# ruby | |
include_recipe 'rbenv::system' | |
remote_file '/etc/profile.d/rbenv.sh' do | |
source 'rbenv.sh' | |
end | |
execute 'install bundler' do | |
command <<-CMD | |
sudo /usr/local/rbenv/bin/rbenv rehash | |
sudo /usr/local/rbenv/shims/gem install bundler | |
sudo /usr/local/rbenv/bin/rbenv rehash | |
CMD | |
end | |
# mysql2 | |
package 'libmysqld-dev' | |
package 'mysql-client-core-5.6' | |
# precompile | |
package 'nodejs' | |
# timezone | |
execute 'set timezone' do | |
command <<-CMD | |
sudo echo "Asia/Tokyo" > /etc/timezone | |
sudo dpkg-reconfigure -f noninteractive tzdata | |
sudo service cron restart | |
CMD | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment