Configure Consul in a Cluster¶
The Consul processes of all Output Engine servers in a cluster have to be connected for cross-server service discovery and system configuration. If one Output Engine server fails, the entire system remains functional.
Backup the Configuration¶
If you expand an already existent Output Engine single server to a cluster, first export the configuration of PLOSSYS Output Engine.
Perform the following configuration step on <server_1>
:
plossys config export <plossys_5_backup>.yml
Hint - more options
For more information about the export via PLOSSYS CLI, refer to Administrate the System Configuration.
Adjust the Consul Services¶
Perform the following configuration steps on <server_1>
, <server_2>
and <server_3>
:
-
Stop PLOSSYS Output Engine including the
seal-consul-agent
service.plossys service stop
plossys service stop seal-consul-agent
-
Open the Consul configuration file:
C:\ProgramData\SEAL Systems\config\consul.json
-
Delete the following line:
"bind_addr": "127.0.0.1",
Hint - multiple network interfaces
If a server has several network interfaces with private IP addresses, do not delete the complete line but replace
127.0.0.1
with the appropriate IP address. -
Search for the following line:
"bootstrap_expect": 1,
and replace it by the following line:
"bootstrap_expect": 3,
-
Add the following line at any position:
"retry_join": ["<server_1>", "<server_2>", "<server_3>"]
Caution - JSON structure
Pay attention to keep the JSON structure in the configuration file! If the quoted line is added right before the last closing curly bracket, you can use it as it is. Otherwise a comma has to be added at its end. For further information, refer to http://json.org/json-de.html.
-
Save the file.
-
Delete the contents of the following directory:
C:\ProgramData\SEAL Systems\data\seal-consul-agent
-
In case you configured the Consul cluster during a new installation, continue with step 9 in the installation chapter.
Import the Backup of the Configuration¶
After the configuration has been changed on all Output Engine servers, Consul runs in cluster mode. Now, the backup of the configuration can be imported.
Hint - only one server
The configuration has to be imported on one Output Engine server only due to the configuration is automatically update on all Output Engine servers belonging to a cluster.
Perform the following configuration step on <server_1>
:
plossys config import <plossys_5_backup>.yml
Hint - more options
For more information about the import via PLOSSYS CLI, refer to Administrate the System Configuration.