1. Home
  2. FlexRule Server
  3. Utilities
  4. CLI Commands for FlexRule Server Configuration

CLI Commands for FlexRule Server Configuration

◷ Reading Time: 7 minutes

This page is under construction 🚧

New config file

Create a new configuration file for FlexRule Server.

 FRS.exe config --new [master | agent] 
  • –new: The node that you want to update (master/ agent)

1. Run Command Prompt as administrator and navigate to the Master/ Agent folder.
cd <Master/ Agent folder location>
2. Run the command to create the config file

Examples

Master:

FRS.exe config --new master

Agent:

FRS.exe config --new agent

Runtime license and Runtime folder

Set the Runtime license file path and Runtime folder path.

FRS.exe config --execute --runtime [master|agent] --license [license path] --folder [runtime folder] 
  • –runtime: The node that you want to update (master/ agent)
  • –license: Runtime license path. This is the flexrule.license.lic file that needs to be downloaded from FlexRule user profile.
  • –folder: Runtime folder path

Examples

Master:

FRS.exe config --execute --runtime master --license "C:\Users\Subhashi\Documents.flexrule\flexrule.license.lic" --folder "C:\Users\Subhashi\Documents.flexrule\9.0.107"

Agent:

FRS.exe config --execute --runtime agent --license "C:\Users\Subhashi\Documents.flexrule\flexrule.license.lic" --folder "C:\Users\Subhashi\Documents.flexrule\9.0.107"

API Address

Set the address to call Master/ Agent node.

 FRS.exe config [--agent | --master] --host IP:PORT
  • –agent | –master: The node that you want to update (master/ agent)
  • host: The IP and the port of the address you want to set as the node address. This address must specify the protocol (http:// or https://)

Example

Master:

FRS.exe config --master --host http://localhost:9000

Agent:

FRS.exe config --agent --host http://localhost:9500

Master node address in the agent configuration

When there is an agent node, set the master node address in the agent configuration. Therefore, this is command is not applicable to the Master node.

FRS.exe config --agent --masterAddress IP:PORT
  • –agent: This is a mandatory command.
  • –masterAddress: The IP and the port of master node address. This address must specify the protocol (http:// or https://).
    You can find this value from the Master configuration file (FlexRule.Server.Master.dll.config), under tag MasterAddress.

Example

Master: N/A

Agent:

 FRS.exe config --agent --masterAddress "http://localhost:9000"

Workbench

Set the workbench address. This command is applicable to the Master node only.

FRS.exe config --workbench [true|false] --host IP:PORT
  • –workbench: State whether you want to set a workbench (true/ false)
  • –host: The IP and the port of the address you want to set as the node address. This address must specify the protocol (http:// or https://)

Examples

Master:

FRS.exe config --workbench true --host "http://localhost:9010"

Agent: N/A

Error log file

Set error log file path.

FRS.exe config --error --file [log file path] --eventLog
  • –error: This is a mandatory command.
  • –file: Define the path including the file you want to write logs. You can define any file for this.
  • –eventLog: Write to the windows system event log

Examples

Master:

FRS.exe config --error --file "D:\Program Files (x86)\master.log" --eventLog

Agent:

FRS.exe config --error --file "D:\Program Files (x86)\agent.txt" --eventLog 

Security keys

Set the security keys. All the keys should be 32-character long.

masterEncryption is required only for the Master node.

sharedSecret and authSignKey of the Master and Agent nodes should be the same allowing them to communicate with each other.

FRS.exe config --security [--masterEncryption [encryptionValue]] [--sharedSecret [secretValue]] [--authSignKey [authValue]]
  • –security: This is a mandatory command.
  • –masterEncryption: Master encryption key
  • –sharedSecret: Shareed secret
  • –authSignKey: Authentication key

Examples

Master:

FRS.exe config --security --masterEncryption "rtfeWvGee4t3UR3CE@km3RE8ey7rq87N" --sharedSecret "abcdWvGee4t3UR3CE@km3RE8ey7rq87N" --authSignKey "1234WvGee4t3UR3CE@km3RE8ey7rq87N"

Agent:

FRS.exe config --security  --sharedSecret "abcdWvGee4t3UR3CE@km3RE8ey7rq87N" --authSignKey "1234WvGee4t3UR3CE@km3RE8ey7rq87N"

Database

Database configuration

Set the database settings of the FlexRule Server. There should be only one database for both Master and Agent.

FRS.exe config --database --server [serverValue] --name [dbName]  --user [userValue] --password [passwordValue] --integrated --azure --encrypt --trustCert --timeout [timeoutValue] --port [portValue]
  • –database: This is a mandatory command.
  • –server: Database server address
  • –name: Database name
  • –user: Username to connect to the database
  • –password: Password to connect to the database
  • –integrated: Option to use Windows Authentication (Integrated Security)
  • –azure: Option to use MS SQL Azure database
  • –encrypt: Option to state encryption
  • –trustCert: State whether you have Trust Server Certificate
  • –timeout: State timeout period
  • –port: State the port

Example

Master/ Agent:

FRS.exe config --database --server "FLEXRULE-02\SQLEXPRESS02" --name "frdb9096" --user "testUser" --password "testPw" --encrypt --trustCert --timeout 30 --integrated --azure "test" --port 2500

Database migration

FRS.exe database --migrate [nothing|refresh|new]

Create database

FRS.exe database --create defaults

Application or User Accounts

FRS.exe account --type [app|user] --name [name of account] --pw [VALUE]
Updated on October 6, 2021

Was this article helpful?

Related Articles