Configuration of RabbitMQ Server

In this page you can find the actions and configuration changes that are required for setting up a RabbitMQ installation to be available to the interworks.cloud Platform.

 

RabbitMQ Configuration

Before we configure interworks.cloud Platform, you have to create the necessary resources under RabbitMQ.

In order to perform these configurations, you have to open the RabbitMQ UI (e.g. https://rabbitmq01:15672), provide your credentials, and login.

Create Policy

Through RabbitMQ UI you select Admin > Policies and you locate the list of user policies available.

In case there is no user policy available on the above list, you need to select Add / update a policy and create a new policy with the following options:

Create Virtual Host

You need to select Admin > Virtual Hosts and check the list of virtual hosts available.

Except for the root virtual host that is displayed in the previous screenshot, you need to create a new one dedicated to your interworks.cloud Platform installation.

You select Add a new virtual host and fill in the fields available with your selections for the new virtual host name, description and tags.

By pressing Add virtual host button, you should have the following result:

Create Users

Select Admin > Users and locate the list of users available.

Using Add a user option, you can create the following users:

  • WebUser, that will be used from interworks.cloud Platform BSS/Storefront applications.

  • ConsumersService, that will be used from interworks.cloud Platform Consumers windows service.

  • JobsService, that will be used from interworks.cloud Platform Jobs windows service.

  • IntegrationService, that will be used from interworks.cloud Platform Integration windows service.

Our list of users should now look like the one below:

Virtual Hosts Permissions

In order to enable use of newly created virtual host by the users created on the previous step, you need to configure the necessary permissions.

By navigating to Admin > Virtual Hosts screen you can find the list with the current permissions under the Permissions section.

Using the set permission form under the current permissions list, you can provide permissions for all users created on the previous step.

The final list of the current “permissions list” should look like the one below:

Also, the list of users under Admin > Users, should now look like the one below:

interworks.cloud Platform Configuration

Using the resources configured under RabbitMQ from previous paragraphs, it’s now time to configure interworks.cloud Platform for using RabbitMQ features.

In order to perform necessary configurations we will need the following info:

Parameter

Description

Example

Parameter

Description

Example

{ProviderServerUri}

The uri of the messaging server including target virtual host or cluster name

The primary Uri part of the messaging server (e.g. rabbitmqcluster.domain.local) should be accessible by all application servers.

You can verify accessibility by navigating to the web management interface (e.g. by launching http://rabbitmqcluster.domain.local:15672 in a browser) from the application servers.

Typically, the primary Uri part is set as the host name of the rabbitmq server (in case of a single server deployment) or the cluster name of the deployment (in case multiple rabbitmq nodes form a cluster) - You can view or change the cluster name in the RabbitMQ web management interface under Admin > Cluster page. Use of single host names or fully qualified domain names (FQDNs) is supported equally. The only requirement is that theses names must resolve to a valid IP address (Either the IP of the single rabbitmq host or all the IPs of the rabbitmq cluster nodes - the latter requires adding multiple A records in DNS for the specific name).

rabbitmq://rabbitmqcluster.domain.local/interworks.cloud
Note: If the cluster is comprised of 3 nodes with IPs 10.0.0.10, 10.0.0.11, 10.0.0.12 then 3 A records should be configured in the DNS zone rabbitmqcluster.domain.local for the host rabbitmqcluster pointing to 10.0.0.10, 10.0.0.11 and 10.0.0.12 respectively.

rabbitmq://rabbitmq01.domain.local/interworks.cloud
Note: If there is a single rabbitmq node with IP 10.0.0.15 then there must be an A record in the domain.local DNS zone for host rabbitmq01 pointing to 10.0.0.15

{RabbitMQUser}

One of the users created having permissions for accessing target virtual host.

The user selection is based on the application that the configuration is take place.

WebUser

ConsumersServices

JobsService

IntegrationService

{RabbitMQPassword}

The password of the user selected for previous parameter

 

{ClusterNodes}

List of node names in case of clustered RabbitMQ environment, separated by comma

rabbitmq01,rabbitmq02,rabbitmq03

BSS Configuration

The RabbitMQ configuration file for BSS application is CloudBus.config and should be available under C:\CloudPlatform\BSS\Config

C:\CloudPlatform\BSS\Web.config file should point to CloudBus.config file in order the configuration to apply.

<CloudBusConfig configSource="Config\CloudBus.config" />

In case no CloudBus.config file found, feel free to use the following one as initial one.

 

In order to enable communication of BSS application with your RabbitMQ installation you need to use

  • WebUser rabbitmq user

  • and {ProviderServerUri} info

and we change CloudBus.config file using the following template

<?xml version="1.0" encoding="UTF-8"?> <CloudBusConfig BusProvider="RabbitMQ" ProviderServerUri="{ProviderServerUri}" RabbitMQUser="{RabbitMQUser}" RabbitMQPassword="{RabbitMQPassword}"/>

An example CloudBus.config file replacing the parameters on previous lines could look like the following one:

<?xml version="1.0" encoding="UTF-8"?> <CloudBusConfig BusProvider="RabbitMQ" ProviderServerUri="rabbitmq://rabbitmqcluster.local/interworks.cloud" RabbitMQUser="WebUser" RabbitMQPassword="R@bb1tWeb"/>

Storefront Configuration

The RabbitMQ configuration file for Storefront application is CloudBus.config and should be available under C:\CloudPlatform\Storefront.

C:\CloudPlatform\Storefront\Web.config file should point to CloudBus.config file in order the configuration to apply.

<CloudBusConfig configSource="CloudBus.config" />

In order to enable communication of Storefront application with your RabbitMQ installation, we use the same configuration with BSS application using the WebUser rabbitmq user.

Jobs and Consumers Windows Service Configuration

The following windows services are currently utilizing RabbitMQ features:

  • interworks.cloud Platform Jobs

  • interworks.cloud Platform Consumers

The above windows services are available with Administration component under C:\Program Files (x86)\Interworks folder.

For on-premise infrastructures the above windows services are not registered under Administrative Tools > Services of the server, so you need to install them using the following lines under command line run-as Administrator:

"C:\Program Files (x86)\Interworks\Interworks.Cloud.Jobs\Interworks.Cloud.Jobs.exe" install --delayed "C:\Program Files (x86)\Interworks\Interworks.Cloud.Consumers\Interworks.Cloud.Consumers.exe" install --delayed

The following .config files should also be placed under each windows service path and configured replacing placeholder values.

  • copy Interworks.Cloud.Jobs.exe.config under C:\Program Files (x86)\Interworks\Interworks.Cloud.Jobs

  • copy Interworks.Cloud.Consumers.exe.config under C:\Program Files (x86)\Interworks\Interworks.Cloud.Consumers

The following info should be used for configuration of the above files

  • JobsService and ConsumersService rabbitmq user and password

  • {ProviderServerUri}

  • {ClusterNodes}

  • {DatabaseServer} with the name of the database server of the infrastructure

  • {DatabaseName} with the name of the database for current installation

  • {DatabaseUser} with the sql user used to connect to database server

  • {DatabaseUserPassword} with the password of sql user of previous parameter

An example configuration for the Application node is provided below:

After the configuration of windows services, you need to restart them in order to have configuration applied.

You can check successful RabbitMQ configuration of windows services by checking Connections under RabbitMQ UI.

The above configuration could contain multiple Application nodes in order to support multiple installations. This kind of configuration is currently used on our EU and US infrastrurctures.

Integration Windows Service Configuration

interworks.cloud Platform Integration windows service is currently available only for our EU/US infrastructures.

This windows service is an .NET Core 3.1 application and has slightly different configuration that the previous windows services.

The windows service is located under C:\Program Files (x86)\Interworks\interworks.Cloud.Integration.

IntegrationService rabbitmq user should be used for windows service configuration.

The configuration file is AppSettings.json and currently accepts only one configuration per installation (support of multiple configurations is still in progress) and contains the following lines: