Please note, this terraform build should be considered experimental!
This is a terraform build to deploy the Hull Stack to an Azure Kubernetes Service, and Archivematica to a standalone VM.
- Terraform
- Docker and Docker compose
- Ruby
- Azure CLI
- Azure subscription
- gem install 'azure-storage-file'
(relative to cluster/)
- create
terraform.tfvars
(seeterraform.tfvars.template
) OR (see convention below ../../terraform_builds/myapp/terraform.tfvars) - create file
config.json
with {} as the contents - this will be overwritten with docker auth, but must not be committed to github - Env file at
../.env
(see../.env.template.combined
) - Solr config files at ../solr/config
You need Docker Images for pre-built for the following:
- hull_culture (via hyrax_leaf with .env)
- hull_synchronizer (with .env)
- hull-history-centre-bl7 (with .env)
Build with:
docker-compose build
then (from the cluster directory):
terraform init (first time only)
terraform plan
terraform apply
Once the Kubernetes Cluster is built, cd into the archivematica directory and provide the following terraform.tvars
Run this after building the azure kubernetes cluster, supplying the following in terraform.tfvars
shared_resource_group_name
The /data mount on Hull Synchronizer needs to be shared by Archivematica: fileshare_account_name fileshare_account_key fileshare_name
terraform init (first time only)
terraform plan
terraform apply
Scripts been copied to the azureuser home directory.
chmod +x archivematica-install.sh
./archivematica-install.sh
This script requires some interactive input. When you are prompted to create a password for the archivematica-mcp-server, you must use demo as the password during the install process. The password can be changed after the installation is complete.
When prompted about the mail server, select Mail server - No configuration (for now at least)
chmod +x archivematica-mount.sh
./archivematica-mount.sh
When configuring archivematica storage service edit the locations for AIP Storage, DIP Storage and transfer source so that they use the newly mounted volumes:
- AIP Storage => /archive
- DIP Storage => /data/dipstore
- Transfer Source => /data/transfer
The terraform plan creates and Automation Account and a Log Analytics Workspace. To enable automatic startup and shutdown of the underlying kubernetes VM, for example to save costs of a development or test machine, follow these steps:
In the Azure portal:
- Navigate to Resource Group > Automation Account
- Create a 'run as user'
- In the left-hand menu, find Related Resources > Start/Stop VM
- Select 'Learn more about and enable the solution' and hit Create
- Choose the existing Automation Account, Log Analytics Workspace and Resource Group
- In the configuration panel, enter the MC_ resource group, eg. MC_leaf-uat-rdg_leaf-uat-rdg_northeurope (this is important, otherwise the solution will shut down ALL VMs in your subscription)
- Save
Once the deployment is complete, edit the schedules (Scheduled-StartVM and Scheduled-StopVM) as needed from within the automation account.