The Vagrantfile
in this repository contains a definition for a development virtual
machine that can run all our services on one box (it's called development-1
).
To improve performance, users of OS X can set the nfs flag to true in the Vagrantfile. On Linux NFS seems to be more buggy; you may need to install the following packages: nfs-kernel-server nfs-common portmap
.
Local overrides to Vagrant config can go in a local file.
- Clone this folder onto your local machine with
git clone [email protected]:alphagov/pp-puppet.git
. You can do this in your~/govuk
folder if you have one or in a separate~/performance-platform
folder - Install dependencies with
ENT_DEPS=true 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
- Drop back to the root directory of this repository.
- Run
bundle install && bundle exec librarian-puppet install
- Start the virtual machine with
vagrant up development-1
- 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 development-1
- Install dependencies for each required app in
/var/apps
by following the instructions in their README files - Add the following to your hosts file -
10.0.0.100 www.development.performance.service.gov.uk
10.0.0.100 admin.development.performance.service.gov.uk
10.0.0.100 admin-beta.development.performance.service.gov.uk
10.0.0.100 stagecraft.development.performance.service.gov.uk
- SSH on to the machine with
vagrant ssh development-1
- Change to the development directory with
cd /var/apps/pp-puppet/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 OS X.
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
.