Giter Club home page Giter Club logo

do_ruby's Introduction

Digital Ocean Ruby / Postgres / Node droplet with Chef

Using this cookbook in for your project

Install VirtualBox and then Vagrant.

For now it only supports Vagrant up to 1.4.3 (`vagrant-berkshelf plugin doesn't work yet with Vagrant 1.5.0).

gem install berkshelf
vagrant plugin install vagrant-berkshelf
vagrant plugin install vagrant-omnibus
vagrant plugin install vagrant-digitalocean

Get config files

cd ~/your/project/root

curl https://raw.github.com/zigomir/do_ruby/master/Berksfile.SAMPLE -o Berksfile
curl https://raw.github.com/zigomir/do_ruby/master/Vagrantfile -o Vagrantfile
curl https://raw.github.com/zigomir/do_ruby/master/server_config.SAMPLE.yml -o server_config.yml

Edit server_config.yml and check out Vagrantfile and Berksfile.

Creating new Vagrant machine

berks install
vagrant up

Creating new DigitalOcean droplet

We're using Vagrant-DigitalOcean plugin to set up a droplet on DigitalOcean.

If you've build your machine with VirtualBox provider before you'll probably need to destroy it first, since Vagrant doesn't support multiple providers on same box just yet. But they plan to. Command for destroying is vagrant destroy.

vagrant up --provider=digital_ocean

This might take a while. Especially if you're creating droplet with 512 MB of ram. Because user will be created pretty soon in the process you can see what is going on on the server.

ssh deployer@ip
top

Adding public key to GitHub for deployment

ssh deployer@ip
cat .ssh/id_dsa.pub # add to https://github.com/settings/ssh
ssh -T [email protected]
exit

Possible problems

You can get into trouble if you're gonna use this cookbook from different machines. This is because when you will create new droplet for the first time it will generate a new Vagrant ssh key and send it to server. On another machine you won't have same key.

Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the
machine. The fix is to run a `vagrant reload` so that the proper shared
folders will be prepared and mounted on the VM.

This is unfortunately a problem on Windows currently. I don't know yet how to work around, but this doesn't happen on OS X and probably Linux too.

do_ruby's People

Contributors

zigomir 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.