1. Home
  2. FlexRule Server
  3. Installation
  4. Install FlexRule Server on AWS VM

Install FlexRule Server on AWS VM

◷ Reading Time: 17 minutes

Set up an AWS VM

Before you start installing FlexRule Server on AWS, you need to prepare a Windows VM and its connectivity.

Follow the guides given by AWS to create the instance, starting with the setup.

  1. Sign up for AWS
  2. Create a key pair
  3. Create a security group
    When creating your security group, add Custom TCP rules as follows.

These ports will be used later in the installation sections.

  • TCP:9000 (FlexRule Server Master).
  • TCP:9010 (FlexRule Server Workbench).

Once you complete the setup, then continue with the instance.

4. Launch an instance
5. Connect to your instance

For this example, we used an MS Windows Server 2019.

IP Addresses

Each VM on AWS has two IP addresses: Public and Private. During the VM installation, you need to know the VM’s Public and Private IP addresses. These IPs have been listed on the VM’s Overview page:

In this example, 10.0.1.4 is the private VM IP address.

Firewall Policy

In your VM, you need to configure Inbound and Outbound ports on your Windows firewall policy in order to be able to browse FlexRule Workbench over the Internet.

To do that, you need to have the following ports opened (both Inbound and Outbound) in your Windows Firewall:

  • TCP:9000 (FlexRule Server Master).
  • TCP:9010 (FlexRule Server Workbench).

Setting up AWS MS SQL database

You can use any MS SQL database for FlexRule Server. But if you want to create an MS SQL database in AWS, you can follow these guidelines.

Download Installation Files

  1. Go to the download section of your profile: 
    http://my.flexrule.com/
  2. Log in with your FlexRule username and password.
  3. Download FlexRule Server installation file.
  4. A zip file will be downloaded.
  5. Unzip the downloaded file. There will be two setup files.

There are two separate installations.

  • Master: Manages the agents and services.
  • Agent: Executes the services.

Install FlexRule Server Master

Master Installation

First, install the Master server.

FlexRuleServer-Master-<version>Setup.exe

1. Select the installation location for the Master Server.

Install FlexRule server license

If you have purchased a license already, click on Close.
Otherwise, follow the wizard to download a trial license.

The license file for FlexRule Server is called flexrule.server.license.lic. This file will need to be copied into the FlexRule Server Master folder at the following location:

[Server Install Path]\FlexRule Server\{version}\Master\flexrule.server.license.lic

e.g. C:\Program Files (x86)\Pliant Framework\FlexRule Server\8.0.117\Master

Before running the configurator, you have to copy the server license file to the Master folder location.

Run the Configurator for Master

Once you closed the trial license downloader pop-up window, the configurator will appear and by default Master will be selected there directing you to Master server configurations.

Provide Runtime License location

If you want to execute services using the Master server instead of a separate Agent server, you can tick this box and provide the path to a FlexRule Runtime license that allows execution (flexrule.license.lic).

If you want to install a separate Agent (recommended) to execute services, untick this box and click Next.

Server IP Address and Port

Each instance of Master and Agent needs to listen to a specific IP and port to respond to requests. You can either use localhost or the machine’s IP.

Use the AWS VM’s private IP address as the IP address for this node. You can use the ipconfig command in a Command Prompt to find the private IP address. You can also find this in your VM details in AWS Portal.

Set up the Workbench

Workbench is a web-based application for administration and monitoring of Flexrule Server. Workbench enables multiple user accounts with different permissions to administer and run different parts of the system. It’s hosted inside the Master node. You need to provide an address and port to use for the Workbench in the hosting configuration.

Use the AWS VM’s private IP address as the IP address for this node.

Debug and Tracing

FlexRule Server lets you log and monitor events. You will likely find it useful to write these to a log file so you can investigate errors.

You can also choose to Write to the Windows System Event Log if you want to use the Event Viewer available in Windows to monitor the application.

When an error occurs on Master or Agent it is sent as an event to a particular monitoring channel (e.g. local file). The local file for logging should be different for each Master and Execution Agent.

If you’re unsure, just use the default setting.

Default Accounts

User accounts are used to manage the FlexRule Server.

Application accounts are used for execution of rules and decisions by third-party applications (e.g. a mobile app that executes a decision).

The Admin user account is created by default to be used for administration purposes in the Workbench. You can use this account to create more accounts with different roles and access permissions using Workbench.

Make a note on these two passwords as you will need them when deploying projects on FlexRule server.

Admin User Account Password is used to log in to the Workbench and publish services.
Default Application Account Details are used to run services in Workbench.

Security Settings

The communication between Master, Agent, and clients are secured with different mechanisms.

In this section, you need to provide passwords for communication, encryption and signing security tokens for authentication. In each of the three tabs you need to enter STRONG passwords for each field. The password cannot be less than 32 characters. You can also generate the password using the provided button.

Keep note of the Auth Signing Key and the Master-Agent Shared Secret as you need to enter them again for the Agent setup.

  • Auth Signing Key and Master-Agent Shared Secret must match between Master and Agent nodes.
  • If this is a migration, the Master Encryption Password and Auth Signing Key must match the previous installation.

Database (Microsoft SQL Server)

FlexRule Server 3.0+ requires a Microsoft SQL Server database.

In the database setup section, you need to add the database server information to be used with Master and Agent nodes:

Add the database server address and database name for your database.

Add the username and password with manage access to the database server.

Specify further optional configuration to connect to your database.

If the database does not exist on the database server, the Configurator can create it for you.
Your user credentials need to have access to create the database for this to work successfully.

Database (Azure SQL Database)

FlexRule Server is compatible with Azure SQL Database.

If using Azure SQL, the steps are the same as above except for the Advanced tab where you need to ensure the following:

  • MS SQL AZURE database must be ticked.
  • Trust Server Certificate must be ticked.
  • Timeout must be set (e.g. 30 seconds).
  • Port number must be set to 1433.

Migration of Database

If there is an existing database with the same name, you can choose one of these options:

  1. Don’t change anything in the database.
  2. Delete and Recreate database tables.
  3. Migrate the existing database to New Version.

Save and Create

You should now see the buttons Save and Create.

Click on Save to create a configuration file for Master.

[Installation Path]\Master\FlexRule.Server.Master.dll.config

Click on Create to create a default set of data that allows you to run a Master
The wizard will create an application account, a user account, administrator and application roles, and permission settings for roles.

Set Workbench Authentication Address

You must change the Workbench Authentication address in the configuration for FlexRule Server Master. This is necessary because the address must be valid on a client machine.

Open the Master config file.

[Server Install Path]\Master\FlexRule.Server.Master.dll.config

e.g. C:\Program Files (x86)\Pliant Framework\FlexRule Server\8.0.117\Master\FlexRule.Server.Master.dll.config

Enter your VM’s public IP address / DNS name label to WorkbenchAuth tag.

Install FlexRule Server Agent

Agent Installation

After installing the Master server successfully, the Agent server can be installed.

FlexRuleServer-ExecAgent-<version>Setup.exe

Select the installation location for the Agent server.

Install FlexRule Server License

If you have purchased a license already, click on Close.
Otherwise, follow the wizard to download a trial license.

The license file for FlexRule Server is called flexrule.server.license.lic. This file will need to be copied into the FlexRule Server ExecAgent folder at the following location:

[Server Install Path]\FlexRule Server\{version}\ExecAgent\flexrule.server.license.lic

e.g. C:\Program Files (x86)\Pliant Framework\FlexRule Server\8.0.117\ExecAgent

Before running the configurator, you have to copy the server license file to the ExecAgent folder location.

Run the Configurator for Agent

By default, Agent will be selected on the configurator.

Provide Runtime License location

Specify the location of your FlexRule Runtime file (flexrule.license.lic).

Server IP Address and Port

Each instance of Master and Agent needs to listen to a specific IP and port to respond to requests. Use the AWS VM’s private IP as the IP address for this node.

Master Instance Address

Use the AWS VM’s private IP where the master node is installed as the IP address.

Debug and Tracing

Security Settings

Enter the Auth Signing Key and Master-Agent Shared Secret you entered in Master configuration. These must match between Master and Agent.

You can also find them in the following file.

[Server Install Path]\<version>\Master\FlexRule.Server.Master.dll.config

e.g. C:\Program Files (x86)\Pliant Framework\FlexRule Server\8.0.117\Master\FlexRule.Server.Master.dll.config

Database

Add database settings that match the Master configuration.

Save and Create

You should now see the buttons Save and Create.

Click on Save to create a configuration file for Agent.

[Server Install Path]\ExecAgent\FlexRule.Server.ExecAgent.dll.config

Click on Create to create an entry in the database to connect it to the Master.

Browse FlexRule Workbench

After successfully installing and configuring FlexRule Server (Master, Agent, and Workbench), it’s time to test it out.

You can follow these instructions, which are explained step-by-step. In our scenario, we simply ran them using the command line (in Windows Command Prompt).

If you have installed and configured everything correctly, you should now be able to browse to the FlexRule Workbench in your web browser.

  1. Open a browser (e.g. Chrome) and browse to your FlexRule Workbench.
    Use the public IP address/ DNS name.
  2. Enter admin as the username and your password that you defined during the default account settings in FlexRule Server Master configuration.

Now you should be able to see the FlexRule Workbench home page.

Updated on April 14, 2021

Was this article helpful?

Related Articles