Define all CI machines in Vagrantfile

Add definitions for all of our CI machines to the Vagrantfile, so that
we can test all of these nodes.

Note that I've changed the IP that `ci-management-1` uses so that the
IPs used by the CI slaves are consecutive. This shouldn't have any
effect as the IPs here don't correspond to those used in the real
environment anyway.
Upgrade librarian-puppet to version 2.0.0

Upgrade librarian-puppet to the latest version, which supports Puppet
3.6 and above. This is in preparation for upgrading Puppet to version
3.7.1.
Amend SHA commitish for puppetlabs-rabbitmq module

The `strip-backslashes` branch was rebased to fix a merge conflict with
recent changes to the upstream `master` branch.

This caused `librarian-puppet` to error with:

    Could not checkout git://github.com/alphagov/puppetlabs-rabbitmq.git at 72785de752337ef050f0ec5462f96d21ac8e8ce6: fatal: reference is not a tree: 72785de752337ef050f0ec5462f96d21ac8e8ce6

Update the commitish in `Puppetfile.lock` to the tip of the rebased
branch, which resolves the above error.
Change Vagrant box; upgrades Puppet to 3.7.1

Previously, we were using these Vagrant boxes from Puppet Labs:
https://github.com/puppetlabs/puppet-vagrant-boxes

These are no longer actively maintained (last commit was two years ago)
and supply an old version of Puppet, version 3.0.2.

This commit switches to use the new Puppet Vagrant boxes built using
Packer:
https://github.com/puppetlabs/puppetlabs-packer

No URL is necessary as these boxes are downloaded from Vagrant Cloud:
https://vagrantcloud.com/puppetlabs

This also allows us to use the new Ubuntu Trusty box from Vagrant Cloud
while keeping the Puppet version consistent between Precise and Trusty.

I have tested `ci-master-1`, `ci-slave-1`, `ci-slave-2` and
`transition-logs-1` using this new Vagrant box.
Add a SATA disk interface to the Virtualbox VM

In the previous commit, we changed the Vagrant boxes we're using to the
newer ones provided by Pupppet Labs, which include Puppet 3.7.

Unfortunately the new Vagrant boxes differ from the old ones in that
they use an IDE hard disk interface, rather than SATA.

This commit creates a SATA interface in addition to the IDE interface,
which allows Vagrant to add extra disks to the `transition-logs-1` VM
correctly.

This is really a workaround until Puppet Labs use SATA for their Vagrant
boxes. I've raised a [PR] to do that.

[PR]: https://github.com/puppetlabs/puppetlabs-packer/pull/25

This was casuing the following error:

    » vagrant reload transition-logs-1
    ==> transition-logs-1: Checking if box 'puppetlabs/ubuntu-12.04-64-puppet' is up to date...
    ==> transition-logs-1: Clearing any previously set forwarded ports...
    ==> transition-logs-1: Fixed port collision for 22 => 2222. Now on port 2205.
    ==> transition-logs-1: Clearing any previously set network interfaces...
    ==> transition-logs-1: Preparing network interfaces based on configuration...
        transition-logs-1: Adapter 1: nat
        transition-logs-1: Adapter 2: hostonly
    ==> transition-logs-1: Forwarding ports...
        transition-logs-1: 22 => 2205 (adapter 1)
    ==> transition-logs-1: Running 'pre-boot' VM customizations...
    A customization command failed:

    ["storageattach", :id, "--storagectl", "IDE Controller", "--port", 2, "--device", 0, "--type", "hdd", "--medium", "transition-logs-1_extra_disk_sdc_controller_2.vdi"]

    The following error was experienced:

    for controlling VirtualBox. The command and stderr is shown below.

    Command: ["storageattach", "e9a4a9af-c6fe-47e4-8837-7669ecc8500d", "--storagectl", "IDE Controller", "--port", "2", "--device", "0", "--type", "hdd", "--medium", "transition-logs-1_extra_disk_sdc_controller_2.vdi"]

    Stderr: VBoxManage: error: The port and/or device parameter are out of range: port=2 (must be in range [0, 1]), device=0 (must be in range [0, 1])
    VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component StorageController, interface IStorageController, callee nsISupports
    VBoxManage: error: Context: "AttachDevice(Bstr(pszCtl).raw(), port, device, DeviceType_HardDisk, pMedium2Mount)" at line 744 of file VBoxManageStorageController.cpp
    >

    Please fix this customization and try again.
Merge pull request #244 from alphagov/82935274-upgrade_puppet

[#82935274] Upgrade Vagrant Puppet version to 3.7.1 from 3.0.2
Merge pull request #246 from alphagov/82935274-add_all_machines_to_vagrantfile

[#82935274] Define all CI machines in Vagrantfile
Add support for Ubuntu Trusty in Vagrantfile

Allow an Ubuntu distribution to be specified in the Vagrantfile.

When Trusty is specified, use the official Puppetlabs Vagrant box for
Ubuntu Trusty, pulled down from Vagrant Cloud:

https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-puppet
Use official Ubuntu nodejs package under Trusty

Under Ubuntu Precise, we use a custom package from our Launchpad PPA for
nodejs, which provides nodejs version 0.10.32-1chl1~precise1.

Ubuntu Trusty provides a similar version from its official sources,
version 0.10.25~dfsg2-2ubuntu1:
http://packages.ubuntu.com/trusty/nodejs

I've checked with @alexmuller from Performance Platform and they are not
reliant on a specific version of nodejs. Should this cause any issues,
we can always tag specific CI slaves so that their Jenkins jobs run on
the appropriate version.

Because `nodejs` is the only package supplied by our Launchpad PPA for
our CI machines, we also add a conditional so that the PPA is only
sourced for Ubuntu Precise. Under Ubuntu Trusty, we do not use any
package from that PPA.
Support for Ubuntu versions other than Precise

...in the bootstrap script.

Specifically, I'm making this change to add support for Ubuntu Trusty.
Upgrade ghtools to version 0.22.0

Upgrade ghtools to a version that supports Ubuntu Trusty. See this PR:
https://github.com/alphagov/ghtools/pull/9

This prevents a conflict on Ubuntu Trusty between system Python
libraries and Pip libraries.

Specifically, Pip relies on the `IncompleteRead` module that is exported
by `requests.compat`. Version 2.4.3 of the `requests` library removed
that exported module[1].

When `ghtools` is installed, Pip would upgrade `requests` to version
2.4.3 (the latest available), thereby causing Pip to break because the
`requests` module installed by Pip (in
`/usr/lib/python2.7/dist-packages/`) takes precendence over the system
version of that module.

This was causing the following Puppet error on our ci-slave-4 box in Vagrant
using Ubuntu Trusty:

    ==> ci-slave-4: Error: Could not prefetch package provider 'pip': [nil, nil, [(provider=pip)], nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]

When I tried to run `pip` on the Vagrant box, I got the following error:

    vagrant@ci-slave-4:~$ pip
    Traceback (most recent call last):
      File "/usr/bin/pip", line 9, in <module>
        load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
        return ep.load()
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
      File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 11, in <module>
        from pip.vcs import git, mercurial, subversion, bazaar  # noqa
      File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
        from pip.download import path_to_url
      File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
        from requests.compat import IncompleteRead
    ImportError: cannot import name IncompleteRead
    vagrant@ci-slave-4:~$

By installing requiring the exact same version of `requests` as the one
provided by the system under Ubuntu Trusty, Pip no longer needs to
install the `requests` module and `ghtools` will use the system module.
This is also tested under Precise and does not break Pip.