OntoPop
Search…
Build from Source
Clone the OntoPop source code repository to your development or deployment environment, and build the OntoPop software services and applications.
Last Updated: 28 March 2022 • Page Author: Jillur Quddus

Overview

This page details how to clone the OntoPop source code repository into your development or deployment environment, and then how to compile, build and package the respective OntoPop 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:
$ java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
  • 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:
$ mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.13, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.13.0-28-generic", arch: "amd64", family: "unix"
  • Git - open source distributed version control system. Please confirm that Git is installed correctly by running the following command via your command line:
$ git --version
git version 2.25.1
  • Node.js 14 LTS - open source backend JavaScript runtime environment. Please confirm that Node.js is installed correctly by running the following command via your command line:
$ node -v
v14.19.0
  • NPM - package manager for the Node.js JavaScript runtime environment. Please confirm that NPM is installed correctly by running the following command via your command line:
$ npm --version
8.5.1

Source Code Repository

The open-source source code for OntoPop may be found on GitHub in the following public repository: https://github.com/hyperlearningai/ontopop.

Cloning the Source Code

To clone the OntoPop 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):
# Clone the OntoPop GitHub public repository
$ git clone https://github.com/hyperlearningai/ontopop.git
# Navigate into the OntoPop project folder
# This location will hereafter be referred to as $ONTOPOP_BASE
$ cd ontopop
The directory into which you cloned the OntoPop source code repository will hereafter be referred to as $ONTOPOP_BASE throughout the remaining documentation.

Maven Profiles

Parent Profiles

The following table describes the Maven profiles defined in $ONTOPOP_BASE/pom.xml.
Profile Name
Default Profile
Description
apps
Yes
Manages the lifecycle of all OntoPop's core services as well as all OntoPop Spring Boot applications (i.e. serverless function apps and API applications) across all cloud vendors.

Application Profiles

The following table describes the Maven profiles defined in $ONTOPOP_BASE/ontopop-apps/pom.xml.
Profile Name
Default Profile
Description
apps-multicloud
Yes
Manages the lifecycle of all OntoPop Spring Boot applications (i.e. serverless function apps and API applications) across all cloud vendors.
apps-spring
No
Manages the lifecycle of Spring Boot applications designed for development and testing purposes, or for deployment to self-managed or Spring Cloud environments.
apps-aws
No
Manages the lifecycle of AWS Spring Boot applications designed for deployment to AWS Lambda and AWS Beanstalk apps respectively.
apps-azure
No
Manages the lifecycle of Microsoft Azure Spring Boot applications designed for deployment to Azure Function apps and Azure Web Apps respectively.

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 Context, you should set all of your sensitive properties in application.yml as externalized variables rather than plaintext. This way, if you need to change these properties, you do not need to rebuild and redeploy OntoPop - 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 externalized variables for the same reason or, alternatively, setup a Spring Cloud Config Server and Client to avoid rebuilding and redeploying OntoPop each time a non-sensitive property value is updated.

Package

To compile and build OntoPop services and applications from source, please run the following commands from your command line.
# Navigate to $ONTOPOP_BASE
$ cd $ONTOPOP_BASE
# Clean the project working directory
$ mvn clean
# Compile, build and package OntoPop
# By default this will build all services and applications
$ mvn package
# If you wish to build OntoPop's core services only,
# then disable the "apps" Maven profile as follows.
$ mvn package -P \!apps
# If you wish to build OntoPop's core services but only the
# apps intended for deployment to a self-managed environment
# or to Spring Cloud, then enable the "apps-spring" Maven
# profile as follows.
$ mvn package -P apps-spring
# If you wish to build OntoPop's core services but only the
# apps intended for deployment to AWS, then enable the
# "apps-aws" Maven profile as follows.
$ mvn package -P apps-aws
# If you wish to build OntoPop's core services but only the
# apps intended for deployment to Azure, then enable the
# "apps-azure" Maven profile as follows.
$ mvn package -P apps-azure
If you are running mvn package for the first time, it will take approximately 5 - 10 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 2 - 3 minutes to complete.

Deployment

Assuming that mvn package completes successfully, you are now ready to deploy OntoPop. Please follow the links below for deployment instructions specific to your target deployment environment:
  • Self Managed - deploy OntoPop to a self-managed on-premise, public/private cloud or hybrid environment, integrated with entirely open-source self-managed software services such as HashiCorp Vault, RabbitMQ, MySQL, Apache Jena Fuseki, JanusGraph and Elasticsearch.
  • Microsoft Azure - deploy OntoPop to the Microsoft Azure cloud computing platform, integrated with Azure managed services including Azure Key Vault, Azure Blob Storage, Azure Service Bus, Azure Functions and Azure Web Apps.
  • Amazon Web Services - deploy OntoPop to the Amazon Web Services (AWS) cloud computing platform, integrated with AWS managed services including AWS Secrets Manager, Amazon S3, Amazon MQ, AWS Lambda and AWS Elastic Beanstalk.