deprec2 preview releases
Preview release 2 available here -> attachment:"deprec-1.99.15.gem"
Preliminary documentation: README.install README.rails
Chris Turner has written some great documentation for using deprec2 to deploy to Slicehost from linux and from Windows.
deprec2 is a complete rewrite of the popular deprec gem. As well as supporting cap2, it offers some other significant improvements such as:
- your service configs are now stored locally (so they can be maintained under version control)
- codebase is structured better with standard command sets for each service (the CRUD of system administration)
- support for new services such as nginx, monit, postfix, nagios, ntp, heartbeat and more.
Deprec2 uses Capistrano2. I've only tested it with Ubuntu 7.10 server amd64. YMMV.
Big thanks to everyone who has submitted feedback, especially Eric Harris-Braun for some great testing, bug reports and suggestions. Keep the feedback coming
What it is
Deprec is a collection of automated recipes, written in Ruby, for setting up production ready Ruby on Rails servers. This includes everything from creating admin accounts and setting up your ssh keys to compiling and installing the packages required to get a Rails application running on a freshly installed Ubuntu server.
The current rubygem on sourceforge supports Ubuntu 6.06 LTS and uses Capistrano 1
deprec2 (preview release available on this page) supports Ubuntu 7.10 (gutsy) and Capistrano 2
read more AboutDeprec...
How to get it (deprec1)
# install with rubygems sudo gem install deprec --include-dependencies # update to latest version sudo gem update deprec
# Note, svn trunk currently contains deprec2 - a work in progress # Don't expect it work work but feel free to poke around # You can use it by adding this to your ~/.caprc # require '~/work/deprec/lib/deprec' if respond_to?(:namespace) # subversion readonly access svn://scm.deprecated.org/deprec # subversion commit access (by request) svn+ssh://scm.deprecated.org/var/www/apps/deprec/repos/trunk
Quickstart
How to use deprec until it supports cap2.
deprec1 doesn't work with capistrano 2 but you can still use deprec even if you have cap2 installed. Just follow the instructions below.
## install deprec on workstation # sudo gem install deprec --include-dependencies # installs what you need (including capistrano-1.4.1) # Deprec doesn't (yet) work with Capistrano 2 # When using deprec, you need to use cap1, which can happily coexist # with cap2 if you have a way of calling it. # Put the following into your bash environment (~/.bash_login on OSX) alias cap1="`which cap` _1.4.1_" # This loads the deprec recipes into Capistrano *except* when using Cap2. echo "require 'deprec/recipes' unless respond_to?(:namespace)" >> ~/.caprc # include deprec recipes cap1 show_tasks # should now include deprec tasks
Here's what you need to run to deploy your app to a fresh Ubuntu 6.06 (dapper) server
cd /path/to/railsapp deprec --apply-to . # edit config/deploy.rb to put in details for: # :name - a short name for your application # :domain - the domain name it will be served from # :repository - your rails applications scm repository cap install_rails_stack cap setup cap deploy_with_migrations cap restart_apache
Improving your SSH experience
Put something like this in your .caprc
ssh_options[:keys] = %w(/Users/mbailey/.ssh/id_dsa) ssh_options[:paranoid] = false ssh_options[:forward_agent] = true
How to use it
Here are the official UsageDocs.
Third Party Docs
I'm very grateful to everyone who has submitted recipes, written documentation, and contributed to deprec. Geoffrey Grosenbach even created a free Peepcode episode showcasing deprec!
instructions for using deprec with Slicehost VPS's. Worth reading even if you're not a customer.
Craig Ambrose wrote a post on deprec in his series on Rails deployment.
Geoffrey Grosenbach has produced a free ten minute Peepcode episode on using deprec.
Mailing List
Join the deprec google group
License
Deprec is licenced under the GPL. This means that you can use it in commercial or open source applications. View DeprecLicense
Credits
Deprec is written and maintained by Mike Bailey <mike@bailey.net.au>. More about me here: http://mike.bailey.net.au/
Deprec was inspired and uses the brilliantly executed Capistrano. Thanks Jamis!
Geoffrey Grosenbach has committed code as well as spreading the word.
After starting on this project I found myself reading and utilizing a lot of code by Bradley Taylor (RailsMachine? gem) and Neil Wilson (vmbuilder_plugins gem).
I'd like to say a huge thanks to these guys for helping make my work easier!
For the first cut I have included all third party code in a directory within the deprec gem, rather than link to the gems themselves. I made this decision to prevent deprec from breaking due to a change in one of the other libraries.
Thanks to Craig Ambrose for help with testing, documentation and beer.
Thanks to all the users who have submitted bug reports, fixes and kind words!
Attachments
- deprec-1.99.14.gem (131.0 kB) - added by mbailey on 02/29/08 17:57:50.
- deprec-1.99.15.gem (132.5 kB) - added by mbailey on 03/27/08 15:45:46.
