Skip to content

Instantly share code, notes, and snippets.

@jeffdeville
Created July 23, 2012 21:14
Show Gist options
  • Select an option

  • Save jeffdeville/3166277 to your computer and use it in GitHub Desktop.

Select an option

Save jeffdeville/3166277 to your computer and use it in GitHub Desktop.
before_migration
# Used by EngineYard Cloud after deployment
#
# Work around Engine Yard
if node[:instance_role] == "util"
# Don't use memcache on util boxes.
env_file = "#{release_path}/config/environments/#{node[:environment][:framework_env]}.rb"
run "mv #{env_file} #{env_file}.orig && grep -v DO_NOT_USE_IN_EY_UTIL_INSTANCE #{env_file}.orig > #{env_file}"
else
run "ln -nfs #{shared_path}/config/memcached_custom.yml #{release_path}/config/memcached.yml"
end
if ['solo', 'app', 'app_master', 'util'].include?(node[:instance_role])
run "ln -nfs #{shared_path}/config/solr.yml #{release_path}/config/solr.yml"
run "ln -nfs #{shared_path}/config/resque.yml #{release_path}/config/resque.yml"
run "ln -nfs #{shared_path}/config/statsd.yml #{release_path}/config/statsd.yml"
run "mkdir -p #{shared_path}/feed && ln -nfs #{shared_path}/feed #{release_path}/tmp/feed"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment