Configure Consul in a Cluster¶
The Consul processes of all PLOSSYS 5 servers in a cluster have to be connected for cross-server service discovery and system configuration. If one PLOSSYS 5 server fails, the entire system remains functional.
Backup the Configuration¶
If you expand an already existent PLOSSYS 5 single server to a cluster, first export the configuration of PLOSSYS 5.
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>
:
-
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! 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
Import the Backup of the Configuration¶
After the configuration has been changed on all PLOSSYS 5 servers, Consul runs in the cluster mode. Now, the backup of the configuration can be imported.
Hint - only one server
The configuration has to be imported on one PLOSSYS 5 server only due to the configuration is automatically update on all PLOSSYS 5 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.
Next Step¶
Continue with: Configure MongoDB in a Cluster