github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

railsmachine / moonshine

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 354
    • 28
  • Source
  • Commits
  • Network (28)
  • Issues (10)
  • Downloads (0)
  • Wiki (10)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (3)
    • gh-pages
    • master ✓
    • rails-3
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Rails deployment and configuration management done right. ShadowPuppet + Capistrano == crazy delicious — Read more

  cancel

http://railsmachine.github.com/moonshine/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Update ree187 and src187 to 2010.01 releases 
Ches Martin (author)
Mon Jan 25 03:38:24 -0800 2010
commit  284239b12d868815087029468a7db9270d010bff
tree    c6559644bc8048b1980de2bbfb41f37be8679d8b
parent  43a575152ea1532a48048a9f24927158040b82d7
moonshine /
name age
history
message
file .gitignore Tue Jun 30 09:39:52 -0700 2009 cleanup .autotest [roblingle]
file LICENSE Fri Mar 13 09:47:48 -0700 2009 doc and license and stuff [jnewland]
file Rakefile Fri Sep 11 04:20:31 -0700 2009 fix redoc task Signed-off-by: Jesse Newland <j... [jnewland]
file Readme.rdoc Tue Dec 15 08:14:25 -0800 2009 introduce shared_config as the default instead ... [jnewland]
directory generators/ Tue Dec 15 08:14:25 -0800 2009 introduce shared_config as the default instead ... [jnewland]
file init.rb Wed Feb 18 08:11:18 -0800 2009 configuration step [jnewland]
directory lib/ Fri Jan 22 13:12:30 -0800 2010 AllowOverride fix for e4275d3c351948a107703656c... [Ches Martin]
directory recipes/ Mon Jan 25 03:38:24 -0800 2010 Update ree187 and src187 to 2010.01 releases [Ches Martin]
directory test/ Wed Dec 09 11:17:49 -0800 2009 rename test files for out-of-the-box autotest joy [Ches Martin]
Readme.rdoc

Moonshine

Moonshine is Rails deployment and configuration management done right.

Deploying Your Rails Application with Moonshine in 15 minutes

Requirements

  • A server running Ubuntu 8.10 (Want to see your favorite platform supported? Fork Moonshine on GitHub!)
  • A user on this server that can:
    • Execute commands via sudo
    • Access your application’s Git repository

Instructions

  • ruby script/plugin install git://github.com/railsmachine/moonshine.git
  • Ensure all required gems are declared using config.gem calls in config/environment.rb.
  • ruby script/generate moonshine
  • Edit the configuration file at config/moonshine.yml with your apps’s details. (If you’re using a user other than rails, specify this here)
  • Edit the Moonshine::Manifest::Rails manifest generated for your application at app/manifests/application_manifest.rb to declare other packages, services, or files your application depends on (memcached, sphinx, etc).
  • capify your application
    • Your config/deploy.rb can be super barebones, as Moonshine loads the contents of config/moonshine.yml in as Cap variables and sets some sane defaults. Here’s what I use:
       server "myubuntuserver.com", :app, :web, :db, :primary => true
      
  • git add . && git commit -am "added moonshine" && git push
  • cap deploy:setup
    • This will bootstrap your Ubuntu server with Ruby Enterprise Edition.
  • cap deploy
    • This will install all needed dependencies for your application and deploy it for the first time. The initial deploy will take awhile, as things such as MySQL, etc, are being installed. It’s worth the wait though, because what you end up with is an extremely maintainable server that you’ll never need to SSH into again!

Moonshine and Capistrano

Moonshine tightly integrates with Capistrano, utilizing its callback system to apply your manifests to the server on each deploy. In addition, variables are set in Capistrano for all keys on the config/moonshine.yml hash, allowing your Capistrano configuration to be extremly barebones.

By default, Capistrano applies the manifest at app/manifests/application_manifest.rb. To run a different manifest, for example one to install and maintain packages on a server of a different role:

    set :moonshine_manifest, 'memcached_manifest'

If you’d like to prevent Capistrano from applying your Moonshine manifests for any reason:

    set :moonshine_apply, false

Shared Config

Often, certain files (config/database.yml, etc) are excluded from an application’s SCM, but required to be present for deploy. We’ve abstracted this pattern with some Capistrano automation that goes great with Moonshine.

For example, if you keep config/database.yml out of your SCM, add the following line to your config/moonshine.yml:

    :shared_config:
      - config/database.yml

This file will then be automatically uploaded when you run deploy:setup and symlinked to current/config/database.yml on each deploy.

There are some extra cap tasks for working with these files manually, if needed:

  • cap shared_config:upload
  • cap shared_config:download
  • cap shared_config:symlink

The old local_config functionality is still supported, but shared_config is recommended.

Running Tests

To run the test suite, follow these steps to create a testbed app:

    rails moonshine_tests
    cd moonshine_tests
    git clone git://github.com/railsmachine/moonshine.git /vendor/plugins/moonshine
    script/generate moonshine
    cd vendor/plugins/moonshine
    rake test

Getting Help

You can find more examples in the documentation and on the Wiki.

For help or general discussion, visit the Moonshine newsgroup.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server