Skip to content

darron/packer-ubuntu-13.10-docker-serf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packer-ubuntu-13.10-docker-serf

NOTE: THIS IS DEPRECATED.

UPDATED RECIPES AVAILABLE HERE

A simple Packer template to build:

  1. An AMI using Ubuntu 13.10 in AWS USW-2 (Oregon) region.
  2. A Virtualbox Vagrant box.

Includes:

  1. Docker
  2. Serf
  3. Hipache - to route traffic to the proper docker container.

To Build the VM's

vagrant up

packer build template.json

Configure Serf Roles and adding Handlers

Using User data we can setup the Serf role:

ec2-run-instances --key your-key -g security-group --user-data-file user-data-file/master your-ami --region us-west-2
ec2-run-instances --key your-key -g security-group --user-data-file user-data-file/route your-ami --region us-west-2
ec2-run-instances --key your-key -g security-group --user-data-file user-data-file/build your-ami --region us-west-2
ec2-run-instances --key your-key -g security-group --user-data-file user-data-file/serve your-ami --region us-west-2

This repo pulls example handlers from darron/serf-docker-events - it could be any handlers at all.

Configurable Event Handlers

Inside /etc/default/serf you can configure an EVENTS_DIR that contains all of your handlers.

You can also configure an alternate SUFFIX if you prefer to write your handlers in a language other than Bash/sh.

If that EVENTS_DIR exists the serf.conf Upstart script will look for files ending in SUFFIX and add them as event handlers.

TODO

Better error checking, etc.

About

Packer template to build Ubuntu / Docker / Serf AMI/Vagrant box.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages