Weeknotes: 23rd September 2019
This week I learnt how to pair.
At ceremonies on Tuesday we agreed as a team to do more pairing. Some of the team (and department) are really passionate about pairing, some (like me) have never really done it before. But certainly no-one was against the idea, so we decided to give it a go.
I think we dived into this experiment more than anticipated, with most of us spending the majority of the rest of the week closely (and remotely) pairing. It could be seen as a trial by fire, but I think we were all experienced and mature enough to just give it a fair short.
This only marks the beginning of our pairing journey, but we’ve learnt a few lessons already. Firstly, dodgy internet connections are really problematic when pairing remotely (sorry colleagues!). Secondly, choose your battles: we identified the core, complex work and paired on that, then separated to do the more mundane or tedious bits: filling our further tests, fiddling with HTML.
We’ve been lucky to have work that accommodates pairing excellently (it’s been quite complex and involved, and is also very important to the product), so it will be interesting to see how this momentum keeps up.
Infrastructure as code
I’ve spent a fair amount of time with our infrastructure recently, and realised that I’ve grown in confidence with managing it. I thought this marked a good opportunity to give a brief intro to Infrastructure as code, and how we’re using Terraform.
The idea of the “Infrastructure as code” “movement” is that you can explain your infrastructure (servers, databases, DNS records, passwords etc. etc.) in a standardised format so that it can be applied automatically by tooling.
For example, you might have a file with a description of your database, including what the root password is and what other users/permissions should be granted. When run, your tool can then set up the database in your service provider of choice. If you need to change permissions, you re-run the tool and it will cleanly apply the updates (without destroying and recreating everything, wherever possibe).
There are various benefits of this, but among them:
- Your infrastructure is human-readable and in one place
- If you put your infrastructure code into version control, you have a full audit history of changes made
- There are no surprising changes squirreled away in admin consoles
- You don’t have to deal with confusing (and sometimes misleading) provider UIs.
Our tool of choice is Terraform, which provides an easy-to-undestand syntax and a massive selection of providers (services you can describe in your code). In particular, the AWS integration is very complete.
Terraform makes documenting our (fairly complex) infrastructure really easy, and making changes to it easier still. Being part of our codebase and full CI/CD pipeline, it’s also very easy to automatically test changes and know when something’s wrong.
As well as setting up our service, the wider OPG team uses Terraform to manage our GitHub and AWS accounts. So when a new member of staff joins a team, their access is granted via a pull request and we can be confident they have the same access as their colleagues.
I’m still a beginner with Terraform and Infrastructure as code, but I’m quickly seeing the power and confidence it brings.
- Implemented the switch from Gulp to Webpack with very litle excitement
- Finished development on our new cookie page: we’re planning to adopt a consistent approach across OPG’s public-facing services and it’s nice to lead the way
- Developed a new framework for analytics/metrics in Complete the deputy report: this will make it easier for us to measure the value/impact of our work going forward
- This is the first time I’ve built something from a fresh prototype in a long time, which was very satisfying: no last minute questions or surprises
- Saw a great demo from our designer about redoing the admin pages, in part using the MOJ Design System; I’ve also been looking at how to move from our custom CSS components to the MOJDS elsewhere
- Spent most of Friday fixing a pipeline issue with our infrastructure, which was fully resolved at 17:15 💪