shopkeep/coreos-vagrant — pull request #1 by pguelpa (2014-06-12 03:21:09+00:00)
Title: Allow for building of multiple Dockerfiles at provision time

Our current method of a Vagrantfile in each repo doesn't allow us to test our deployment locally. I believe this is a useable solution that will build all the images we want and have them available on the CoreOS box such that we can deploy to it using fleetctl like we normally would in staging / production.

The basic idea is to define the projects in the `config.rb` file, each project can have multiple Dockerfiles it needs to build. For Go it's nice because all the source for our projects live in the same base directory so we can set them all up as one project with multiple Dockerfiles.

e.g.

```ruby
# config.rb

go_projects = Project.new("#{ENV['GOPATH']}/src/github.com/shopkeep", "/home/core/share/src/github.com/shopkeep")
go_projects.build_image('authentication', 'authsrv')
go_projects.build_image('authentication-migrations', 'authsrv/db')
go_projects.build_image('core-api', 'platform-api')
go_projects.build_image('transaction', 'transaction-service')

$projects = [go_projects]
```

This will cause all these Dockerfiles to be built at provision time. We can also do a quick "re-provision" if we update the code via:

`vagrant provision --provision-with "docker"`

This is actually very fast since Docker does it's own caching and knows if it needs to update an image or not.

Comments extremely welcome