Build from Source
Clone the POB source code repository to your development or deployment environment, and build the POB software services and applications.
Last Updated: 26 May 2022 • Page Author: Jillur Quddus
Overview
This page details how to clone the POB source code repository into your development or deployment environment, and then how to compile, build and package the respective POB software services and applications ready for deployment.
Build Tools
Please ensure that the following prerequisite build tools are installed in your development or deployment environment:
OpenJDK 11 - open source reference implementation of Java 11. Please confirm that OpenJDK 11 (or equivalent) is installed correctly by running the following command via your command line:
Apache Maven - open source build automation tool for Java. Please confirm that Apache Maven is installed correctly by running the following command via your command line:
Git - open source distributed version control system. Please confirm that Git is installed correctly by running the following command via your command line:
Source Code Repository
The open-source source code for POB may be found on GitHub in the following public repository: https://github.com/hyperlearningai/pob.
Cloning the Source Code
To clone the POB source code repository into your development or deployment environment, please run the following Git command via your command line (or your preferred Git GUI tool):
The directory into which you cloned the POB source code repository will hereafter be referred to as $POB_BASE throughout the remaining documentation.
Maven Profiles
Parent Profiles
The following table describes the Maven profiles defined in $POB_BASE/pom.xml
.
Application Profiles
The following table describes the Maven profiles defined in $POB_BASE/pob-apps/pom.xml
.
Compile and Build
Configuration
Please ensure that you have entered the correct configuration into the Spring bootstrap and application property files, appropriate to your target deployment environment, prior to running mvn package
below.
As described in Application Configuration, you should set all of your sensitive properties in application.yml as externalised variables rather than plaintext. This way, if you need to change these properties, you do not need to rebuild and redeploy POB - rather you just update the relevant values in your secrets management service such as HashiCorp Vault, Azure Key Vault or AWS Secrets Manager. You may also wish to set non-sensitive properties as externalised variables for the same reason or, alternatively, setup a Spring Cloud Config Server and Client to avoid rebuilding and redeploying POB each time a non-sensitive property value is updated.
Package
To compile and build POB services and applications from source, please run the following commands from your command line.
If you are running mvn package
for the first time, it will take approximately 3 - 5 minutes to complete the build (dependent on the speed of your internet connection) as Maven will download all the required Java dependencies for the first time. Subsequent executions of mvn package
should take between 1 - 2 minutes to complete.
Deployment
Assuming that mvn package
completes successfully, you are now ready to deploy POB. Please follow the links below for deployment instructions specific to your target deployment environment:
Self Managed - deploy POB to a self-managed on-premise, public/private cloud or hybrid environment, integrated with entirely open-source self-managed software services including HashiCorp Vault and HSQLDB.
Microsoft Azure - deploy POB to the Microsoft Azure cloud computing platform, integrated with Azure managed services including Azure Key Vault and Azure Functions.
Amazon Web Services - deploy POB to the Amazon Web Services (AWS) cloud computing platform, integrated with AWS managed services including AWS Secrets Manager, Amazon S3, Amazon RDS and AWS Lambda.
Last updated