Skip to content

Latest commit

 

History

History
75 lines (59 loc) · 3.68 KB

updating-validator.md

File metadata and controls

75 lines (59 loc) · 3.68 KB

Validator Update Guide

Prerequisites

Installation of the following on a local machine

Update AWS Server

  • Go to https://github.com/NHSDigital/IOPS-FHIR-Validation-Service repo

  • Create a new branch named update/

  • edit pom.xml

    • Set the <fhir.version> to the relevant hapi-fhir version
    • Set the <version> to the same hapi-fhir version.
  • Within the validator folder run the following:

    • $ mvn clean install
    • $ docker build -t fhir-validator-r4 .
    • $ docker tag fhir-validator-r4:latest <account id>.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:<hapi-fhir version-number>
    • $ docker tag fhir-validator-r4:latest <account id>.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:latest
  • Login in to the AWS website

  • Click ‘Command line or programmatic access’ within NHS Digital IOPS FHIR dev

  • Sign into AWS using either:

    • Copy option 1 if using bash / windows / powershell
    • Copy Option 2 into credentials.txt if you have aws toolkit installed
  • run

    • $ aws ecr get-login-password --region eu-west-2 | docker login --username AWS --password-stdin <account id>.dkr.ecr.eu-west-2.amazonaws.com
    • $ docker push fhir-validator-r4:<hapi-fhir version-number> <account id>.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:<hapi-fhir version-number>

The above cmd can be found within https://eu-west-2.console.aws.amazon.com/ecr/repositories/private/<account id>/fhir-validator-r4?region=eu-west-2 under 'View push commands'.

  • In AWS go to ‘Management console’
    • Search for ECR

    • Ensure the server is set to ‘eu-west-2’

    • On the LHS choose repositories

    • Within Private repositories choose ‘fhir-validator-r4’

    • Ensure the latest image is the recently uploaded version.

    • Search for ECS

    • Go to ‘Task definitions’ (on LHS)

    • Choose ‘iops-fhir-validation-service’

    • Choose latest revision

    • Choose ‘Create new revision’

    • Go to ‘Container-1’ section

    • Update the version number within the Image URI

    • Click ‘Create’

    • Go to Clusters (on LHS)

    • Choose ‘iops-fhir-r4’

    • Choose ‘svc-fhir-validator’

    • Click ‘Update service’

    • Change ‘Revision’ to the latest version

    • Click ‘Update’ This will start the checks. Logs can be found within CloudWatch. ECS is set up for 1 task only so the previous task will shut down automatically.

Create PR with new update

Once the validator update has been checked to ensure no issues with the build create a GitHub PR and get it approved. Once approved create a new release and detail the changes made.

Run Validator instance on local machine

$ mvn spring-boot:run