Skip to content

Commit

Permalink
Add installation options/instructions to README. Closes #25
Browse files Browse the repository at this point in the history
  • Loading branch information
fnichol committed Aug 22, 2011
1 parent eb6147c commit d6aa46c
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,63 @@ There are **no** external cookbook dependencies. However, if you are
installing [JRuby][jruby] then a Java runtime will need to be installed.
The Opscode [java cookbook][java_cb] can be used on supported platforms.

# Installation

Depending on the situation and use case there are several ways to install
this cookbook. All the methods listed below assume a tagged version release
is the target, but omit the tags to get the head of development. A valid
Chef repository structure like the [Opscode repo][chef_repo] is also assumed.

## Using Librarian

The [Librarian][librarian] gem aims to be Bundler for your Chef cookbooks.
Include a reference to the cookbook in a **Cheffile** and run
`librarian-chef install`. To install with Librarian:

gem install librarian
cd chef-repo
librarian-chef init
cat >> Cheffile <<END_OF_CHEFFILE
cookbook 'rvm',
:git => 'git://github.com/fnichol/chef-rvm.git', :ref => 'v0.8.0'
END_OF_CHEFFILE
librarian-chef install

## Using knife-github-cookbooks

The [knife-github-cookbooks][kgc] gem is a plugin for *knife* that supports
installing cookbooks directly from a GitHub repository. To install with the
plugin:

gem install knife-github-cookbooks
cd chef-repo
knife cookbook github install fnichol/chef-rvm/v0.8.0

## As a Git Submodule

A common practice (which is getting dated) is to add cookbooks as Git
submodules. This is accomplishes like so:

cd chef-repo
git submodule add git://github.com/fnichol/chef-rvm.git cookbooks/rvm
git submodule init && git submodule update

**Note:** the head of development will be linked here, not a tagged release.

## As a Tarball

If the cookbook needs to downloaded temporarily just to be uploaded to a Chef
Server or Opscode Hosted Chef, then a tarball installation might fit the bill:

cd chef-repo/cookbooks
curl -Ls https://github.com/fnichol/chef-rvm/tarball/v0.8.0 | tar xfz - && \
mv fnichol-chef-rvm-* rvm

## From the Opscode Community Platform

This cookbook is not currently available on the site due to the flat
namespace for cookbooks. There is some community work to be done here.

# Usage

## RVM Installed System-Wide with Rubies
Expand Down Expand Up @@ -805,13 +862,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[chef_repo]: https://github.com/opscode/chef-repo
[compilation]: http://wiki.opscode.com/display/chef/Evaluate+and+Run+Resources+at+Compile+Time
[dragons]: http://en.wikipedia.org/wiki/Here_be_dragons
[gem_package]: http://wiki.opscode.com/display/chef/Resources#Resources-Package
[gem_package_options]: http://wiki.opscode.com/display/chef/Resources#Resources-GemPackageOptions
[fnichol]: https://github.com/fnichol
[java_cb]: http://community.opscode.com/cookbooks/java
[jruby]: http://jruby.org/
[kgc]: https://github.com/websterclay/knife-github-cookbooks#readme
[librarian]: https://github.com/applicationsonline/librarian#readme
[lwrp]: http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+%28LWRP%29
[package_resource]: http://wiki.opscode.com/display/chef/Resources#Resources-Package
[rvm]: http://rvm.beginrescueend.com
Expand Down

0 comments on commit d6aa46c

Please # to comment.