Skip to content

gofullstack/cocoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cocoon

Like a warm blanket cocoon is a Rails development Vagrant box to wrap your Rails application in a repeatable environment. No more, "It works on my machine."

Getting Started

  1. Install Vagrant and VirtualBox

  2. Install the Vagrant Omnibus plugin.

    $ vagrant plugin install vagrant-omnibus
  3. Clone this repo and cd into the directory

    $ git clone git@github.com:gofullstack/cocoon.git
    $ cd cocoon
  4. Startup and provision Vagrant, you'll be promped for your local password. The rest of this process may take a bit of time the first run, go grab a :cookie: and come back.

    $ vagrant up

    If you get an error about DHCP server config

    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.
    
    Command: ["dhcpserver", "add", "--ifname", "vboxnet0", "--ip", "172.28.128.2", "--netmask", "255.255.255.0", "--lowerip", "172.28.128.3", "--upperip", "172.28.128.254", "--enable"]
    
    Stderr: VBoxManage: error: DHCP server already exists
    

    Then run the following command and then vagrant up again (see hashicorp/vagrant#3083 for details)

    $ VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
    $ vagrant up
  5. SSH into Vagrant box.

    $ vagrant ssh
  6. cd into the code directory and start a new Rails project.

    $ cd code
    $ rails new awesomesauce

    or to use this as a wrapper for an existing project checkout your existing project

    $ cd code
    $ git clone git@github.com:your/project.git
  7. Go about your regular Rails development business. Anything in the code directory will be synced locally to the code directory in cocoon.

Testing

Cocoon uses Test Kitchen and Rubocop to ensure the chef recipe is in tip top shape. To run Test Kitchen change into the cocoon cookbook directory located at chef/cookbooks/cocoon and run kitchen test. For Rubocop run rubocop.

Contributing

If you're interested in contributing to Cocoon, go for it! Just branch from master to a feature branch, make your change and open a pull request.

About

A Rails development Vagrant box.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages