Skip to main content
Last updated: 4 May 2022

Scale Mapit

Mapit has a scaling process that is different to other GOV.UK applications.

To scale Mapit, follow these steps:

  1. Edit the Mapit machine Terraform to include a module mapit-<number>, resource "aws_erb_volume" "mapit-<number>" and resource "aws_iam_role_policy_attachment" "mapit_<number>_iam_role_policy_attachment" block for each instance, e.g. for 4 instances you would need a mapit-1, mapit-2, mapit-3 and mapit-4. You can copy an existing block and change the numbers.

  2. Deploy the Terraform.

  3. Install the virtualenv by running the following on each new instance:

   sudo pip3.6 install setuptools virtualenv pip gunicorn --upgrade
   sudo rm -rf /data/apps/mapit/shared/venv3
   sudo -H -u deploy virtualenv /data/apps/mapit/shared/venv3 -p python3.6
  1. Make the Mapit database available to each machine.