Set up a Segura® cluster
During this process your Segura® cluster can be unstable or unavailable.
You should have the following environments to be able to set up your cluster:
- Segura® primary instance:
192.168.0.8 - Segura® secondary instance:
192.168.0.9 - Linux machine with Docker host:
192.168.0.5
- Define the cluster with Arbitrator:
The orbit cluster config command has been deprecated and must no longer be used. The cluster configuration process must be performed exclusively through the web interface.
More information on how to define the cluster with Arbitrator in How to create a cluster.
When implementing the arbiter in a two-node cluster, ensure that the latency configuration of the Primary and Secondary nodes is set to High in Orbit > Replication > Settings. The arbiter is pre-configured with high latency by default, and using a different latency configuration can cause issues with the feature's operation.
- Set up Elasticsearch
This process can take several minutes.
a. Enter the following command on the primary instance of the cluster:
orbit elasticsearch setup
b. Enter the following command on the secondary instance of the cluster:
orbit elasticsearch setup
- Restart the Segura® cluster
During the execution of this process, the Segura® Platform database will be restarted so that the environment may experience a brief unavailability.
a. Enter the following command on the primary instance of the cluster:
orbit cluster stop
orbit cluster start
b. Enter the following command on the secondary instance of the cluster:
orbit cluster stop
orbit cluster start
Transfer files to Docker host
This configuration only needs to be performed in one of the Segura® Platform instances.
Log in via SSH (59022) on the primary Segura® Platform instance and follow these steps:
- Generate the Arbiter config file and the Docker image
orbit cluster arbiter create-config
After this process, two files will be created in the path: /var/tmp/senhasegura-cluster-arbiter/
-
manifests.tar.gz: contains the files needed to run the arbitrator containers. It helps if you transfer it to the remote machine that will be running Arbitrator. More information in the README file.
-
docker-images.tar.gz: contains the container images themselves. Transferring this file is optional. You can download the image directly from the docker registry, as explained in the file.
- Transfer the
manifests.tar.gzfile to the Docker host via scp
Docker host with internet access
Docker host needs to have access to registry.senhasegura.io.
Transfer the manifests.tar.gz file to the machine with docker and docker-compose:
scp /var/tmp/senhasegura-cluster-arbiter/manifests.tar.gz [email protected]:/tmp/
Docker host without internet access
To an offline environment, you need to transfer the manifests and docker-images files to Docker host.
Transfer manifests.tar.gz
scp /var/tmp/senhasegura-cluster-arbiter/manifests.tar.gz [email protected]:/tmp/
Transfer docker-images.tar.gz
scp /var/tmp/senhasegura-cluster-arbiter/docker-images.tar.gz [email protected]:/tmp/