A Performance Platform development environment that uses alphagov/pp-puppet to provision you a virtual machine.
All the scripts and setup tools in this repo are being moved to pp-puppet. This repository should no longer be used.
- Vagrant (note that vagrant >=1.4 is required to use VirtualBox >=4.3)
- And the vagrant-dns plugin:
vagrant plugin install vagrant-dns
- And the vagrant-dns plugin:
- Software to run the virtual machine
- An exact version of VirtualBox for which there exists a machine image in
$boxesByVersion
in the Vagrantfile. At time of writing this means 4.3.6r91406 but more versions may be added in the future. Mixing versions of virtualbox and additions is unsupported. - VMware should also work
- To improve performance, users of OSX can set the nfs flag to true in the Vagrandfile. Linux (nfs seems to be more buggy) users may need to install the following packages:
nfs-kernel-server nfs-common portmap
- local overrides to Vagrant config can go in a local file
- An exact version of VirtualBox for which there exists a machine image in
- Clone this folder onto your local machine with
git clone git@github.com:alphagov/pp-development.git
. You can do this in your~/govuk
folder if you have one or in a separate~/performance-platform
folder - Install dependencies with
GOVUK_DEPS=true ./install.sh
- Warnings about the
pp-deployment
repository can be safely ignored (it contains deployment secrets that you may not have access to)
- Warnings about the
- Start the virtual machine with
vagrant up
- VMWare users may hit an error
- VirtualBox users should not ignore warnings about a mismatch between
the version of VirtualBox and the Guest Additions. One known symptom is the
inability to create symlinks inside Shared Folders, ie
/var/apps
- vagrant-dns occasionally has a problem, so may need additional configuration.
- Starting the machine should also provision it using Puppet (resulting in lots of lines beginning
[bootstrap] Notice: /Stage[main]
), but if it doesn't you can safely reprovision at any time withvagrant provision
- NOTE
Initial provisioning of the machine may fail with an error message of the form:
If this happens, running
Error: No such file or directory - /var/apps/pp-puppet/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/smarchive/archive/version/7663d0c47292d3c50eb71d008ed8a340/archive/spec/fixtures/modules/archive/files Error: Try 'puppet help module install' for usage /var/apps/pp-puppet/vendor/bundle/ruby/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `unlink': Directory not empty - /var/apps/pp-puppet/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/smarchive/archive/version/7663d0c47292d3c50eb71d008ed8a340 (Errno::ENOTEMPTY)
vagrant provision
again may fix it (issue #36). - When provisioning has completed successfully you should see the line:
[bootstrap] pp-development/tools/bootstrap-vagrant exit success
- SSH on to the virtual machine with
vagrant ssh
- Install dependencies for each required app in
/var/apps
by following the instructions in their README files
- SSH on to the machine with
vagrant ssh
- Change to the development directory with
cd /var/apps/pp-development
- Start the apps individually with
bowl backdrop_read
orbowl spotlight
, or all together withbowl performance
- The
bowl
command uses groups from thePinfile
, which runs commands from theProcfile
- The
This only works if your platform is OSX.
Each app runs on its own local port ie 3038, 3039, 3057. From inside the VM you can access apps directly at localhost:3038
. If you install vagrant-dns, you can access the VM from the host through perfplat.dev
subdomains, i.e www.perfplat.dev
or spotlight.perfplat.dev
.