HUB
Sign inSign up
probate-sol-ccd-services logo

hmcts/probate-sol-ccd-services

By hmcts

•Updated about 8 years ago

Probate Solicitor Services Docker Images

Image
0

5.1K

hmcts/probate-sol-ccd-services repository overview

⁠Spring Boot application template

Build Status

codecov

⁠Purpose

The purpose of this template is to speed up the creation of new Spring applications within HMCTS and help keep the same standards across multiple teams. If you need to create a new app, you can simply use this one as a starting point and build on top of it.

⁠What's inside

The template is a working application with a minimal setup. It contains:

  • application skeleton
  • common plugins and libraries
  • docker setup
  • code quality tools already set up
  • integration with Travis CI
  • Hystrix circuit breaker enabled
  • Hystrix dashboard
  • MIT license and contribution information

The application exposes health endpoint (http://localhost:4550/health⁠) and metrics endpoint (http://localhost:4550/metrics⁠).

⁠Plugins

The template contains the following plugins:

⁠Building and deploying the application

⁠Building the application

The project uses Gradle⁠ as a build tool. It already contains ./gradlew wrapper script, so there's no need to install gradle.

To build the project execute the following command:

  ./gradlew build
⁠Running the application

Create the image of the application by executing the following command:

  ./gradlew installDist

Create docker image:

  docker-compose build

Run the distribution (created in build/install/spring-boot-template directory) by executing the following command:

  docker-compose up

This will start the API container exposing the application's port (set to 4550 in this template app).

In order to test if the application is up, you can call its health endpoint:

  curl http://localhost:4550/health

You should get a response similar to this:

  {"status":"UP","diskSpace":{"status":"UP","total":249644974080,"free":137188298752,"threshold":10485760}}

⁠Setting up the ccd with roles locally

Follow these instructions to setup data on ccd for Sols - using the latest definition (xls)

⁠Host change in definition file

make a note of your local ip address using ifconfig (for me it was labelled tun0) change the endpoint host on any sols callbacks to use this ip address in the definition

⁠Start up

launch the all the containers

docker-compose -f docker/docker-compose-with-ccd.yml up
⁠Roles

upload needed roles

./bin/ccd-add-all-roles.sh
⁠Import

Use the latest version of the spreadsheet from https://git.reform.hmcts.net/probate/ccd-import-spreadsheet⁠

⁠Pick the correct one for the current ccd version you are working on

import the amended definition

./bin/ccd-import-definition.sh "../CCD_Probate_V11.1-Dev.xlsx"

Make sure you update the caseEvents tab, cell S1 to be local and update the ip address in T1
The copy the fields as instructed on the next row of the spreadsheet
Also update the PrintableDocumentsUrl in the caseType tab on the spreadsheet in the same manner

⁠Go to ccd web app
http://localhost:3451/

login to ccd For a solicitor use [email protected]⁠ : password
Alternatively, for a caseworker use
[email protected]⁠ : password

⁠Notes:

You may need to forcibly remove any relevant images db first to ensure the db init is correctly completed

docker image rmi -f $(docker image ls -a -q)

You may also find removing all ontainers helps

docker container rm -f $(docker container ls -a -q)

When the containers are restarted, ccd data has to be reloaded The user token expires approx every 4 hours

⁠Mac users

You will need to reconfigure your docker settings to allow at least 6.5Gb

⁠Hystrix

Hystrix⁠ is a library that helps you control the interactions between your application and other services by adding latency tolerance and fault tolerance logic. It does this by isolating points of access between the services, stopping cascading failures across them, and providing fallback options. We recommend you to use Hystrix in your application if it calls any services.

⁠Hystrix circuit breaker

This template API has Hystrix Circuit Breaker⁠ already enabled. It monitors and manages all the@HystrixCommand or HystrixObservableCommand annotated methods inside @Component or @Service annotated classes.

⁠Hystrix dashboard

When this API is running, you can monitor Hystrix metrics in real time using Hystrix Dashboard⁠. In order to do this, visit http://localhost:4550/hystrix and provide http://localhost:4550/hystrix.stream as the Hystrix event stream URL. Keep in mind that you'll only see data once some of your Hystrix commands have been executed. Otherwise Loading ... message will be displayed on the monitoring page.

⁠Other

Hystrix offers much more than Circuit Breaker pattern implementation or command monitoring. Here are some other functionalities it provides:

⁠License

This project is licensed under the MIT License - see the LICENSE⁠ file for details

Tag summary
Recent tags
Content type
Image
Digest
Size
116.2 MB
Last updated
about 8 years ago
docker pull hmcts/probate-sol-ccd-services:latest