How the WMS got automatically provisioned on 5 environments and 14 servers using Ansible and Gitlab CI

In 2017 the developers at the Web Services Group (WSG) along with sysadmins at Network and Communication Services (NCS) upgraded the infrastructure of the Web Management System (WMS) and took this opportunity to revisit the way they collaborate and provision servers in order to address common pain points.

Establishing a formal workflow

The WMS is made of:

These environments used to be hosted on 4 machines, with some of them serving multiple environments. Both developers and sysadmins used to have a full (root) access to all environments and would manually configure the machines as needed with no formal process or workflow:

Pain points associated with this setup include:

As a result a formal workflow has been instated:

  1. Developers express their infrastructure needs (packages required, software configuration, remote filesystems, etc) in Ansible playbooks, which are stored on a Git server like regular code
  2. Whenever developers push a change to the Git master branch, a Continuous Integration system (Gitlab CI) automatically instantiates an Ansible client using Docker and then provisions the Test environments by running these playbooks
  3. When developers are satisfied with the state of the Test environments, they submit a Merge Request from the master branch to the deploy branch on Gitlab
  4. Sysadmins review the Merge Request, allowing for feedback, and either accept or reject it
  5. Once sysadmins accept the Merge Request, Gitlab CI instantiates an Ansible client using Docker and then automatically provisions the Production environments by running the playbooks

Key benefits of this new workflow include:

Automating server provisioning

Key benefits of automating server provisioning:

This was especially valuable when upgrading the infrastructure of the WMS, as provisioning 14 servers on 5 environments manually would likely have taken more time and effort.

This was also valuable when the team decided to strenghten the WMS infrastructure in August 2017 by adding a couple of extra servers to the Live environment in anticipation of an increased resource usage. Provisioning a couple of extra machines required little effort.

Making infrastructure changes traceable

The new workflow makes infrastructure changes traceable at multiple levels:

None of the above was traceable in the old model.

Clarifying responsibilities while promoting collaboration between developers and sysadmins

The new model distinguishes the role of developers from that of sysadmins and fulfills the needs of both teams:

At the same time this workflow encourages the two teams to collaborate: