Skip to content

Instantly share code, notes, and snippets.

@crowdmatt
Last active December 16, 2015 06:39
Show Gist options
  • Save crowdmatt/5393097 to your computer and use it in GitHub Desktop.
Save crowdmatt/5393097 to your computer and use it in GitHub Desktop.

First, let's setup VirtualBox and Amazon Linux on your local machine with Vagrant to help configure virtual box.

VirtualBox with Vagrant

https://www.virtualbox.org and download the Mac OS X Host. Run the package installer

Make sure you are using rvm which you can get at https://rvm.io/

gem install vagrant to get vagrant. A sample Vagrantfile is included in this gist.

OpsWorks Design

We rely on OpsWorks with Chef to spin up additional servers in different roles. That means we can't rely on something controlled by a developer, like Capistrano, to do any deployment work. Every deployment has to be done by chef recipes which are built into OpsWorks.

A side effect of this is that anything installed should have an init.d start, stop, restart script. For example, with any go server, we'll have to build it and make a custom init script for it. See http://big-elephants.com/2013-01/writing-your-own-init-scripts/ for assistance creating init scripts.

Vagrant::Config.run do |config|
config.vm.box = "squeeze64-ruby193"
config.vm.box_url = "http://packages.diluvia.net/squeeze64-ruby193.box"
config.vm.network :hostonly, "33.33.33.10"
config.vm.share_folder "v-cookbooks", "/cookbooks", "."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment