Coder Social home page Coder Social logo

vagrant-govuk's Introduction

vagrant-govuk

Vagrant node definitions for GOV.UK

Prereq

You will need access to the repos:

  • puppet obviously
  • vcloud-templates for node definitions

Setup

The above repos should be cloned in parallel to this one. Either alphagov/gds-boxen or gds/development:install.sh can do this for you.

It is recommended that you use Vagrant > 1.1 from a binary/system install. alphagov/gds-boxen can set this up for you.

Usage

You need only bring up the subset of nodes that you're working on. For example, to bring up a frontend and backend:

vagrant up frontend-1.frontend backend-1.backend

Vagrant will run the Puppet provisioner against the node when it boots up. Nodes should look almost identical to that of our real production/staging/preview environments, including network addresses. To access a node's services like HTTP/HTTPS you can point your hosts file to the host-only IP address (eth1).

Physical attributes like memory and num_cores will be ignored because they don't scale appropriately to local VMs, but can still be customised as described below.

Customisation

Node definitions can be overridden with a nodes.local.json file in the vagrant-govuk directory. This is merged on top of all other node definitions. The following keys are currently available for customisation:

  • box_dist Ubuntu distribution. Currently "precise" (default) or "lucid".
  • box_version Internal version number of the GDS basebox.
  • memory Amount of RAM. Default is "384".
  • ip IP address for hostonly networking. Currently all subnets are /16.
  • class Name of the Puppet class/role.

For example to increase the amount of RAM on a PuppetMaster:

{
  "puppet-1.management": {
    "memory": 768
  }
}

Errors

Some errors that you might encounter..

Ruby warnings

/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
/usr/lib/ruby/gems/1.9.1/gems/puppet-2.7.19/lib/puppet/provider/service/bsd.rb:12: warning: class variable access from toplevel

These are expected because Puppet 2.7 doesn't quite claim to be compatible with Ruby 1.9

Storeconfigs

warning: You cannot collect without storeconfigs being set on line ..
warning: You cannot collect exported resources without storeconfigs being set; the collection will be ignored on line ..

These are expected because storeconfigs doesn't work with puppet apply. If you want to test a manifest that requires storeconfigs you can bring up a puppet-1.management node and use puppet agent.

NFS failed mounts

[frontend-1.frontend] Mounting NFS shared folders...
Mounting NFS shared folders failed. This is most often caused by the NFS
client software not being installed on the guest machine. Please verify
that the NFS client software is properly installed, and consult any resources
specific to the linux distro you're using for more information on how to do this.

This seems to be caused by a combination of OSX, VirtualBox, and Cisco AnyConnect. Try temporarily disconnecting from the VPN when bringing up a new node.

vagrant-govuk's People

Contributors

dcarley avatar philandstuff avatar rjw1 avatar singhgarima avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.