QUICKSTART GUIDE

You must build and install qpid-interop-test before you can run the tests.

By default, qpid-interop-test will install to /usr/local, but you can set any non-priviedged directory as the install prefix using the CMAKE_INSTALL_PREFIX environment variable, for example $HOME/install.

The following tools are needed to build qpid-interop-test:

  • git
  • gcc-c++
  • Python 2.7.x
  • cmake
  • Java JDK
  • Maven
  • JSON cpp

The following Qpid components must be installed before you build and install qpid-interop-test:

  • Qpid Proton (including C++ Proton API)
  • Qpid Python

The following are not required, but if installed and present, will be tested:

  • Rhea (a Javascript client, also requires npm and nodejs)
  • AMQP.Net Lite (requires mono)

Pre-requisites can be installed using the standard system package manager (yum, dnf, apt-get etc.) OR built from source and installed.

These are the install steps:

  1. Install prerequisites, from packages or source
  2. Install or download / build AMQP brokers to test against (or set up networked brokers)
  3. Build qpid-interop-test
  4. Run the tests

1. Install prerequisites

1.1 RHEL6

Currently RHEL6 is not supported because it uses Python 2.6.x, and the test code uses features of Python 2.7.x. This may be supported in a future release.

1.2 RHEL7

From a clean install:

yum install cmake maven java-1.8.0-openjdk-devel perl-XML-XPath

Some packages will need to be downloaded from EPEL. To set up the EPEL repo in yum:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release-latest-7.noarch.rpm

then install the following packages:

yum install jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton

1.3 Fedora 27

All packages are available directly from the Fedora repositories:

dnf install gcc-c++ cmake maven java-1.8.0-openjdk-devel perl-XML-XPath jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton

1.4 CentOS7 Docker image

Docker images come with only the bare essentials, so there is more to install than a standard bare-metal install:

yum -y install vim unzip wget git gcc-c++ make cmake maven swig java-1.8.0-openjdk-devel perl-XML-XPath python-devel

Some packages will need to be downloaded from EPEL. To set up the EPEL repo in yum:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install epel-release-latest-7.noarch.rpm

then install the following packages:

yum -y install mono-devel python34-devel jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton

1.5 Fedora 27 Docker image

(TODO)

2. Obtaining a broker

Qpid-interop-test requires a running broker to be available. This may be on localhost as a local install or build, or on another machine, in which case its IP addresss must be known. Some local broker install options are:

2.1 ActiveMQ 5

Download from Apache.

Make the following changes to the activemq.xml config file: For XML element broker.transportConnectors.transportConnector@name="amqp" add the attribute wireFormat.allowNonSaslConnections=true. ie:

<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=1048576000&amp;wireFormat.allowNonSaslConnections=true"/>

2.2 Artemis

Download from Apache.

2.3 Qpid cpp broker

yum install qpid-cpp-server

and set the configuration file in /etc/qpid/qpidd.conf as follows:

auth=no
queue-patterns=qit

2.4 Qpid Dispatch Router

yum install qpid-dispatch-router

and add the following to the config file in /etc/qpid-dispatch/qdrouterd.conf:

listener {
    host: ::1
    port: amqp
    authenticatePeer: no
    saslMechanisms: ANONYMOUS
}

2. Build and install Qpid Proton

Qpid Proton is available as a package. However, this can only contain either Python2 OR Python3 bindings. Because QIT tests the Python2 and Python3 bindings against each other as separate clients, we need both clients at the same time. Currently, there is no “official” install method to do this.

To work around this, QIT relies on the following installation locations for the Python client bindings:

Python2:

${CMAKE_INSTALL_PREFIX}/lib64/proton/bindings/python

and Python3:

${CMAKE_INSTALL_PREFIX}/lib64/proton/bindings/python3

To build for both clients, the follow the following steps:

2.1 Clone Qpid Proton git repo

git clone https://git-wip-us.apache.org/repos/asf/qpid-proton.git

2.2 Create a build script to automate the build

Use the following script to build Qpid Proton into a local install directory:

#!/bin/bash

PWD=`pwd`

REDHAT_DIR=${HOME}
BUILD_DIR=${REDHAT_DIR}/qpid-proton/build
INSTALL_DIR=${REDHAT_DIR}/install

PY2_INSTALL_DIR=${INSTALL_DIR}/lib64/proton/bindings/python
CMAKE_PY2_EXECUTABLE=/usr/bin/python
CMAKE_PY2_INCLUDE_DIR=/usr/include/python2.7
CMAKE_PY2_LIBRARY=/usr/lib64/libpython2.7.so

PY3_INSTALL_DIR=${INSTALL_DIR}/lib64/proton/bindings/python3
CMAKE_PY3_EXECUTABLE=/usr/bin/python3.6m
CMAKE_PY3_INCLUDE_DIR=/usr/include/python3.6m
CMAKE_PY3_LIBRARY=/usr/lib64/libpython3.6m.so

rm -rf ${PY2_INSTALL_DIR} ${PY3_INSTALL_DIR}
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}

# First build under Python 3
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_PYTHON="ON" -DPYTHON_EXECUTABLE=${CMAKE_PY3_EXECUTABLE} -DPYTHON_INCLUDE_DIR=${CMAKE_PY3_INCLUDE_DIR} -DPYTHON_LIBRARY=${CMAKE_PY3_LIBRARY} ..
make install
mv ${PY2_INSTALL_DIR} ${PY3_INSTALL_DIR}

# Now build under Python 2
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_PYTHON="ON" -DPYTHON_EXECUTABLE=${CMAKE_PY2_EXECUTABLE} -DPYTHON_INCLUDE_DIR=${CMAKE_PY2_INCLUDE_DIR} -DPYTHON_LIBRARY=${CMAKE_PY2_LIBRARY} ..
make install

cd ${PWD}
echo
echo "Checking Python libs built:"
ls -l --color=auto ${INSTALL_DIR}/lib64/proton/bindings/python*/_cproton.so
echo "done"

NOTE:

  • Adjust REDHAT_DIR if you are not building in your home directory. This is the location where Qpid Proton was cloned in the previous step. This script needs to be located in ${REDHAT_DIR} directory.
  • Check the CMAKE_PY3_* details for your system. For example, on CentOS7, the following changes need to be made:
CMAKE_PY3_EXECUTABLE=/usr/bin/python3.4m
CMAKE_PY3_INCLUDE_DIR=/usr/include/python3.4m
CMAKE_PY3_LIBRARY=/usr/lib64/libpython3.4m.so

If the script builds and installs successfully, you should see the following at the end:

Checking Python libs built:
-rwxr-xr-x. 1 kvdr kvdr 1608536 Feb 27 21:00 /home/kvdr/RedHat/install/lib64/proton/bindings/python/_cproton.so
-rwxr-xr-x. 1 kvdr kvdr 1609328 Feb 27 21:00 /home/kvdr/RedHat/install/lib64/proton/bindings/python3/_cproton.so
done

3. Install qpid-interop-test

Qpid-interop-test may be installed locally (preferred for local builds) or to the system (which requires root privileges). For a local install, use the -DCMAKE_INSTALL_PREFIX option to the cmake command. If it is omitted, then qpid-interop-test will be installed into the default system directories. The source may be unpacked, or (if you need to use the latest and greatest), cloned from git:

git clone https://git-wip-us.apache.org/repos/asf/qpid-interop-test.git

Assuming the source tree is located in directory qpid-interop-test:

cd qpid-interop-test
mkdir build
cd build

For a local install:

cmake -DCMAKE_INSTALL_PREFIX=<abs-path-to-local-install-dir> ..
make install

For a system install, root privileges are required:

cmake ..
make
sudo make install

4. Run the tests

4.1 Set the environment

The config.sh script is in the qpid-interop-test build directory:

source build/config.sh

4.2 Start the test broker

If the broker is at a remote location rather than localhost, the IP address must be known. In tests using the Qpid Dispatch Router, then the entire broker network must be running before the tests are run. The IP addresses of the sender (the broker to which messages are being sent) and receiver (the broker from which messages will be received) must be known.

4.3 Run chosen tests

The available tests are:

ModuleDescriptionClients
amqp_large_content_testTests implementation of large messages up to 10MBC++ Python AMQP.NetLite
amqp_types_testTests the implementation of AMQP 1.0 typesC++ Python Rhea AMQP.NetLite
jms_hdrs_props_testTests JMS headers and propertiesC++ JMS Python
jms_messages_testTests all JMS message types (except ObjectMessage)C++ JMS Python

The preferred method to run the tests is using the Python module option as follows:

python -m qpid_interop_test.amqp_types_test
python -m qpid_interop_test.jms_messages_test
...

If the broker is remote, use the following to point to the broker(s):

python -m qpid_interop_test.amqp_types_test --sender <broker-ip-addr> --receiver <broker-ip-addr>
python -m qpid_interop_test.jms_messages_test --sender <broker-ip-addr> --receiver <broker-ip-addr>
...

In tests using the Qpid dispatch router, a multi-node configuration may be set up such that messages are sent to a different broker to that from which they will be received. For example, to send to broker A and receive from broker B:

python -m qpid_interop_test.amqp_types_test --sender <broker-ip-addr-A> --receiver <broker-ip-addr-B>
python -m qpid_interop_test.jms_messages_test --sender <broker-ip-addr-A> --receiver <broker-ip-addr-B>
...