Container Image

We strongly recommend operating an Axon Ivy Engine Cluster in a containerized environment like Docker or Kubernetes.

We recommend that you build your own container image that contains the Axon Ivy Engine and includes your projects and configuration.

You can build the container image automatically by using a build server.

digraph overview { layout=neato; node [shape=box, height="0.8", width="2", color="#007095", style=filled, fixedsize="true", margin=0, fontname="Roboto,Helvetica Neue,Arial,sans-serif", fontcolor="white", fontsize=15 ]; /* nodes */ dockerhub [ label="Docker Hub", pos="4.5,7!", height="0.8", width="1.5"]; git [ label="Git Repository", pos="0,7!", height="0.8", width="1.5"]; build [ label="Build Server", pos="2.5,5.0!", height="0.8", width="1.5"]; dockerregistry [ label="Docker\nRegistry", pos="2.5,3.5!", height="0.8", width="1.5"]; /* this is a kludge, should be a subgraph but won't display as we'd like, so create the "subgraph" ourselves by positioning the elements */ cluster [ label="Axon Ivy Cluster", pos="6.5,3.5!", height="3.5", width="1.8", style="dashed", fontcolor="black", labelloc="t", fontsize=17]; engine1 [ label="Node 1", pos="6.5,4.4!", height="0.8", width="1.5", color="#C7D426", fontcolor="black"]; engine2 [ label="Node 2", pos="6.5,3.5!", height="0.8", width="1.5", color="#C7D426", fontcolor="black"]; enginespacer [label="...", pos="6.5,2.9!", height="0.8", width="1.5", shape=none, fillcolor=none, fontcolor=black]; enginen [ label="Node n", pos="6.5,2.3!", height="0.8", width="1.5", color="#C7D426", fontcolor="black"]; /* edges */ dockerhub -> build; git -> build; build -> dockerregistry; dockerregistry -> cluster; /* edge labels*/ dockerhub_build [ label="axonivy/axonivy-engine", pos="4.5,6.0!", shape=none, fillcolor=none, fontcolor=black, fontsize=11]; git_build [ label="Projects\nConfiguration\nDockerfile", pos="0.5,6.0!", shape=none, fillcolor=none, fontcolor=black, fontsize=11]; build_dockerregistry [ label="your-company/your-project\n \n ", pos="1.4,4.05!", shape=none, fillcolor=none, fontcolor=black, fontsize=11] dockerregistry_cluster [ label="your-company/your-project\n \n ", pos="4.4,3.5!", shape=none, fillcolor=none, fontcolor=black, fontsize=11]; }

The build server:

  1. Checks out:

    • all your projects

    • your configurations

    • a Dockerfile that specifies how to build your container image from a Git repository.

  2. Builds all your projects and bundles them in an application zip file.

  3. Builds your container image as defined by the Dockerfile. It pulls the base image axonivy/axonivy-engine image from Docker Hub.

  4. It stores your new image (your-company/your-project) in a Docker Registry.

Then, you can start your Axon Ivy Engine Cluster using your new container image (your-company/your-project).

A simple Dockerfile that bundles the Axon Ivy Engine, your projects, and your configuration files in a container image looks as follows:

# The base docker image
FROM axonivy/axonivy-engine:12.0

# Add your adapted ivy.yaml configuration file
ADD --chown=ivy:ivy config/ivy.yaml /ivy/configuration/ivy.yaml

# Add your license file
ADD --chown=ivy:ivy config/myCompany.lic /ivy/configuration/myCompany.lic

# Add your projects bundled in an application zip file
ADD --chown=ivy:ivy application/target/application.zip /ivy/deploy/application.zip

# Create a data directory to be mounted as a docker volume
# to be shared between cluster nodes
RUN mkdir -p /ivy/data && chown -R ivy /ivy/data

Examples

Please refer to our project-build-examples. It shows you how to use Maven to build your container image including both your Axon Ivy Engine and your application zip file.

Additionally, refer to our example configurations on GitHub for NGINX and HAProxy to learn how to set up an Axon Ivy Engine Cluster with docker-compose.