GithubHelp home page GithubHelp logo

cocoonventures / sprinkle-cookbook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plymouthsoftware/sprinkle-cookbook

0.0 1.0 0.0 268 KB

A set of recipes and configurations for configuring servers with Sprinkle

Ruby 100.00%

sprinkle-cookbook's Introduction

Sprinkle Cookbook

A set of recipes and configurations for configuring servers with Sprinkle.

Installation

  1. To use with Vagrant, download and install Vagrant

     $ gem install sprinkle
    
     $ mkdir myproject
     $ cd myproject
     $ mkdir app # This folder is shared to the VM as /var/www/sites/app in Vagrantfile
    
     $ git clone [email protected]:plymouthsoftware/sprinkle-cookbook.git
     $ cd sprinkle-cookbook
    
  2. Edit config/deploy.rb to your requirements:

     $ cp config/deploy.rb.example config/deploy.rb
    

    For example, change the server role to the policy stack you want to use, e.g:

     # config/deploy.rb
     role :rails_dev, 'localhost:2222'
    
  3. Edit Vagrantfile to your requirements:

     $ cp Vagrantfile.example Vagrantfile
    
  4. Create your vagrant box and run your desired Sprinkle cookbook

     $ vagrant up
     $ sprinkle -c -s config/install.rb --only=rails_dev # The role you declared in deploy.rb
    

Policies

Rails Development

Log into your new Virtual Machine and configure a simple Rails app

$ vagrant up
$ sprinkle -c -s config/install.rb
$ vagrant ssh 

(vm) $ cd ~/app
(vm) $ rails new app --database mysql 
(vm) $ cd app
(vm) $ bundle install # Probably already run by rails new
(vm) $ bundle exec rails generate scaffold users name:string email:string
(vm) $ bundle exec rake db:migrate
(vm) $ bundle exec rails server

On host machine, visit http://192.168.33.100/users in your browser

Changes

17 July 2013

  • Changed to use Vagrant v2 configuration.
  • Switched from public_network to private (host-only) network (default IP is 192.168.33.100)
  • Updated default app path to /home/vagrant/app rather than /var/www/apps/.

sprinkle-cookbook's People

Contributors

cblunt avatar

Watchers

James Cloos avatar

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.