Deploy a cluster of integrated Cyberwatch nodes with Swarm

This page provides the procedure to follow to install Cyberwatch in satellite mode using swarm.

Prerequisites

Master node:

  • Network flows authorized, in both directions, with each satellite node, on the following ports (official documentation):

    • TCP 2377 (Docker Swarm)
    • UDP 4789 (Docker Swarm)
    • TCP 7946 (Docker Swarm)
    • UDP 7946 (Docker Swarm)

Satellite node:

Network flows authorized, in both directions, with the master node, on the following ports (official documentation):

  • TCP 2377 (Docker Swarm)
  • UDP 4789 (Docker Swarm)
  • TCP 7946 (Docker Swarm)
  • UDP 7946 (Docker Swarm)

Hardware prerequisites for a satellite node:

  • 2 vCPU
  • RAM 8 GB
  • 20 Go disk space /var/lib/docker/

You can check the hardware prerequisites with these commands:

  • vCPU:
lscpu | grep "CPU(s):"
  • RAM:
free -m
  • Disk space in /var/lib/docker/:
df /var/lib/docker/

Please make sure every node is configured with the correct time.

Master node installation

  • Perform an installation using the standard procedure.
  • Then move on to the configuration of the application.

Once the entire Cyberwatch installation is compliant, copy this command to add a node in the swarm cluster:

docker swarm join-token worker

Satellite installation

  • Install the standard dependencies: docker
  • Integrate the node into the swarm cluster. To do this copy the result of the command

    Example:

    docker swarm join --token SWMTKN-1-35vaurs7958w1dfo3pi0bpokhwgbb5 192.168.1.1:2377
    
  • Execute the following commands to schedule the removal of unused docker images:

    # Clean daily the containers
    cat > /etc/cron.daily/cyberwatch_old_images_cleaner <<- EOM
    #!/bin/bash
    docker system prune -f
    EOM
    chmod +x /etc/cron.daily/cyberwatch_old_images_cleaner
    
  • Relaunch the update command on the master node:

    sudo cyberwatch restart
    

Back to top