Skip to main content

Working in Modernisation Platform

The Analytical Platform makes use of the Modernisation Platform as a hosting solution for some of its services (e.g. analytical-platform-ingestion). As such, it is important to understand how to develop solutions effectively in this context.

Running Terraform in Modernisation Platform

In this case we will use the analytical-platform-ingestion environment.

  1. Clone the modernisation-platform-environments repository and open it in Visual Studio Code.

  2. Start the Dev Container. Cmd + Shift + P -> Dev Containers: Reopen in Container

  3. Navigate to the environment you are operating in - cd terraform/environments/analytical-platform-ingestion.

  4. To run a terraform init + terraform plan run the following command:

    $ bash /workspaces/modernisation-platform-environments/scripts/member-local-plan.sh
    
    Account: analytical-platform-ingestion
    Stage: development
    Role: modernisation-platform-sandbox
    
    Verify this code in your browser: ABCD-EFGH
    Please open the following URL in your browser:
    
    https://device.sso.eu-west-2.amazonaws.com/?user_code=ABCD-EFGH
    
  5. Click on the link provided and authorise AWS in the browser. Return to your terminal.

  6. You can now run this command repeatedly with a fast feedback loop to understand the changes you are making in Terraform.

Common Errors

If you run the member-local-plan.sh script and produce the error:

FATAL   Error running command: Invalid --profile analytical-platform-ingestion-development:modernisation-platform-developer

Then you need to use the -r flag in the member-local-plan.sh script:

$ bash /workspaces/modernisation-platform-environments/scripts/member-local-plan.sh -r modernisation-platform-sandbox

Modernisation Platform Environments repository has a different deployment process from the main Analytical Platform repository. You need to grant explicit approval for deployment to all environments.

Remember: Just because you merged it, doesn’t mean you deployed it!

This page was last reviewed on 10 October 2024. It needs to be reviewed again on 10 January 2025 by the page owner #analytical-platform-notifications .