Docker settings
  • 1 minute to read
  • Dark
    Light
  • PDF

Docker settings

  • Dark
    Light
  • PDF

Article summary

Set up Docker containers

  1. Log in Docker host via SSH
  2. Go to the opt directory
cd /opt/
  1. Unzip the manifests file
tar -xzvf /tmp/manifests.tar.gz
  1. Go to the manifests directory
cd manifests/
Info

Check the README file to know more about files and instructions.

Now, you have two deploy options: docker-compose and docker with startup script. We strongly recommend the use of docker-compose.


Set up Docker variables

Set the kernel parameter needed by the Elasticsearch container

  1. Setting up Docker variables
sysctl -w vm.max_map_count=262144
echo 'vm.max_map_count=262144' >> /etc/sysctl.conf

Start Docker containers

Docker host with internet access

Caution

Docker host needs to have access to registry.senhasegura.io.

Using docker-compose (recommended)

You need to have docker-compose installed in your Docker host.

The docker-compose.yml file contains everything necessary to run both the Galera cluster and Elasticsearch containers.

  1. Go to docker-compose directory
cd /opt/manifests/docker-compose
  1. Start the containers
docker-compose up -d
Info

You can manage both containers at the same time with the commands docker-compose stop, docker-compose start and docker-compose restart.

You can also see both containers logs simultaneously with the command docker-compose logs -f.


Using the script

The startup.sh script contains everything necessary to run both Galera cluster and Elasticsearch containers.

  1. Go to docker directory
cd /opt/manifests/docker
  1. Run the startup script
./startup.sh

You can see the containers logs individually with the commands docker logs -f garbd-senhasegura-arbiter and docker logs -f elasticsearch-senhasegura-arbiter.


Docker host without internet access

Use this option if the Docker host doesn't have internet access.

  1. Go to the opt directory
cd /opt/
  1. Unzip the docker-images file
tar -xzvf docker-images.tar.gz
  1. Load both images into docker by running the following command:
bash /opt/docker-images/docker-load-images.sh
  1. Check if the images were successfully imported with the command. Issue the command:
docker images
Info

They should appear at the very top of the list.

  1. Go to docker-compose directory
cd /opt/manifests/docker-compose
  1. Start up the containers
docker-compose up -d

Validate the installation

To verify if everything is working properly, execute the following command on both senhasegura instances:

orbit cluster arbiter status

Expected result:

senhasegura cluster arbiter

Status: ENABLED
Arbiter IP address: 192.168.0.5

Galera Cluster arbiter (garbd) status: Connected, OK
Elasticsearch arbiter status: Connected, OK

Troubleshooting guides is available at https://d.senhasegura.io/woam2aet

Troubleshooting

If you encounter any issues, you can try the following articles:

Arbitrator Troubleshooting

If you still cannot find your issue, you can send your issue to our Community.


Was this article helpful?