Information contained in this repository should be considered provisional and a work in progress, and not the final implementation for the HMDA Platform, unless otherwise indicated.
The HMDA Platform runs on the Java Virtual Machine (JVM), and requires the Java 9 JDK to build and run the project. This project is currently being built and tested on Oracle JDK 9. See Oracle's JDK Install Overview for install instructions.
The HMDA Platform should also run on JDK 8.
The HMDA Platform is written in Scala. To build it, you will need to download and install Scala 2.12.x
In addition, you'll need Scala's interactive build tool sbt. Please refer to sbt's installation instructions to get started.
The HMDA Platform is divided into individual projects, each responsible for a subset of the functionality, as follows:
This is the main filing application, exposing the APIs necessary to upload, validate and store HMDA files.
Microservice that exposes functionality to create a check digit from a loan id, and to validate Univeral Loan Identifiers
- To run the project from the
SBT
prompt for development purposes, issue the following commands on a terminal:
$ sbt
sbt:root> project hmda-platform
sbt:hmda-platform> reStart
- To build JVM artifacts, from the sbt prompt first choose the project you want to build and use the assembly command:
$ sbt
sbt:root> project check-digit
sbt:check-digit>assembly
This task will create a fat jar
, which can be executed on any JDK9
compliant JVM
:
java -jar target/scala-2.12/check-digit.jar
- To build a
Docker
image that runs thehmda-platform
as a single node cluster, from the sbt prompt:
$sbt
sbt:root> project hmda-platform
sbt:hmda-platform> docker:publishLocal
This task will create a Docker
image. To run a container with the HMDA Platform
filing application as a single node cluster:
docker run --rm -ti -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 19999:19999 hmda/hmda-platform
The same approach can be followed to build and run Docker containers for the other microservices that form the HMDA Platform
For a 3 node cluster deployed through the DC/OS CLI, the following command can be used:
dcos marathon app add mesos/hmda-platform-host-mode.json
For more details, please refer to the Marathon Documentation