Qorus Integration Engine® Enterprise Edition 6.0.16_prod
Loading...
Searching...
No Matches
Continuous Integration and Continuous Delivery

Back to the Developer's Guide Table of Contents

Qorus supports all aspects of Continuous Integration and Continuous Delivery:

  • automatic release packaging and installation
  • automatic test execution

See the following sections for more information and references to details and examples.

Qorus Release Packaging and Automatic installation

Qorus Release Packaging Overview

The make-release program is used to create Qorus releases. Each release is an installable package that will automatically create the desired configuration in the target system.

Each release has a label, which is the release name. Qorus releases should be installed in $OMQ_DIR/user on the target server system.

Two command-line options for make-release help package releases for proper installation on the target machine as follows:

  • -U=ARG: this provides the source root directory for all files in the release; all release files should then be given as relative paths from this location on the source file system
  • -P=ARG: this provides a target directory name under $OMQ_DIR on the target server, because all user release files should be written to $OMQ_DIR/user on the target server, in case the release directory does not begin with user/, it can be added here

For example, assuming the following:

  • release label: project-A1234-v1.0
  • source files:
    • $HOME/src/qorus/project-A1234/my-service-v1.0.qsd.yaml
    • $HOME/src/qorus/project-A1234/my-service-v1.0.qsd.py
  • to be installed in the following target directory:
    • $OMQ_DIR/user/project-A1234

Use the following command-line:

make-release project-A1234-v1.0 -c -U ~/src/qorus -P user project-A1234/*

This will create an installable package named qorus-user-project-A1234-v1.0.tar.bz2 in the directory pointed to by the QORUS_RELEASE_DIR environment variable (or in $HOME/releases if the environment variable is not set).

oload can be used to install this package or the appropriate REST API for remote deployments.

Note
Release packages created with make-release will be unarchived in $OMQ_DIR, because all user code should be placed in $OMQ_DIR/user, it is recommended to always use the -P=user option as described above to ensure that releases are stored in the proper location on the target filesystem.
See also

Qorus Release Components

Qorus releases can contain any files necessary for the code to function in the target environment. All Qorus interface object files can be included as well as the following:

Qorus releases should be completely automated and should set up the target system consistently so that releases can be deployed automatically and ensure that the same exact configuration is present on each machine where it is installed.

Qorus Testing

A good testing strategy is critical for ensuring quality operations; to this end, Qorus supports testing from all supported languages.

Enabling Test Execution

By default the Qorus server does not allow tests to be executed. To enable test execution by the Qorus server, set the qorus-client.allow-test-execution option to true.

To set this in a Docker instance, add a line like the following to your $OMQ_DIR/etc/options on the host (ex: qorus-etc/options):

    qorus-client.allow-test-execution: true

Additionally, you can execute a command like the following to enable testing in a Docker instance (make sure to use your own Qorus container name instead of qorus):

    docker exec qorus bash -l -c "echo qorus-client.allow-test-execution: true >> $OMQ_DIR/etc/options"

To enable running tests in Kubernetes, execute the following:

    kubectl exec deploy/qorus-core -- bash -l -c "echo qorus-client.allow-test-execution: true >> $OMQ_DIR/etc/options"
Note
Qorus does not need to be restarted after setting this option; this is a client option and will take effect immediately

Qorus Test Development

Tests can be written in Python, Java, and Qore using Qorus's QorusInterfaceTest module to support Continuous Integration (along with automated release packaging and installation).

Main test classes for the three main interface types are as follows:

See the links below for example test code and reference APIs.

See also