This document describes how to build an ApplinX Docker image and run the Docker container using scripts provided with ApplinX. It covers the following topics:
See also High Availability with Container Orchestration in the Administration documentation.
Docker installation 1.13.1 or compatible.
Software AG ApplinX installation. The minimum requirement is ApplinX Server and Framework for JSP.
The scripts provided with ApplinX support the following three methods of building a Docker image and running the Docker container.
To use the default configuration
Set your working directory to <install_dir>/ApplinX/Docker.
Create the TAR file containing all the necessary files with the following command:
./createApplinXDistributions.sh
Provide your License file and put it in your License folder: <install_dir>/ApplinX/Docker/License/myLicense.xml.
Build the ApplinX image, for example:
docker build -t [Image Name] .
This method uses the default configuration after the installation, for example:
docker run -p 8080:8080 -p 2323:2323 [Image Name]
Advantages
The complete configuration is in the image. For troubleshooting, Software AG Support will require only the command you entered.
Disadvantage
The only thing you can change is the ApplinX port mapping.
To use modified configuration files
Set your working directory to <install_dir>/ApplinX/Docker.
Create the TAR file containing all the necessary files with the following command:
./createApplinXDistributions.sh
Provide your License file and put it in your License folder: <install_dir>/ApplinX/Docker/License/myLicense.xml.
Change your configuration files:
<install_dir>/ApplinX/Docker/Configuration/gx_updateAppConfig.xml
<install_dir>/ApplinX/Docker/Configuration/gx_appConfig.xml
<install_dir>/ApplinX/Docker/Configuration/gx_clientConfig.xml
<install_dir>/ApplinX/Docker/Configuration/gx_keyboardMappings.xml
Build the ApplinX image, for example:
docker build -t [Image Name] .
With this method, the Docker build copies the configuration into the image. You will need to map your ApplinX ports during startup, for example:
docker run -p 8080:8080 -p 2323:2323 [Image Name]
Advantages
Configuration changes can be persistent; you can reuse the configuration when a new version or fix is to be built.
The complete configuration is in the image.
For troubleshooting, Software AG Support will require only the image and the command you entered.
Disadvantage
If the configuration changes, you will need to build a new image and rerun the container.
To use customer application file
Set your working directory to <install_dir>/ApplinX/Docker.
Create the TAR file containing all the necessary files with the following command:
./createApplinXDistributions.sh
Provide your License file and put it in your License folder: <install_dir>/ApplinX/Docker/License/myLicense.xml.
Provide your application GXAR file and put it in the Data folder: <install_dir>/ApplinX/Docker/Data/yourApplication.gxar
Build the ApplinX image, for example:
docker build --build-arg GXAR_NAME_ARG=[yourApplication] -t [Image Name] .
With this method, the Docker build copies the configuration into the image. You will need to map your ApplinX ports during startup, for example:
docker run -p 8080:8080 -p 2323:2323 [Image Name]
Advantages
You can provide your own application file. For troubleshooting, Software AG Support will require only the image and the command
you entered.
To use customer configuration folders
Set your working directory to <install_dir>/ApplinX/Docker.
Create the TAR file containing all the necessary files with the following command:
./createApplinXDistributions.sh
Provide your license folder, for example: <user_dir>/MyLicense.
Provide your configuration folder, for example: <user_dir>/MyConfig.
Build the ApplinX image, for example:
docker build -t [Image Name] .
With this method, the Docker build copies the configuration into the image. You will need to add your folders path during startup, for example:
docker run -v <user_dir>/MyLicense:/license -v <user_dir>/MyConfig:/config -p 8080:8080 -p 2323:2323 [Image Name]
Advantages
You can provide your own application file. For troubleshooting, Software AG Support will require only the image and the command
you entered.
To verify the build
Show the image with command
docker images
Start the docker image to be verified as described above, for example:
docker run -d -p 8080:8080 -p 2380:2380 --name applinx_container_1 applinx_image_1
Show the log:
docker logs -f applinx_container_1
Show the containers:
docker ps
Stop the container:
docker stop applinx_container_1
Delete the container:
docker rm applinx_container_1
Remove the image:
docker rmi applinx_image_1
The docker directory contains a script healthcheck.sh
.
Execution of this script pings the APX server and returns the result of the ping command:
0 | success |
---|---|
1 | failure |
In the Docker context, this healthcheck.sh
is put into the Docker container and enabled by setting the HEALTHCHECK
instruction in the Dockerfile.
You can also use the healthcheck.sh
script in the context of an orchestration tool (e.g. Kubernetes) to enable healthcheck functionality.
A typical installation of ApplinX connecting to Natural on a Unix host consists of the following:
Tomcat serving web page of the ApplinX Framework (or other web container such as JBoss, WebSphere, WebLogic)
ApplinX server
ApplinX daemon that checks the authentication of users
Natural-APX executable
Adabas (or another database)
ApplinX provides an end-to-end healthcheck for Natural for UNIX that identifies the point of failure. Two approaches are provided:
To perform an end-to-end healthcheck using the command line
Call the script /opt/softwareag/natuxhealthcheck.sh
with the required parameters.
Option | Description |
---|---|
--help |
Show help for this utility |
-s <url> |
The ApplinX server url to connect to. By default applinx://localhost:2323 |
-u <username> |
Specify the username to connect to the host (as required by the Natural Open System hosts) |
-p <password> |
Specify the password to connect to the host (as required by the Natural Open System hosts) |
-d <dbId> |
ID of The Adabas DB that you wish to test |
-a <application> |
Specify the ApplinX application to use for host connectivity information. |
The return value of the script indicates the end-to-end test result:
Response Code |
Output Message | Meaning |
---|---|---|
0 |
OK. | All five elements seem to be OK and running. |
-1 |
The ApplinX web application is not available. | The Web Framework is not installed or tomcat is not up. |
-2 |
The ApplinX server is not available. | No connection to ApplinX server can be established. |
-3 |
The ApplinX daemon is not available. | No connection possible between the ApplinX server and the daemon. |
-4 |
Natural is not available. | the natapx binary is not installed / buffer pool is full. |
-5 |
Adabas is not available. | Adabas (or the back-end DB) is not available. |
-6 |
No username was specified. | |
-7 |
An invalid DB ID was specified. | |
-8 |
Invalid username or password. | |
-9 |
The healthcheck functionality is supported with Natural version 9.1.2 and above. To use this functionality, upgrade your Natural installation accordingly. | |
-10 |
One of the parameters is missing. | |
-11 |
Unexpected error. |
To perform an end-to-end healthcheck using a URL
Enter the following:
http://<host>:<port>/ApplinX/healthcheck?check_db=<db_id>&username=<username>&password=<password>
Provide appropriate values for host, port, DB ID, user and password.
The HTTP status indicates the result of the end-to-end test:
HTTP Status |
Message | Meaning |
---|---|---|
200 |
OK. | All five elements appear to be OK and running. |
403 |
No username was specified. | |
Invalid username or password | ||
404 |
The ApplinX web application is not available. | The Web Framework is not installed. |
503 |
The ApplinX server is not available. | No connection to applinx server can be established. |
500 |
The ApplinX daemon is not available. | No connection possible between the ApplinX server and the daemon. |
An invalid DB ID was specified. | ||
Unexpected error. | ||
501 |
Natural is not available. | The natapx binary is not installed / buffer pool is full. |
Application misconfigured. | ||
507 |
Adabas is not available | Adabas (or the back-end DB) is not avalable. |