Our approach to testing

This is a post by Rajesh Yarlagadda and David Vidal, our test engineers.

This post is the third post in our series covering how we approach continuous delivery, covering our approach to testing.

Testing is an essential component of each and every phase of the mygov.scot development process, with quality being “baked in” to the product at every stage. This blog post provides an overview of how we approach testing, and some of the tools we use. Feel free to get in touch if you’d like to know a bit more about a particular technology or our reasons behind using it.

After creating a new feature to meet a particular user need, our developers submit changes to our version control system – this can include source code, environment modifications and configuration files.

Following a commit to the version control system, the continuous integration server will do the following:

  • Trigger a build
  • Run automated unit tests
  • Perform sonar code quality check
  • Automatically deploy the successful build to a development environment


Continue reading

Masterless Puppet and Declarative provisioning

This is a post by Gordon Clark, one of our Infrastructure Engineers, and Jono Ellis, our Social Media Manager.

This post is the second post in our series covering how we approach continuous delivery, covering the tools that we use.

We are not precious about our servers, they are just tools for a defined purpose and when they’ve reached the end of their usefulness we can get rid of them. They are disposable. This is something you can only do with cloud computing – we don’t own a physical server anywhere; instead we create and configure servers from our cloud providers. The benefits are the speed and agility that this setup offers us. As an example, in order to test a proof of concept we could spin up several servers to do a task, gather whatever stats we needed, and then we could destroy them. With no physical server needing to be purchased, set up, powered, etc. there are significant environmental benefits to this approach.


We use several tools in order to facilitate our server configuration management:

  • Puppet – provisioning and configuration of hosts (we use Puppet in a masterless way);
  • Packer – definition and creation of our base image;
  • Base images – assignment of a role and an environment (based on the rules for the role a host is given, the host will self-provision. This means that the host gathers packages and configuration from a known artifact repository such as Debian);
  • Vagrant – deploying Puppet runs locally for testing purposes.

Roles and Profiles

The role a server is provided with equates to a business need i.e. a web server, an application or a database server.

Each role (e.g. web server) has an accompanying module in Puppet. This Puppet module in turn contains one or more technology profiles, which are also described in Puppet. Each host can only be assigned a single role but each role can contain multiple profiles (which is turn can contain multiple modules). The modules are directly related to an individual technology, e.g. NGINX, Java or PostgreSQL. The diagram below shows how the hierarchy is arranged. It should be noted that the modules are generic, they can be used in any environment and do not contain any configuration related to an individual host. The configuration data is abstracted to Hiera.

Continue reading

How we approach continuous delivery

This is a post by Gordon Clark, one of our Infrastructure Engineers, and Jono Ellis, our Social Media Manager.

Over the next few weeks, we have a series of blog posts coming up which cover our approach to continuous delivery. This first post is a high-level overview of our work, mostly written for our readers who work in government, the individual posts will be more detailed and will be aimed at infrastructure engineers, developers and testers. We’d love to hear your comments and questions, so let us know either at the comments section below or via Twitter.

Over the coming weeks we aim to cover:

The mygov.scot site is built from the ground up around the needs of the user. To find out if we’re building the right thing we want to be able to quickly get our work in front of our users – this ensures that we receive feedback early and often, and allows us to change direction accordingly. We also want to ensure that we are delivering consistently, and with quality. The model that we have in place to control how we work is called continuous delivery.

Continue reading

We’re celebrating women in tech with Ada Lovelace Day

This is a post by Kate Ho, our Product Owner

We’re not going to be talking about our progress or about new features as normal today. That’s because it’s the 13th October – an important day in the calendar for us to celebrate women in technology. It is Ada Lovelace Day.

It’s simple. Today is an opportunity to share stories about women working in science, technology, engineering or mathematics (STEM) that inspire you, so that we can start to raise awareness of role models for the next generation to look up to.

We’ve been incredibly lucky in the past few years; our list of potential role models in the tech industry, that are women, has grown exponentially. Sheryl Sandberg (Facebook), Marissa Mayer (Yahoo!), Meg Whitman (former eBay, now HP CEO) are just a few women in high profile companies that have become household names in the last few years.

This year, we wanted to highlight some people that are closer to home: the three women that work in our product and experience teams at mygov.scot. Their passion, drive and determination to realise our vision is inspiring not only to me, but also to those that want to work in the technology industry. On top of that, it also demonstrates that you don’t need to be a developer to work in tech; there are lots of roles that require technical skills, that don’t involve coding everyday.

Continue reading

Introducing a simple, helpful tool for decommissioning websites

This is a post by Jono Ellis, our Social Media Manager

Websites within the Scottish public sector portfolio that are out of date, duplicating information available elsewhere or are no longer maintained help sustain a poor experience for citizens. Through working with our partners, we are spotting candidates that display these poor attributes and are thus low hanging fruit for transitioning to www.mygov.scot. This should be a seamless process for all involved.

It’s important that we get our approach to transitioning right to ensure users have a seamless experience when moving from a legacy website to www.mygov.scot. Redirecting and decommissioning is the bane of many people and is usually victim to corner cutting – resulting in wildcard redirects to the homepage.

Since our team will likely have to transition several websites in partnership with other teams over the next few years, we have decided to build something that will make life a little easier.

Why is it important to redirect legacy websites?

We redirect old/broken URLs for two reasons – to retain search value (e.g. in Google) and to benefit our users; few things are more frustrating than discovering that the page that you are trying to find in search or via a bookmark has gone missing. Broken links don’t instil trust from users or from search engines – and since search is such an important way for users to find content on any website we want to make sure that we handle transitioning legacy websites and URLs correctly.

Continue reading

Introducing beta.mygov.scot

This is a post by Peter Smith, Product Owner for alpha and beta

From today you can see the beta version of mygov.scot. This marks the start of a phase in which we will continually add content and features to the site, making use of the tools and processes we have been developing since the release of alpha. Care Information Scotland (CIS) and the Scottish Business Portal are amongst the first to work with us on content and we would like to thank them for working alongside the team on this early beta release.



Continue reading

Security within agile environments

This is a post by Neil Campbell, our Information Security Officer and is part of our series on Standards & Guidelines

Security within agile environments can be challenging. There’s a need to juggle a large number of competing factors including velocity, compliance requirements, ambitions around user experience and adherence to standards – all while maintaining the flexibility required to deliver a great product for our users.

We thought about best practice in relation to security, and for risk, balancing these so we had something we could work with. Risk in the mygov.scot programme is being used to balance complex and at times competing factors, allowing us to have a well rounded response.

As part of our risk management we are looking to ensure that the landscape people make decisions in is current. Security decisions should be reviewed, ensuring the service remains appropriately secure.

Continue reading