Packer provisioning for warden compatible boxes #7
Conversation
* Ubuntu 12.04.4 with latest kernel * Enables cgroup memory limits and accounting for 12.04.4 * Locks the kernel to prevent automatic updates * Executes warden-test-infrastructure recipes
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: http://www.pivotaltracker.com/story/show/69539058. This repo is managed by the 'Runtime' team. |
@sykesm This looks good; we'll get someone from the runtime team to take a look. CF Community Pair (@chou & @jfoley) /cc @MarkKropf, @hiremaga |
This looks great! Thanks @sykesm If the warden and dea tests pass with this (i.e. we're able to create a valid warden-compatible.box), I'd love for us to switch to packer. |
We took a little at this earlier today. We started by looking at Virtualbox and ran into problems so we didn't get as far as looking into VMware Fusion. We were able to create a box successfully, but when trying to bring this up using the DEA's Vagrantfile we ran into this error:
Any idea why we might see this? We were running Virtualbox 4.3.10 and Vagrant 1.5.3 |
I don't know why you're seeing that. Here are the steps I went through just now without encountering that issue: Build the boxes
Remove the existing box
Add the new box
Bring up the vagrant box
SSH into the vagrant box and dump the mounts
This was done with the following levels:
While they're a little bit older than what you're using, they don't seem like they're ancient. |
Looks like it's a bug with VirtualBox 4.3.10's guest additions iso. I found hashicorp/vagrant#3341 which points to https://www.virtualbox.org/ticket/12879. You might want to try this with 4.3.8 instead. |
@sykesm I'm getting a make error running the create script.
|
@shalako Do you have packer installed already? The error implies packer isn't found on your path. If you just try to run Assuming it's not installed, if you're using home-brew, installing should be as easy as |
@sykesm Thank you. The script ran, and generated artifacts in packer/virtualbox (which I will try running with vagrant and run CATs). However, nothing was generated in packer/vmware. |
I just looked at the script that was put together after my PR was merged. The way it was written, it defaults to virtualbox as the provider but you can override it to vmware by adding a command line argument.
That should build you a vmware image. (You'll need to make sure that the linux tools iso has already been downloaded by fusion.) |
successfully ran dea_next/test_in_vm and warden/test_in_vm using warden-compatible virtualbox created with packer. Will try building the vmware warden-compatible box next. |
@sykesm As you predicted, it doesn't appear I have VMWare linux tools installed. I'm reading that you have to install them with a VM. Sounds like a chicken or egg problem. I can't build a vm without them, but I need a VM to install them. I'll keep searching; let me know if you can provide guidance. ± |master ✓| → ./create_vagrant_box.sh vmware |
@shalako Yes, that's an unfortunate issue that happens with VMware Fusion. I don't know why they went that way. One quick way to get the tools is to bring up bosh-lite with the fusion provider, then start the Fusion UI. If you start the UI after bringing up the VM, you should see it in your VM library. From there you can use Virtual Machine -> Update VMware Tools to force Fusion to download the iso into the library. It would be nice if there was a way do that from the command line. If a way exists, I don't know what it is. |
I think I got vmware tools installed. Create script appears to be running for the vmware box. |
This includes a packer template and provisioning scripts to create warden-compatible boxes for vmware and virtual box. The box consists of:
This is a starting point and needs some cleanup but it would be great to get some input on what's here already in support of https://www.pivotaltracker.com/story/show/68302420. I've used this box for testing warden and the dea without issue.