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

Install FlexRule Server on Azure VM

◷ Reading Time: 19 minutes

Server Prerequisites

Software

  1. OS: Windows 8.1, Windows Server 2012 R2 and above
  2. MS-SQL Server 2014 Express and above
  3. .NET Core 2.1

Hardware

  • CPU: 2 Cores or more
  • RAM: 7 GB or more
  • HDD: 14 GB SSD or more

Set up an Azure VM

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

select Windows 2008 R2
select Standard in the VM specs screen

Connectivity

IP Addresses

Each VM on Azure 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 in the VM’s Overview page:

These IPs will be used later to set up the FlexRule Server master/agent configurator application.

Setup DNS

In this step, you are going to create a DNS name label for the VM that allows you to use the name to access the VM rather than its IP.

After Installing FlexRule Server Master and Agent, you will be able to browse the FlexRule Workbench. FlexRule Workbench is available by browsing the VM’s DNS name from your browsers (i.e., Chrome, IE, etc.). Your selected VM by default doesn’t have the DNS name label and it needs to be configured manually. This option is available under your server configuration:

Then go to DNS name configuration.

There you can edit the DNS name label.

Inbound security Rules

You should configure new inbound security rules that will enable communication to your VM from the outside (internet). By default, all ports except RDP (:3389) are blocked. To be able to browse FlexRule Workbench we need to open two ports:

  • FlexRule Server Master uses TCP:9000 by default.
  • FlexRule Workbench uses TCP:9010 by default.

In order to add these ports in Inbound Security Rules, you need to do the following:

  1. From the left panel, go to Settings > Network Interfaces.
  2. Click on Network Security Group > [Your VM Machine] > Inbound Security Rules.
  3. Click on Add (the Add button is the three horizontal lines with a down arrow).
Add TCP:9000 port for FlexRule Server Master

Add TCP: 9010 port for FlexRule Workbench

Firewall Policy

In this step, you need to configure Inbound and Outbound ports on your 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 in your Windows Firewall:

  1. TCP:9000 (FlexRule Server Master).
  2. TCP:9010 (FlexRule Server Workbench).

Installation

1. Connect to the VM.

2. When you use the Microsoft Azure VM, the IP addresses you would use on FlexRule Server Configurator need to be picked from your VM’s configuration instead of using localhost. The IP or name address for FlexRule Server Master and Workbench would be your VM’s Private IP address.

You can find this by using the command ipconfig in the command prompt.

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

Download Installation Files

  1. Go to the FlexRule website’s Downloads section: http://www.flexrule.com/downloads/links.
  2. Log in with your FlexRule username and password.
  3. Enter the password you received from FlexRule (contact support@flexrule.com for the password if you don’t already have it).
  4. Click on Download Now to download the FlexRule Server installation file.
  5. A zip file will be downloaded.
  6. 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 Azure 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 Azure 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 Azure 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.

If you have added your DNS name label as mentioned under the above section Setup DNS, you can access the workbench using that name as follows.

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 Azure VM’s private IP as the IP address for this node.

Master Instance Address

Use the Azure 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.

Video Tutorial

Installing FlexRule Server on a Virtual Machine

Running FlexRule Server

Updated on January 14, 2020

Was this article helpful?

Related Articles