These instructions are for advanced engineers who want to run their own instance of FeatureHub.
If you don’t need to customise or enhance FeatureHub, we recommend using the prebuilt Docker images for running FeatureHub.
This project requires you to have Java 11 as your primary Java and Maven 3.5 or later installed.
Java 11 should be downloaded from https://adoptopenjdk.net/ (do not download it from Oracle)
This downloads as a gziped tar file, extract the folder and move it to
/Library/Java/JavaVirtualMachines but ensure
you tack a
.jdk on the end, so
Then set the environment variable JAVA_HOME to that folder + `/Contents/Home'.
We recommend using brew on Mac OS X to install Java. You can use any version 11+.
If you have downloaded it from AdoptOpenJDK (or used brew), then use this:
If you have downloaded it from Oracle, use the following (or similar based on the version you have)
This will cause the installed 'java' to swap to that version.
java -version to confirm it has changed.
This application stack uses Java 11+.
To install FeatureHub run:
cd backend && mvn -f pom-first.xml clean install && cd .. && mvn -T4C clean install
Build should include the Docker ready tar file (see below).
If you get an error like
If you wish to do individual builds, which we recommend if you are overriding base images and so forth, cd into
those folders. First you will need to make sure the front end builds - it normally builds and installs as part of the
whole build process. Go into the
admin-frontend folder and type:
mvn -Ddocker-cloud-build=true clean install
This is a docker build using a Flutter image of the front-end.
Then jump into your chosen folder and your command is:
mvn -Ddocker-cloud-build=true -Dapp.baseimage=docker://featurehub/base_mr:1.7 -Dapp.port=8085 -Dbuild.version=0.0.1 clean package
build.version are the versions you specify. The
docker:// prefix just means
it will pull it from Docker. It is using
jib from Google, so you may wish to further play around with those settings.
docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 nats:2.1.2-scratch
if you were running it and the container has shut down for some reason (machine reset for example):
docker restart nats-main
Alternatively, you can simply download it for your O/S and run it. It takes up less memory.