- JDK 21
$ make start-containers
$ make test
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'
- Pause message consumption by adding the profile
seeding
to the spring configuration in helm - Delete all data with source system of NOMIS or DELIUS as appropriate
delete from personrecordservice.person p where p.source_system = 'DELIUS'
- 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
- remove the profile
seeding
to resume message consumption
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
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.