This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit e9f8d545daf7123fd82f109ee02021fb5d292b61
tree eef4e684aa0fd90c24bbf5dd5eebfa169c6c63be
parent 0cbf8d4e83de30fda29a14d4176d05f0a0108dc9
tree eef4e684aa0fd90c24bbf5dd5eebfa169c6c63be
parent 0cbf8d4e83de30fda29a14d4176d05f0a0108dc9
| name | age | message | |
|---|---|---|---|
| |
README | Tue Feb 10 13:39:30 -0800 2009 | |
| |
application_manifest.rb | Tue Feb 10 08:29:05 -0800 2009 | |
| |
bin/ | ||
| |
lib/ | Tue Feb 10 13:40:24 -0800 2009 | |
| |
spec/ | Tue Feb 10 08:29:05 -0800 2009 | |
| |
templates/ | Fri Feb 06 14:14:43 -0800 2009 |
README
This project is meant to be forked and modified for your own use. It illustrates
using ShadowPuppet to manage system configuration and Capistrano for deployment.
Please note:
* only works on Ubuntu 8.10
* runs on a completely clean install and assumes the user is 'rails'
* if you hate your life, blindly run on a production system.
* only installs one kind of Ruby. edit bin/bootstrap to select enterpriseyness.
* no root mysql passwd set.
* database name is 'name_production' and username is 'name'. update config/database.yml
* look at all the things you aren't giving cute names.
* you can edit passenger conf files in ./templates
* assumes a single server architecture.
* bootstrapping is slow due to compiling REE and passenger from scratch to support 64bit.
* capistrano output is crazy noisy for bootstrap. use 'cap -q'.
* use at own risk.
To get started:
1. Fork and clone this project.
2. Update shadow_rails/application_manifest.rb with your information and packages. Commit. Push.
3. Add the following to config/deploy.rb:
#############################################
# set user that can write to /u/apps and has sudo privs.
set :user, "rails"
# set your github clone url
set :shadow_repository, "git://github.com/wrecked/shadow_rails.git"
namespace :deploy do
desc <<-DESC
Bootstrap the system with Git, Ruby, Gems, ShadowPuppet, and ShadowFacter. Setup cap directories.
DESC
task :bootstrap do
sudo "apt-get install -q -y git-core"
run "git clone #{shadow_repository}"
sudo '~/shadow_rails/bin/bootstrap'
end
desc <<-DESC
Pull latest manifest and apply.
DESC
task :apply_manifest do
run "cd shadow_rails;git pull"
sudo 'shadow_puppet shadow_rails/application_manifest.rb'
end
before :deploy do
apply_manifest
end
before 'deploy:migrations' do
apply_manifest
end
desc <<-DESC
Restart the Passenger processes on the app server by touching tmp/restart.txt.
DESC
task :restart, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
end
#############################################
4. run 'cap -q deploy:bootstrap' to bootstrap the server.
5. run 'cap deploy' to apply manifest on the server before deploy.








