Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (51 sloc) 1.77 KB

Setup Chef

To setup chef recipes in provision/:

# defaults to mysql
$ rails g provision_config
# if using postgresql
$ rails g provision_config postgresql

Configuring bundled ssh keys

By default, relevance_rails bundles one of your local keys (~/.ssh/, ~/.ssh/, or ~/.ssh/ with your instance. If none are found it bundles all your keys from ssh-add -L. For bundling additional keys, you can create a ~/.relevance_rails/keys_git_url file and point it to a git repo that has additional keys. Keys in that git repo should exist as top level .pub files. You *MUST have at least one key to provision.

Provisioning on EC2

First create an aws config in ~/.relevance_rails/aws_config.yml. An example config looks like this:

  :aws_access_key_id: <your aws access key id>
  :aws_secret_access_key: <your aws secret access key>

    :flavor_id: <instance type, e.g. 'm1.large'>
    :image_id: <ami to bootstrap with. Must be some UBUNTU image. e.g. "ami-fd589594">
    :groups: <security group to place the new deployment in, e.g. "default">
    :key_name: <name of the public/private keypair to start instance with>
  private_key: |
    Include the RSA private key here. This should correspond to the keypair indicated
    by :key_name above.
    -----END RSA PRIVATE KEY-----

Now just provision your instance:

$ rake provision:ec2_and_generate NAME=qa
$ cap qa deploy:setup deploy

Provisioning with Vagrant

From your app's root directory:

$ cd provision
# pull in vagrant and chef
$ bundle install
$ vagrant up

Vagrant instance should be up at

Jump to Line
Something went wrong with that request. Please try again.