To build EnMasse, you need
- JDK >= 1.8
- Apache Maven >= 3.0
- Python
- Docker
- GNU Make
- Node.js >= 6
- Npm >= 3
- GNU GCC C++ (to build jsonnet tool)
- Asciidoctor (optional, only required for docs)
- Python Pip (optional, only required for systemtests)
- Xvfb (optional, only required for systemtests)
- Firefox (optional, only required for systemtests)
The EnMasse java modules are built using maven. Node.js modules are built using make. All docker images are built using make.
Note: asciidoctor is only required to build the help page for the console.
jsonnet is required to build templates. It is configured as a submodule that can be initialized:
git submodule update --init
Note: Make sure docker daemon is in running state.
make
This can be run at the top level or within each module. You can also run the 'build', 'test', and 'package' targets individually. This builds all modules including java.
export DOCKER_ORG=myorg
export DOCKER_REGISTRY=docker.io
#optional parameters
export COMMIT=v.1.0.3 #for specific version of your image
docker login -u myuser -p mypassword $DOCKER_REGISTRY
# To generate templates to pull images from your docker hub org
make -C templates
make docker_tag
make docker_push
Note: If you are using OpenShift and 'oc cluster up', you can push images directly to the builtin registry
by setting DOCKER_ORG=myproject
and DOCKER_REGISTRY=172.30.1.1:5000
instead.
make deploy
make SYSTEMTEST_ARGS=SmokeTest systemtests
make client_install
make webdriver_install
Xvfb :10 -ac &
DISPLAY=:10 PATH=$PATH:(pwd)/systemtests/web_driver make systemtests
make SYSTEMTEST_ARGS="io.enmasse.systemtest.standard.QueueTest#testCreateDeleteQueue" systemtests
This is a reference of the different make targets and options that can be set when building an individual module:
build
- buildtest
- run testspackage
- create artifact bundledocker_build
- build docker imagedocker_tag
- tag docker imagedocker_push
- push docker imagedeploy
- deploys the built templates to OpenShift. The images referenced by the template must be available in a docker registrysystemtests
- run systemtests
Some of these tasks can be configured using environment variables as listed below.
There are several environment variables that control the behavior of the build. Some of them are only consumed by some tasks:
- OPENSHIFT_MASTER - URL to OpenShift master. Consumed by
deploy
andsystemtests
targets - OPENSHIFT_USER - OpenShift user. Consumed by
deploy
target - OPENSHIFT_PASSWD - OpenShift password. Consumed by
deploy
target - OPENSHIFT_TOKEN - OpenShift token. Consumed by
systemtests
target - OPENSHIFT_PROJECT - OpenShift project for EnMasse. Consumed by
deploy
andsystemtests
targets - DOCKER_ORG - Docker organization for EnMasse images. Consumed by
build
,package
,docker*
targets. tasks. Defaults toenmasseproject
- DOCKER_REGISTRY - Docker registry for EnMasse images. Consumed by
build
,package
,docker_tag
anddocker_push
targets. Defaults todocker.io
- TAG - Tag used as docker image tag in snapshots and in the generated templates. Consumed by
build
,package
,docker_tag
anddocker_push
targets.