Skip to content

A service for managing identity data about the people we look after in HMPPS

License

Notifications You must be signed in to change notification settings

ministryofjustice/hmpps-person-record

Repository files navigation

hmpps-person-record

repo standards badge CircleCI Docker Repository on Quay

A service for managing identity data about the people we look after in HMPPS

Prerequisites

  • JDK 21

Running tests

$ make start-containers
$ make test

Running Service Locally

Mostly runs against dev services, uses localstack for the queues

Ensure all docker containers are up and running:

$ make start-containers

Which should start the following containers: (verify with $ docker ps if necessary)

  • postgres
  • localstack-hmpps-person-record

To stop the containers:

$ make stop-containers

Start the service ensuring the local spring boot profile is set:

$ ./gradlew bootRun --args='--spring.profiles.active=local'

Seeding data

  1. Pause message consumption by adding the profile seeding to the spring configuration in helm
  2. Delete all data with source system of NOMIS or DELIUS as appropriate
    delete from personrecordservice.person p where p.source_system = 'DELIUS'
  1. Get a shell on the hmpps-person-record pod (this is for preproduction):
kubectl exec -it deployment/hmpps-person-record -n hmpps-person-record-preprod -- bash

# takes 90 minutes to 3 hours
curl -i -X POST http://localhost:8080/populatefromprison 

# takes 7-8 hours
curl -i -X POST http://localhost:8080/populatefromprobation
  1. remove the profile seeding to resume message consumption

importing cluster data manually

How to import cluster data

process a Common Platform message

AWS_REGION=eu-west-2 AWS_ACCESS_KEY_ID=key AWS_SECRET_ACCESS_KEY=secret aws --endpoint-url=http://localhost:4566 sns publish \
    --topic-arn arn:aws:sns:eu-west-2:000000000000:courtcaseeventstopic \
    --message-attributes file://$(pwd)/src/test/resources/examples/commonPlatformMessageAttributes.json \
    --message file://$(pwd)/src/test/resources/examples/commonPlatformMessage.json

Deployment

Builds and deployments are set up in Circle CI and configured in the config file.
Helm is used to deploy the service to a Kubernetes Cluster using templates in the helm_deploy folder.

About

A service for managing identity data about the people we look after in HMPPS

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages