My FNZ Studio Version
The article you are currently reading is not compatible with your selected My Appway version.

System Installation & Upgrade

Latest Update: 22.07.2022 | Margherita Taffarel
Documentation
10

1 Introduction

The Appway Platform is a web application that runs on a Java application server. No Java application client is required; both the Appway Studio and Workspace can be accessed through a web browser.

The Appway Platform has one or more nodes at runtime. When using containers, each Appway node runs in a separate container. Each container runs a Java application server and the Appway Platform web application.

Furthermore, the Appway Platform requires a storage solution for the Cluster Storage. And, optionally, Appway can be configured to store large files in one or more Blob Storage solutions.

1.1 Related Sources

See also the following related sources:

2 Preparation

This System Installation Guide is structured as follows:

  • Section Standard Appway Docker Image presents the Standard Appway Docker images. In this section we explain how to use Standard Appway Docker images and show its features.
  • Section Running Appway in Kubernetes shows how to embed the Standard Appway Docker images in a container orchestration system. We use Kubernetes, but other systems are possible and have similar requirements.

2.1 Prerequisites

For the Standard Appway Docker Image part, you need the following:

  • From your side:
    • A laptop or any other machine with Docker installed.
  • From Appway:
    • Access to a Docker repository which has the Standard Appway Docker images.

For the Running Appway in Kubernetes, you need the following:

  • From your side:
    • A Kubernetes cluster (for sizing recommendations, please see section Infrastructure Requirements in the System Installation: Technical Requirements article).
    • The tool kubectl
    • The tool Helm version 3.
    • One Cluster Storage solution (for supported solutions, see details).
    • Optionally, One or more Blob Storage solutions (for supported solutions, see details).
    • Access credentials for 3rd-party system that Appway has to integrate with, e.g. LDAP, relational database server, and so on.
  • From Appway:
    • Access to a Docker repository which has the Standard Appway Docker images
    • Appway License file (specifies the number of nodes allowed in the cluster)
    • The KubernetesHazelcastDiscovery Appway Extension (this is required for node discovery in Kubernetes)
    • Additional Appway Extensions that you have licensed (mandatory extensions are already included in the Standard Appway Docker image)
    • Additional Appway Packages which you have licensed (mandatory Packages are already included in the Standard Appway Docker image)

Contact Appway Support to request the necessary files and access credentials to our Docker repository.

3 Standard Appway Docker Images

  1. To start the Appway Platform using Docker, execute the following:

    $ docker login
    $ # enter the credentials that you received from Appway
    $ docker run --name appway appwayag/platform
    
  2. When the startup is finished, you should see the following log:

    2020-04-07 13:02:29,939 INFO  [localhost-startStop-1] com.nm.bricks.impl.DemiurgeBrick - start-up done.
    
  3. To stop again, press Ctrl-C.

3.1 Access Appway (Expose Ports)

In the previous example, Appway itself was not actually shown - neither the Appway Studio nor the Workspace. To be able to access Appway running in a container, you need to expose different ports.

The Standard Appway Docker images allows you to export the following ports:

  • 8080 ⁠— HTTP port. This port can be used to access the Appway Studio and Workspace.
  • 5713 ⁠— Hazelcast port. This port is used by Hazelcast to connect the different nodes in the Appway Cluster.
  • 5556 ⁠— JMX port. This port can be used to inspect JMX beans.

Follow these steps:

  1. Start Appway again. To access the Appway Studio, you need to expose the 8080 port using the -p parameter of docker run:

    $ docker run --name appway \
     -p 8080:8080 \
     appwayag/platform
    
  2. Point a web browser to http://localhost:8080/admin.

3.2 Configure Appway (Use Environment Variables)

The Standard Appway Docker images understand a number of Environment Variables which allow configuring the Java virtual machine, the Java application server, and Appway itself.

Here are some examples:

  • JAVA_OPTS ⁠— Java runtime options
    • They are passed to the Java runtime when starting it
    • Examples: -Xmx2g -Duser.timezone=Europe/Zurich -Dfile.encoding=UTF8
  • NM_SYSTEM_ID or APPWAY_CLUSTERTOOLS_EVENTS_LIMIT ⁠— Appway configuration properties
    • They are passed to Appway and allow overwriting the configuration of the platform (Core platform and Extensions). See more details.

When starting Appway, environment variables can be passed using the -e parameter of docker run like this:

$ docker run --name appway \
    -p 8080:8080 \
    -e NM_SYSTEM_ID=aw-docker \
    appwayag/platform

Note, there are also other options to configure Appway. Check this document to understand the different types of configuration and when they should be used.

3.3 Provide a License File (Mount a File)

So far a license file has not been specified To do so, you need to mount a given license file into the Docker container.

Assuming you have a license file called license.properties in the current directory, you can use the -v parameter of docker run to mount it in the proper location:

Note you have to provide an absolute path when mounting the license file. $(pwd)/license.properties will create one using the current directory.
$ docker run --name appway \
    -p 8080:8080 \
    -e NM_SYSTEM_ID=aw-docker \
    -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
    appwayag/platform

3.4 Add Additional Extensions (Mount a Directory)

To add additional extensions:

  1. Copy them to a subdirectory called extensions in your current directory and then mount this directory like this:

    $ docker run --name appway \
     -p 8080:8080 \
     -e NM_SYSTEM_ID=aw-docker \
     -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
     -v $(pwd)/extensions:/appway/additional-extensions \
     appwayag/platform
    
  2. The additional extensions are picked up and started automatically during startup.

3.5 Add Additional Packages (Mount a Directory)

To add additional Packages, a similar approach as for additional extensions (section 3.4) can be used.

  1. Copy the additional Packages to a subdirectory called packages in your current directory and then mount this directory like this:

    $ docker run --name appway \
     -p 8080:8080 \
     -e NM_SYSTEM_ID=aw-docker \
     -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
     -v $(pwd)/extensions:/appway/additional-extensions \
     -v $(pwd)/packages:/appway/additional-packages \
     appwayag/platform
    
  2. The additional packages are picked up and imported during startup.

3.6 Configure Cluster Storage

Now that you know how to add additional extensions and configure them (see sections Configure Appway and Add Additional Extensions) you are fully equipped to use any supported Cluster Storage solution.

Appway supports the following Cluster Storage types:

  • Filesystem (shipped with the Appway Core) — This type of Cluster Storage allows persisting the Appway State (business objects, process data, etc.) on a filesystem. See details. Consider the following information:
    • This can be a local disk or a mounted network drive.
    • Every node in the Appway Cluster has to be able to read and write to this filesystem.
  • Relational Database (RelationalDbHazelcastStore extension) — With this extension you can persist the Appway State into a relational database. See details.
  • Cassandra (CassandraHazelcastStore extension) — With this extension you can persist the Appway State into a Cassandra installation. See details.
  • Amazon Web Services S3 (AWSHazelcastStore extension) — With this extension you can persist the Appway State into a Amazon Web Services S3 bucket. See details.
  • Azure Blobs (AzureHazelcastStore extension): With this extension you can persist the Appway State into Azure Blobs. See details.

Except for the Filesystem type, you need to add the respective extension as an additional extension to you Docker container when starting Appway (see section Add Additional Extensions). Furthermore, all the extensions require additional configuration. To configure the extension, use Environment Variables as shown in section Configure Appway .

To make this fully clear, here is an example on how to start Appway and persist Cluster Storage in AWS S3 (see code explanation below):

$ docker run --name appway \
    -p 8080:8080 \
    -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
    -v $(pwd)/extensions:/appway/additional-extensions \
    -e APPWAY_AWSHAZELCASTSTORE_COM_NM_EXTENSIONS_AWSHAZELCASTSTORE_ACCESSKEY=AKIAU5.....UULRWV2FH \
    -e APPWAY_AWSHAZELCASTSTORE_COM_NM_EXTENSIONS_AWSHAZELCASTSTORE_SECRETKEY=t4WtoEERMIl....h+e2iVq0mAT1svAWwvRc \
    -e APPWAY_AWSHAZELCASTSTORE_COM_NM_EXTENSIONS_AWSHAZELCASTSTORE_REGION=eu-west-3 \
    -e APPWAY_AWSHAZELCASTSTORE_COM_NM_EXTENSIONS_AWSHAZELCASTSTORE_BUCKETNAME=appway-test-s3-bucket \
    appwayag/platform
  • Lines 1-3: illustrated in earlier sections.
  • Line 4: all the additional extensions are added in the extensions subdirectory. In this example, you add the AWSHazelcastStore extension.
  • Lines 5-8: the AWSHazelcastStore extension is configured. To make it work, replace the configuration values with the information from your AWS account.

3.7 Configure Blob Storage

Similarly to the Cluster Storage (see section Configure Cluster Storage), the Blob Storage can also be configured through additional extensions and configuration.

Appway supports the following Blob Storage types:

  • Filesystem (shipped with the Appway Core) — This type of Blob Storage allows persisting large files on a filesystem. Consider the following information:
    • This can be a local disk or a mounted network drive.
    • Every node in the Appway Cluster has to be able to read and write to this filesystem. See details.
  • Amazon Web Services S3 (AWSBlobStorage extension) — With this extension you can persist large files into a Amazon Web Services S3 bucket.

Except for the Filesystem type, you need to add the respective extension as an additional extension to you Docker container when starting Appway (see section Add Additional Extensions). Furthermore, all the extensions require additional configuration. To configure the extension, use Environment Variables as shown in section Configure Appway .

For an example on how to start with an additional extension and configure it, see section Configure Cluster Storage.

3.8 Persist Runtime Changes

At this point, your Appway installation is already reasonably functional. Moreover, after designing a new Process or starting new Process Instances, your Business Objects and process data are persisted in the Cluster Storage after restarting your Docker container. However, the changes you applied on configuration and extensions at runtime are lost after a restart. This is because those changes are not persisted (automatically) in the Cluster Storage.

For most configuration properties related to a solution, however, Appway provides a solution for persisting changes at runtime: Startup Files. However, consider that for some configuration properties and for permanent extensions (that is, plugins) Appway does not yet provide a high-standard solution for persisting such changes (for a subset of them changes at runtime are not supported at all).

To enable persistence of runtime changes, set the following configuration property to true (see section Configure Appway to pass it as an Environment Variable to the Appway container):

nm.cluster.startup.file.sync.enabled = true

From now on, configuration and extension changes at runtime are also persisted in the Cluster Storage and they are loaded again from the Cluster Storage after a restart.

Let’s see this in action (see code explanation below):

$ docker run --name appway \
    -p 8080:8080 \
    -e NM_CLUSTER_STARTUP_FILE_SYNC_ENABLED=true \
    -e NM_CLUSTER_PERSISTENCE_FILESYSTEM_PATH=/appway/cluster-storage \
    -v $(pwd)/cluster-storage:/appway/cluster-storage \
    -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
    appwayag/platform
  • Line 3: Persisting runtime changes is enabled.
  • Lines 4 and 5: Cluster Storage is configured on a local directory in ./cluster-storage.

To avoid conflicts between configuration files in the Docker image and configuration files in Cluster Storage, we recommend to put solution related configuration properties into Content Configuration. Since the Standard Appway Docker images do not provide such configuration, there will never be a conflict and Content Configuration will always be restored from Cluster Storage.

See System Installation (Appway 10) for more details.

3.9 Configure Node Discovery

So far, we have been starting Appway as a single-node in a single container. However, for the following steps (see section Running Appway in Kubernetes) and when running Appway as a multi-node Cluster, you need to configure how the Appway nodes discover each other.

Traditionally this has been configured in conf/hazelcast.xml. When starting Appway in containers, this could still be done by mounting this file in the proper location inside the Docker container. However, this procedure is better performed through the options described below

Appway supports the following Node Discovery types:

  • Multicast: Use the nm.cluster.network.join.multicast.enabled property to enable Multicast. When starting multiple Standard Appway Docker images in a single multicast network, they discover each other. Example:
# start node 1
$ docker run --name appway-node1 \
    -p 8080:8080 \
    -e NM_CLUSTER_NETWORK_JOIN_MULTICAST_ENABLED=true \
    -e NM_CLUSTER_PERSISTENCE_FILESYSTEM_PATH=/appway/cluster-storage \
    -v $(pwd)/cluster-storage:/appway/cluster-storage \
    -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
    appwayag/platform

# start node 2 
$ docker run --name appway-node-2 \
    -p 8081:8080 \
    -e NM_CLUSTER_NETWORK_JOIN_MULTICAST_ENABLED=true \
    -e NM_CLUSTER_PERSISTENCE_FILESYSTEM_PATH=/appway/cluster-storage \
    -v $(pwd)/cluster-storage:/appway/cluster-storage \
    -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
    appwayag/platform
  • Kubernetes (KubernetesHazelcastDiscovery extension): This is required when using Kubernetes. See details.
  • Amazon Web Services EC2 (AWSHazelcastDiscovery extension): This is required when running Appway on AWS EC2 instances. See details.
  • Azure (AzureHazelcastDiscovery extension): This is required when running on virtual machines in Azure. See details.

To use a Node Discovery extension:

  1. install it as an additional extension and configure it using Environment Variables (see section Configure Appway ).
  2. You also need to check if your license allows more than 1 node. In the license.properties file, the value of the nm.license.cluster.maxsize property should be larger than 1.
  3. After you start the Appway cluster nodes, you should check if the cluster was formed correctly. You should see a log similar with the one below:
2020-05-04 10:03:38,908 INFO  [hz.appway.generic-operation.thread-0] com.hazelcast.internal.cluster.ClusterService - [172.17.0.3]:5713 [blade] [3.12.6] 
Members {size:2, ver:2} [
 Member [172.17.0.2]:5713 - 604a0e4f-1152-4edb-8f79-9b649f972b58
 Member [172.17.0.3]:5713 - 131440d0-d65a-4946-a98b-47cbcf8b558e this
]

3.10 Extend the Standard Appway Docker Images

Before proceeding with the next section (Run Appway in Kubernetes), we will suggest some possible alternatives or enhancements to the procedures we have outlined so far.

Up to now, we have used the plain vanilla Standard Appway Docker images and added different configuration options when starting the Docker container. For example, we mounted a local directory to add additional extensions in section Add Additional Extensions. While this works fine for a single-node installation, it might not be as easy (or even possible) when using a container orchestration system like Kubernetes. This is because Kubernetes has to manage many different containers running on different machines. Therefore, mounting the current, local directory while starting a Docker container does not work.

For this reason, a good alternative is to extend the Standard Appway Docker images and include additional artifacts in the image directly instead of mounting them while starting the Docker container. We recommend this for:

Moreover, we recommend using configuration objects (e.g. ConfigMap for Kubernetes) (for further details see section Running Appway in Kubernetes) for:

To extend the Standard Appway Docker images, follow these steps:

  1. Create a file named Dockerfile in the current directory with the following content:

    ARG BASE_IMAGE_NAME
    FROM ${BASE_IMAGE_NAME}
    
    #add additional Appway extensions
    COPY --chown=appway:appway ./resources/appway-extensions   ${NM_DATA_HOME}/extensions/
    
    #add additional Appway packages
    COPY --chown=appway:appway ./resources/appway-packages   ${NM_DATA_HOME}/packages/
    
  2. Download additional extensions and packages and store them in ./resources/appway-extensions and ./resources/appway-packages respectively.

  3. Add a file named configuration.xml in ./resources/appway-extensions (or copy an existing configuration.xml file from any ${NM_DATA_HOME}/extensions/ directory) and make sure it contains all the mandatory extensions plus the additional extensions that you want to add. Each extensions should be listed with an entry like the following. Note: Currently, this step is needed to ensure the additional extensions are started when Appway starts:

    <Adapter name="ClusterTools" state="2" startup="2" priority="0"/>
    
  4. Execute docker build with the following parameters (Line 2: Docker is ‘instructed’ to base the new image on the given Standard Appway Docker image. Line 3: the new image is provided with a new name and tag):

    $ docker build --pull \
     --build-arg BASE_IMAGE_NAME=appwayag/platform \
     -t appway:latest-extended \
     -f Dockerfile .
    
  5. To start using the new Docker image, replace appwayag/platform withappway:latest-extended in the commands shown above, e.g.:

    $ docker run --name appway \
     -p 8080:8080 \
     -v $(pwd)/license.properties:/appway/data-home/conf/license.properties \
     appway:latest-extended
    
  6. Finally, push this new, extended Docker image into your own Docker repository, so that your container orchestration system can use them.

4 Running Appway in Kubernetes

In the previous section we outlined how to use the Standard Appway Docker images. While doing so, we also experienced how the various Docker-run commands became longer and longer, even for one single container on a single machine. In a real Appway installation, you would not have one single Appway container, but possibly:

  • Multiple Appway nodes (for failover or scalability)
  • A load balancer
  • A service to re-new SSL certificates (possibly)
  • A relational database (possibly)
  • Others

To manage all those containers, you need a container orchestration system. In this document, we use Kubernetes (https://kubernetes.io/) but similar principles apply to other systems.

4.1 Prerequisites

To deploy Appway on Kubernetes, you need to have a Kubernetes cluster and the following tools installed:

For smoke tests on local machines, the simplest way to set up a Kubernetes cluster is by using Minikube. Minikube is a tool that makes it easy to run Kubernetes locally.

  1. Install Minikube by following the instructions presented here: https://kubernetes.io/docs/tasks/tools/install-minikube/

  2. After installing Minikube, we suggest updating the settings to increase the CPU and memory of the Minikube Virtual Machine. Before performing these changes, power off the machine first.

    • Increase memory: Virtual Box > System > Motherboard > Base Memory > choose 6GB
    • Increase CPUs: Virtual Box > System > Processor > Processor(s) > choose 4 CPUs
  3. At this point, you are ready to start:

    $ minikube start
    
  4. The last step is to make sure you are using the correct Kubernetes context. The result of the following command should be 'minikube'

    $ kubectl config current-context
    

4.2 Appway Helm Chart

Helm is a tool that helps you manage Kubernetes applications. A Helm Chart represents a collection of Kubernetes resources that define how an application should be installed.

You can find a simple Helm Chart for Appway that can be extended to cover more complex scenarios in the following attachment:

helmchartexamplev.2.0.1.zip

The zip file contains two folders:

  • appway — The actual Helm Chart
  • example-config — Example resources that show how the Helm Chart could be configured

In the following sections, we refer to the configuration folder as example-config but you should rename this folder for your installations to better describe the environment for which it is used, e.g.: appway-onboarding-dev or appway-onboarding-uat

4.2.1 Docker Repository Access

The Appway Standard Docker images are stored in a private repository, therefore you need to configure the credentials that you received from Appway to gain access to them.

You also need to configure the tag of the Appway Docker image. All these values have to be set in the example-config/values.yaml file:

image:
  tag: 10.0.0
  username: your-username
  password: 123...

4.2.2 Appway License File

The example Helm chart contains all the resources needed to configure the Appway license file.
All you need to do is update the content of the example-config/license.properties file with the actual license file that you received from Appway.

4.2.3 Appway Configuration

There are various options to configure Appway. Check this documentation to understand the different types of configuration and when they should be used:
The example Helm chart provided above (see Appway Helm Chart) demonstrates how environment variables can be used to configure Appway.
Check the example-config/environment-config.yaml file to understand how to pass environment variables to configure Appway.

Using environment variables comes in handy if you have to set a limited number of configuration properties that are spread across multiple files. However, this approach is not feasible if you have a large number of configuration properties.
For this case, you can extend the Helm chart and define other resources that can be mounted as volumes in the places where the Appway configuration files are defined (e.g./appway/data-home/conf/content.properties).

If you build a custom Docker image on top of the Appway image, you can also consider including the configuration in the Docker image.

4.2.4 Other Helm Chart Configurations

You can find the complete list of configurations of the Helm Chart in the appway/values.yaml file.

The most notable ones are:

  • replicaCount ⁠— the number of Appway nodes that you want to start.
  • appway.java_opts ⁠— JAVA_OPTS property passed to JVM machine. You can set here the amount of memory that Appway should use.
  • terminationGracePeriodSeconds ⁠— The time (in seconds) to wait for Appway to shut down. Check section Stop Appway for more details.

4.2.5 Configure Additional Extensions and Packages

When you deploy Appway on Kubernetes, you need at least one additional extension: KubernetesHazelcastDiscovery.
This extension allows the Appway nodes to find and communicate to each other.

There are various possibilities to configure additional extensions and packages: they can be provided by mounting external volumes or you can extend the Standard Appway Docker images and create new Docker images that contain the additional extensions and packages.

Check sections Add Additional Extensions, Add Additional Packages (Mount a Directory), Extend the Standard Docker Images for more details.

4.2.6 Cluster Storage

Check section Configure Cluster Storage for details on how to configure the Appway Cluster Storage.

4.2.7 Access Appway

For simplicity reasons, the provided Helm Chart uses a Kubernetes Service of type LoadBalancer to expose Appway to its users.
However, depending on your needs, this Chart can be extended and you can configure more flexible ways of exposing Appway, for example using Ingress resources.

Again, for simplicity reasons, the Helm chart does not include resources to automate the generation and usage of certificates.
The official Helm Chart cert-manager can be used for this purpose.

The following ports are configured by default:

  • 8080: HTTP port ⁠— This port can be used to access the Appway Studio and Workspace.
  • 5713: Hazelcast port ⁠— This port is used by Hazelcast to connect the different nodes in the Appway Cluster.
  • 5556: JMX port ⁠— This port can be used to inspect JMX beans.

4.3 Deploy Appway

  1. Before deploying Appway you need to create a Kubernetes namespace for the Appway installation:

    $ kubectl create namespace appway-ns
    
  2. Then, deploy Appway by running the helm install command as shown in the example below:

    $ helm install appway \
     --namespace appway-ns \
     -f example-config/values.yaml \
     --set-file environment_config=example-config/environment-config.yaml,license_properties=example-config/license.properties \
     appway
    
  3. Once the helm install command has finished, you can check the status of the deployment and access Appway once it is ready.

    #Check list of Helm deployments
    $ helm ls -n appway-ns
    
    #Check Kubernetes Pods
    $ kubectl get pods -n appway-ns -o wide
    $ kubectl describe pods appway -n appway-ns
    
    #Check the logs of Appway Pods
    $ kubectl logs -f appway-0 -n appway-ns
    
    #Debug Appway Pods
    $ kubectl exec -n appway-ns -ti appway-0 /bin/bash
    
  4. Depending on the way how Appway was exposed externally, there are different options on how to retrieve the URL to access Appway:

  • Load Balancer:

    #Use the EXTERNAL-IP section together with 8080 port
    $ kubectl get services -n appway-ns
    
  • Minikube:

    $ minikube service appway -n appway-ns --url
    

4.4 Upgrade Appway

To upgrade the Appway Platform version (Core Platform and Extensions), shut down the Appway Cluster (see section Stop Appway), update the Docker image coordinates in the Helm chart, and restart.

To update the Docker image tag, edit example-config/values.yaml and change the tag to the new version.

appway:
  tag: 10.0.0

Note: When upgrading to a new minor or major Appway version (e.g. from 10.0.x to 10.1.x; or from 10.x to 11.x), follow the upgrade instructions carefully.

4.5 Stop Appway

To shut down Appway correctly, be aware of the Kubernetes procedure to terminate a Pod:

  • Kubernetes sends a SIGTERM signal to the Appway containers in the Pod. This triggers the Appway shutdown procedure.
  • Kubernetes then waits for a grace period that is configurable. It is very important that you configure a sufficiently large value for the terminationGracePeriodSeconds to allow Appway to save all the data before shutting down.

If the grace period is configured to an excessively low value, data loss can occur.

We recommend setting a grace period of 60s to begin with, but it is very important that you test how long your Solution actually takes to shut down, and increase the grace period accordingly if your Solution needs more time to stop.

If Appway stops before the grace period has expired, Kubernetes will not wait until the grace period expires, but will stop immediately.

After Appway has shut down or the grace period has expired, Kubernetes sends a SIGKILL signal to the Pod, and the Pod is removed.

To stop the Appway cluster and clean the Helm resources that were created, you can run the following command:

$ helm delete appway -n appway-ns
© 2026 Appway AG. All Rights Reserved