Created
June 14, 2014 01:08
-
-
Save Aslan/bf1c64bcbdd0aef53b15 to your computer and use it in GitHub Desktop.
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
deploy node[:deploy_root] do | |
repo "[email protected]:xxxxxxx/#{node[:app_name]}.git" | |
revision rev | |
user "ubuntu" | |
group "ubuntu" | |
enable_submodules true | |
migrate false | |
symlink_before_migrate({ "config/dot_env" => ".env"}) | |
environment "RAILS_ENV" => node[:rails_env] | |
shallow_clone true | |
action :deploy # or :rollback | |
restart_command do | |
script "restart #{node[:app_name]}" do | |
interpreter "bash" | |
code "/etc/init.d/rtb_exchange restart" | |
user "ubuntu" | |
end | |
end | |
before_restart do | |
script "install jruby and proper JVM" do | |
interpreter "bash" | |
code <<-BASH | |
mkdir -p /usr/lib/jvm/default-java/bin | |
ln /usr/bin/java /usr/lib/jvm/default-java/bin/java | |
cd /usr/lib/jvm/java-7-oracle/jre/lib/security/ | |
rm -f local_policy.jar US_export_policy.jar | |
wget http://s3... | |
wget http://s3... | |
BASH | |
end | |
end | |
scm_provider Chef::Provider::Git | |
not_if {File.exists?("#{node[:deploy_root]}/shared/do_not_deploy.txt")} #Prevents chef client runs from deploying more than once | |
notifies :create , resources(:template => "#{node[:deploy_root]}/shared/do_not_deploy.txt") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ git ls-remote
From [email protected]/rtb_exchange.git
baab635fb7ce008b17a423bf57483640d36f6582 HEAD
b854d0fe4555fb13176e225590ff24c87abb4398 refs/heads/2012Aug28
31f2bf58f2979746cae334bcad0dcaf24b65cd7f refs/heads/back-to-mri
564c900fa281a9e0999ee6703c7d09e77940819f refs/heads/develop
f8f41380be75e02d309909ca2e94e5134df19955 refs/heads/experiment
36349a34e67cbd92443ebffcbde5a8e366076c46 refs/heads/feature/2ndprice
cc4460b34d0ac11c01cfe3e618eab5180e2c4b3b refs/heads/feature/TTv3
eb58e9ed73983dd78cb84429ff12fa77fb1a942c refs/heads/feature/celluloidHttp
a8c896b277361f09e4482a96efe6d647604115a0 refs/heads/feature/combo
6cc4bd3f8cf50501b7c6ac8ccca09bad52c9ce0b refs/heads/feature/exchange_logging
c2f06caad5e99725fde4391ec8e5eb8adae869a0 refs/heads/feature/mETG
b0955d6c92abdfe59270c57ebf3c90ad72b34834 refs/heads/feature/new_vast_endpoints
702102248c7709787f4135d487b97c2661555273 refs/heads/feature/no_campaign
5c6b49f9cca2d1e149549812326ba1ca2817a003 refs/heads/feature/optimization
917313c1e2fb96d0567e93e113014fb3225dadcc refs/heads/feature/session_id
cd4c6fb81af97dfc632fa188d384b4c9d2eb7d46 refs/heads/feature/staggered_bidders
2b8a081971704d7c5478aba141163d67c6da784f refs/heads/feature/svp-780
bd20f50773b51266ba35e16b440b88e44e596670 refs/heads/feature/svp-942
625b0d9f03d30f4d4fa895141638e86d1e3eb567 refs/heads/feature/utf8
c4959a5cb5461d2e06c048eb006f2bebe4a6c8ca refs/heads/feature/vast
9287b162ac9fb6936774d8ae60271f58bf09ed92 refs/heads/hotfix/second-price-mins
80ccffab9a6ded1f6d12614ae2473c088480652b refs/heads/hotfix/v5.6
b4b53c2c10dbbeea8efde9113b5c2da3e29c19bb refs/heads/jreel