Install Semarchy xDI Runtime
This page explains how to install Semarchy xDI Runtime, as well as how to run it.
Before the installation, make sure to review the xDI architecture, as well as the system requirements.
Installation types
You can install xDI Runtime in two ways:
-
From an extractable software package.
-
Using a Docker image.
The software package puts all Runtime files on disk. This makes it easier to manage and make edits to files, and gives you easier access to run included script files. However, you must manage the software environment yourself.
The Docker image is useful for portability. Docker manages software dependencies, and makes it more convenient to run multiple instances of xDI Runtime at the same time. Use this installation method to deploy Runtime configurations and integration flows created ahead of time.
Install xDI Runtime from the main software package
xDI Runtime comes in an archive file. It runs on any platform with a supported Java Virtual Machine.
-
Download the xDI Runtime archive file from the main Semarchy website.
-
Extract the archive to a temporary directory.
-
Move the archive content to the target installation directory.
-
Check that all
.bat
(Windows) and.sh
(Linux or macOS) script files, located at the root of the installation directory, have execution permissions. -
Check and set, if needed, write permission on the following subdirectories:
-
./temp
-
./build
-
./sessions
-
-
Configure the runtime if necessary.
-
Add modules to the runtime, if you need them.
With the default configuration, the Runtime only listens on localhost and requires to logging in with the default users defined in the configuration file. This default configuration is for security purposes. You should configure runtime security settings according to your requirements. |
Start and stop the Runtime
To start the Runtime, go to the directory where you installed it, and run startengine.bat
(Windows) or startengine.sh
(Linux or macOS).
To stop the runtime, run stopengine.bat
(Windows) or stopengine.sh
from the same directory.
For improved security, start the runtime as a user with the fewest possible operating system permissions. |
The startengine
and stopengine
scripts can take different options:
startengine.bat/.sh
startengine [-usage] [-port <httpPort>] [-conf <propertyFileName>] [-updatedb]
Option | Description |
---|---|
|
Prints the list of options for this command. |
|
Port on which the runtime should listen to requests. This option overrides the |
|
Specifies which configuration file the runtime uses. |
|
Attempts to update the runtime database schema, then stops the runtime. The runtime database schema may change between product versions. The runtime automatically updates it where applicable, but you can use this option to manually attempt an update without leaving the runtime running. |
stopengine.bat/.sh
stopengine [-usage] [-host <Host>] [-port <Port>] [-user <User>] [-password <Password>] [-uncryptedPassword <UncryptedPassword>] [-immediate]
Option | Description |
---|---|
|
Prints the list of options for this command. |
|
Host or IP address of the runtime you are trying to access. |
|
Port of the runtime you are trying to access. |
|
Username for the runtime. |
|
Password for the runtime, in plain text or in its encrypted form. |
|
(Deprecated) Password for the runtime, in plain text. |
|
Stops the runtime immediately, without cleanly stopping active sessions. |
Troubleshooting Runtime startup
If the runtime process stops a few seconds after startup, or the window closes unexpectedly, you need to create a log to investigate errors. Start the runtime by running the following commands from the command line:
./startengine.sh &> start.log
startengine.bat > start.log 2>&1
These commands save the runtime output to a start.log
file. Consult this file to investigate the errors.
If you need further assistance, Contact Semarchy support, and provide the log file to help with troubleshooting.
Install xDI Runtime with Docker
Docker images for xDI Runtime are available from DockerHub. They are based on an image of Debian Linux that integrates a supported OpenJDK version.
You can use provided Docker Compose files to set up a runtime image. These files define a PostgreSQL database, but you can change it as needed.
-
Download and extract the Tutorial Resources ZIP file.
-
Open the
quick-install/docker/<version>/xdi-runtime/docker-compose/
directory in the extracted files. It contains adocker-compose.yml
file, as well as ashared-resources
directory. You need them for the next steps. -
Add needed xDI Runtime modules to a
shared-resources/modules
directory.The sample configuration expects a module directory named BACKEND-DATABASE
with a PostgreSQL JDBC driver. Set up this module, or change the configuration in the next steps. -
Edit the
docker-compose.yml
file to change environment information and runtime ports. -
Configure xDI Runtime by editing the configuration files in the
shared-resources/properties
directory. -
Open a terminal to the directory with the Docker Compose file.
-
Run the following command to build and start the Docker image:
docker compose -f <your_docker_compose>.yml up
Image tags
The xDI Runtime images support different version tags:
Version tag | Image name example | Description |
---|---|---|
|
|
The |
Minor version tag (year.quarter) |
|
This tag references a specific quarterly version of xDI Runtime. This image updates itself automatically when a patch for this quarterly version is released. |
Full version tag (year.quarter.patch) |
|
This tag references a specific patch version of xDI Runtime, and does not update itself when a patch is released. |
In production environments, use the full version tag to avoid overwriting your image with an update. |
Troubleshooting Runtime startup on Docker
Many runtime startup issues on Docker are due to shared resources that were not properly set up beforehand. Double-check that you placed all needed resources in the shared-resources
directory, and retry the build process.
You can also consult the xDI Runtime logs for troubleshooting. These logs are redirected to the Docker container logs. For more information, see the Docker article about logging.
Install xDI Runtime as service
Semarchy xDI Runtime does not have explicit settings to run as an operating system service. However you can set up your environment to run it automatically based on your requirements.
Running software as a service often requires administrative or elevated privileges, which also carries its own security risks. If you launch xDI Runtime automatically, you should have it run under its own user account with only the necessary permissions. |
General guidelines
When creating a service or command that controls xDI Runtime, you must take the following things into account:
-
The command needs to know the directory that holds the runtime control scripts.
-
Commands that stop the runtime should use the
stopengine
script, and explicitly define the port the runtime listens on. -
Depending on your operating system, make sure the runtime process detaches from the terminal that invokes it.
Guidelines by operating system
Windows
Windows provides a built-in mechanism for creating services. You can use the sc command or create a service using the Services Control Panel. Refer to the Windows Services documentation for detailed instructions.
You can also use third-party tools, such as NSSM, to wrap your software as a service. These tools may simplify service creation and management.
Linux
Most modern Linux distributions use systemd. Create a systemd service unit file (usually located in /etc/systemd/system) to define your service. Enable and start the service using systemctl. Refer to the systemd documentation for specifics.
For other systems, you can use init scripts (such as /etc/init.d). These scripts control service startup and shutdown.
Sample start and stop commands may look like this:
# sample variables - replace with your own
# runtime directory
export rdir=/data/xdi-runtime-dir
# runtime port
export rport=42501
# commands
cd $rdir;nohup ./startengine.sh &
cd $rdir;./stopengine.sh -port $rport