How To Install Shield On A CentOS/RHEL OS

Shield can be installed on a Centos/RHEL operating system. This is a Tech-Preview feature.

Prerequisites

RHEL 7.5 or CentOS-7 (1810) on X86 architecture

Installation

CentOS

To install Shield on CentOS, follow these steps:

curl -JLO "https://raw.githubusercontent.com/EricomSoftwareLtd/Shield/master/Setup/rpm/ericomshield-setup-rhel.sh"
chmod +x ericomshield-setup-rhel.sh
./ericomshield-setup-rhel.sh Rel-18.12

Red Hat Enterprise Linux (RHEL)

To install Shield on RHEL - Docker Enterprise License is required (The URL of the Docker EE repository associated with the trial or subscription). To obtain it:

  1. Go to https://hub.docker.com/my-content. All subscriptions and trials are listed there.
  2. Click the Setup button for Docker Enterprise Edition for Red Hat Enterprise Linux.
  3. Copy the URL from Copy and paste this URL to download your Edition and save it for later use.

Now follow these steps:

curl -JLO "https://raw.githubusercontent.com/EricomSoftwareLtd/Shield/master/Setup/rpm/ericomshield-setup-rhel.sh"
chmod +x ericomshield-setup-rhel.sh
./ericomshield-setup-rhel.sh Rel-18.12 <DOCKER_URL>

If the following error is received: Error: ericom_shield conflicts with dnsmasq-2.76-7.el7.x86_64 - dnsmasq should be removed from the system:

sudo yum erase dnsmasq

Create A Cluster

To create a cluster of nodes on a CentOS/RHEL system, follow these steps:

  1. Install Shield on the Management node using the installation instructions above (will be referred to as Manager #1)
  2. Install Shield on new node that should be added to the cluster.

Note

Nodes are added one at a time, so to create a cluster of 3 nodes (1 manager & 2 workers) repeat the add node process twice, until all nodes are joined to the cluster.

  1. Go to the Manager #1 and run:

    sudo docker swarm join-token (worker|manager)
    

The Output of the command should be copied (to be used next). For example:

docker swarm join --token SWMTKN-1-41gflczk9ftd6z8eyo2bgz91y6zxoxmjlocd8f8uc4w5p521ou-7v6cfpgvyhcruqx4xygcc570o 126.0.3.39:2377

Note

Select manager/worker according to the role of the node you want to add (manager for management node and worker for other type of nodes). The token in the command output is changed whether it is worker/manager.

  1. Go to the node (that should be added) and run:

    sudo docker swarm leave -f
    
  2. Run the copied command output (from step 3). This will join the node to the cluster.

    Make sure that the node joined the cluster. E.g.:

    sudo docker node ls
    
  3. Go to the Manager #1 and run:

    sudo ./nodes.sh –add-label <NODE_NAME> <NODE_LABEL>

Optional labels are: browser, shield_core and management.

  1. Repeat steps 2-5 for each additional node that should be added to the cluster. If all nodes are of the same type, no need to run the join-token command again, but instead use the same copied command for all new nodes.

Upgrade Shield

CentOS

To upgrade to a new Shield release, go to each node in the cluster and run the following command:

sudo yum install https://github.com/EricomSoftwareLtd/Shield/releases/download/<SHIELD_VERSION>/ericom_shield.centos.x86_64.rpm

Then, on one of the management nodes, run:

/usr/local/ericomshield/restart.sh

Red Hat Enterprise Linux (RHEL)

To upgrade to a new Shield release, go to each node in the cluster and run the following command:

sudo yum install https://github.com/EricomSoftwareLtd/Shield/releases/download/<SHIELD_VERSION>/ericom_shield.rhel.x86_64.rpm

Then, on one of the management nodes, run:

/usr/local/ericomshield/restart.sh

Note

<SHIELD_VERSION> is in the following format: Rel-YY.MM (e.g. Rel-18.12)