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
#!/usr/bin/env bash | |
echo Starting to provision server with role: $1 | |
echo -e "\nInstalling and bootstrapping chef-solo..." | |
apt-get -y update | |
apt-get --no-install-recommends -y install build-essential ruby ruby-dev rubygems libopenssl-ruby | |
gem install chef ruby-shadow --no-ri --no-rdoc | |
echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/gems/1.8/bin"' > /etc/environment |
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
def package_for_ec2 config, chef | |
require 'json' | |
open "chef/#{config.vm.host_name.split('.')[0]}.json", 'w' do |f| | |
chef.json[:run_list] = chef.run_list | |
f.write chef.json.to_json | |
end | |
end |
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
Vagrant::Config.run do |config| | |
config.vm.define :web do |web| | |
web.vm.box = "precise64" | |
web.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
web.vm.network :hostonly, "192.168.100.10" | |
web.vm.host_name = "web.local" | |
web.vm.provision :chef_solo do |chef| | |
chef.add_recipe "ohai" |
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
set :application, "SampleApp" | |
set :repository, "." | |
set :scm, :none | |
set :use_sudo, false | |
set :keep_releases, 5 | |
#Use the copy method which will compress and scp the files | |
set :deploy_via, :copy | |
set :main_js, "app.js" |
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
after_success: | |
- chmod 600 deployment/key.pem | |
- ssh-add deployment/key.pem | |
- gem install capistrano | |
- cap deploy |
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
--- | |
language: node_js | |
node_js: | |
- 0.8 | |
notifications: | |
email: | |
- '[email protected]' |
NewerOlder