/bh-packer

Build virtual machines using packer for vmware & digital ocean.

Primary LanguageShell

This directory is used to create a virtual machine that runs on either
VMware or Digital Ocean.

It uses packer[2] for these builds and the base OS is Centos6[1].

Prior to running the makefile you'll need to have:
- installed packer
- a downloaded of CentOS-6.5-x86_64-bin-DVD1.iso[3], if your building vmware images.
- VMWare Fusion, if your building vmware images.
- A Digital Ocean account, if your building digtalocean VMs.

If you build digital ocean VMs you will need to put your account credentials 
in ./digitalocean-credentials.json.  Something like this.

{
    "digitalocean_client_id": "BlahBlahBlahBar",
    "digitalocean_api_key": "BlahBlahBlahBlahFoo"
}

Digital Ocean is quite cheap so building one of these will cost you only
a few cents each time.  But if you don't delete the snapshot (aka image)
they will charge you a monthly fee to keep it around.

Put CentOS-6.5-x86_64-bin-DVD1.iso into iso/CentOS-6.5-x86_64-bin-DVD1.iso.

You will want to tinker with provisions/initialize-users.sh so the first users
isn't bhyde.  In particular note there how the .ssh/authorized_keys is setup.

You may wish to tinker with
- template.json+ -- which tells packer what to do.
- http_directory/anaconda-ks.cfg which tells CentOS's kickstarter[4] how to
  setup the machine - this effects only the VMWare VM.
- change the centos mirror used in both those
- tinker which what provisioners are used at the bottom of template.json+
  For example may not want ccl (a common lisp implementation), etc. etc.

At that point just do
  $ make digitalocean
or 
  $ make vmware-iso
and cross your fingers.

[1] http://http://www.centos.org/
[2] http://packer.io/ 
[3] http://isoredirect.centos.org/centos/6/isos/x86_64/
[4] http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-howuse.html
[5] Tested only on VMWare Fusion for the mac.