Mapit has a scaling process that is different to other GOV.UK applications.
To scale Mapit, follow these steps:
Edit the Mapit machine Terraform to include a
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-4. You can copy an existing block and change the numbers.
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