Code Monkey home page Code Monkey logo

ruby_web_server_cookbook's Introduction

Ruby Web Server Cookbook

VPS Provisioning

This cookbook is designed to make setting up a Ruby web server on a VPS using Chef quite simple.
To use the cookbook, it's best to use Matt Schaffer's Knife Solo using the instructions below.

I recommend using Digital Ocean.

The cookbook will install the following stack:

  • Ruby 2.0
  • rbenv
  • PostgreSQL
  • Apache2
  • Phusion Passenger
  • Node.js
  • ImageMagick

Setup

Install gems

gem install knife-solo
gem install berkshelf

Setup kitchen

Init
knife solo init vps-provisioner
berks init vps-provisioner
cd vps-provisioner
Gemfile
## ./Gemfile

source 'https://rubygems.org'

gem 'knife-solo'
gem 'berkshelf'
Berksfile
## ./Berksfile

site :opscode

cookbook 'ruby_web_server', git: '[email protected]:rossjourdain/ruby_web_server_cookbook.git'
Install Gems and Cookbooks
bundle install
berks install --path cookbooks

Build a Ruby web server

Install Chef

knife solo prepare <user>@<server>

Setup the server config

## ./nodes/<server>.json
## NB: password generated using: mkpasswd -m sha-512 deploy

{
  "run_list": [
    "ruby_web_server"
  ],
  "users": {
    "deploy": {
      "password": "$6$Jz61tUIPAEBc4R69$.77ruWIRf36yQ9ySPL2qObbu54jduoCCMUDb.28khUr95YYnuj5AKhslLnGAqSPBEolHC5MNm0yAExSoC6FKy.",
      "ssh_keys": [""]
    }
  },
  "webapps": {
    "test_app": {
      "domain": "www.example.com",
      "rails_env": "production"
    }
  },
  "locale": {
    "lang": "en_NZ.utf8"
  },
  "postgresql": {
    "password": {
      "postgres": "postgres"
    }
  }
}

Upload cookbooks and run them

knife solo cook <user>@<server>

Requirements

TODO

Usage

TODO

Attributes

TODO

Recipes

TODO

Author

Ross Jourdain

ruby_web_server_cookbook's People

Contributors

rossjourdain avatar

Watchers

James Cloos avatar

Forkers

seanarnold

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.