Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
★ DA kitchen BRO ★
Ruby D Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
packages
policies
templates/ruby
.gitignore
Gemfile
Gemfile.lock
README.md
install.rb

README.md

★ Kitchen ★

Kitchen is a set of Novagile Sprinkle recipes

  1. Clone this repo.
  2. Rename & modify the files in /config to match your server config (the user can be called 'web').

Installation

bundle install

Configuration and usage

Use the file config/deploy.rb to declare your app servers and user.

On The server

  • Create a user called 'web' on the server.
  • Add .ssh/authorized_keys in web user. Give it proper web group
  • Create a user for each dev.
  • Add their public ssh keys in web user's .ssh/authorized_keys directory.
  • With sudo visudo you want to have a sudo ALL=(ALL:ALL) NOPASSWD: ALL
  • Give developers sudo rights.

Back on the kitchen

You might have to change the deploy.rb configuraiton

set :ssh_options, {
  keys: %w(/Users/your_username/.ssh/id_rsa)
}

The sprinkle commands given below take a POLICIES arguments, each policies add programs and their dependencies.

A classic group of policies are: ngnix, ruby, database, cacert, logrotate, redis.

Then use the sprinkle command, giving it the policies to use:

sprinkle -s install.rb POLICIES='nginx ruby cacert logrotate_app redis nodejs rails_passenger database'

Now that everything is installed:

 gem install hipchat
 gem install bluepill

:warning: Read the [Debian & PostgreSQL] section if your server is on a Debian OS and you use last features of postgreSQL (like json columns or hstore).

PostgreSQL

You'll need to give web user PG roles rights so it can create and migrate DB:

 su postgres pgsql postgresql
 \du
 ALTER ROLE web CREATEDB SUPERUSER
 \q

FINALLY: cap deploy:setup with your app's config.rb well configured should finish the job.

Debian & PostgreSQL

If you're installing PostgreSQL on a Debian distro, you want to read this:

https://wiki.postgresql.org/wiki/Apt and https://packages.debian.org/wheezy/postgresql

I'll put this here. You'll know what to do if you red previous articles.

curl -O -L "http://anonscm.debian.org/loggerhead/pkg-postgresql/postgresql-common/trunk/download/head:/apt.postgresql.org.s-20130224224205-px3qyst90b3xp8zj-1/apt.postgresql.org.sh"

Notes

Sprinkle automates the process of installing packages/config files on a remote server.

This repository has 2 main folders:

packages :

Multiple packages are declared like:

package :name do end

policies :

A policy is a set of packages associated with a role.

Something went wrong with that request. Please try again.