Skip to content

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.

visual hint: do this only on one server

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

visual hint: do this on all servers

Perform the following configuration steps on <server_1>, <server_2> and <server_3>:

  1. Stop PLOSSYS Output Engine including the seal-consul-agent service.

    plossys service stop
    
    plossys service stop seal-consul-agent
    
  2. Open the Consul configuration file:

    /opt/seal/etc/consul.json
    
  3. 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.

  4. Search for the following line:

    "bootstrap_expect": 1,
    

    and replace it by this line:

    "bootstrap_expect": 3,
    
  5. 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.

  6. Save the file.

  7. Delete the contents of the following directory:

    sudo rm -r /opt/seal/data/seal-consul-agent/raft
    
  8. Start PLOSSYS Output Engine.

  9. 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.

visual hint: do this only on one server

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.


Back to top