porcupo

8-bit internet rodent

Gravatar of porcupo

vagrant and pump.io

| Comments

Starting what will be a little series on setting up pump.io for corporate use.

I throw in some basic vagrant too.

Part 1 will be setting up a reliable testing environment for pump.io. We’ll be using vagrant and some basic shell scripting to keep things easy.

My Vagrant configuration for pump.io is in my github vagrant repo for reference.

I’ll assume you have basic working knowledge of vagrant. If not, vagrantup.com has some solid beginner docs to get you up and running.

pump.io docs will probably not be winning awards any time soon. So I’m hoping I can help at least make this easier for them.

I used the following to whip up a vagrant box:

1
vagrant init test1 http://files.vagrantup.com/precise64.box

Once you’ve created a vagrant instance (with vagrant init), edit your Vagrantfile in the current directory. Here’s mine:

1
2
3
4
5
6
7
Vagrant.configure("2") do |config|
  config.vm.box = "test1"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
  config.vm.network :forwarded_port, guest: 31337, host: 31337
  config.vm.network :public_network
  config.vm.provision :shell, :path => "bootstrap.sh"
end

The :forwarded_port variable is needed to provide some kind of external access to pump.io. This line will provide http://localhost:31337/ on your host machine.

I prefer using the :public_network setting, which will use a bridged adapter, giving the vagrant box it’s own IP on your network. This is preferable unless you don’t get along with your network admins.

The final line here points vagrant to a provisioning shell script. I’m using this for simplicity’s sake, but in an ideal world, we’d be setting this up in puppet or chef-solo.

Comments