Adding Clients

This page describes the process for adding clients to an already-installed Weka system cluster.

Introduction

When launching a Weka system cluster, either through the Self-Service Portal or via a CloudFormation template, it is also possible to launch client instances. However, sometimes it may be required to add more clients after the cluster has been installed. To add more clients as separate instances, follow the instructions below.

Note: It is advisable to turn off auto kernel updates so it will not get upgraded to a yet unsupported version.

Adding Clients as Separate Instances

Step 1: Launch the New Instances

Note: Any new client instances must be of one of the types appearing in Supported EC2 Instance Types.

When launching new clients, ensure the following concerning networking and root volume:

Networking

  • For best performance, it is recommended that the new clients will be in the same subnet as the backend instances, alternatively, they can be in a routable subnet to the backend instances in the same AZ (note that cross-AZ traffic also incurs expensive network charges).

  • They must use the same security group as the backends they will connect to, or alternatively use a security group which allows them to connect to the backend instances.

  • The OS network manager must be disabled.

IAM Instance Profile

When adding a client, it is required to provide permissions to several AWS APIs, as described in IAM Role Created in Template.

These permissions are automatically created in an instance profile as part of the CloudFormation stack. It is possible to use the same instance profile as one of the backend instances to ensure that the same credentials are given to the new client.

The network interface permissions are required to create and attach a network interface to the new client. A separate NIC is required to allow the Weka system client to preallocate the network resource for fastest performance.

If the client is not to be provided with these permissions, it is possible to only provide ec2:* and create an additional NIC in the same security group and subnet as described above.

Root Volume

The clients root volume must be at least 48 GiB in size and either GP2 or IO1 type.

The Weka software is installed under /opt/weka. If it is not possible to change the size of the root volume, an additional EBS volume can be created, formatted and mounted under /opt/weka. Make sure that the new volume is either GP2 or IO1 type.

Step 2: Mounting Filesystems

Note: The clients created using the Self-Service Portal are stateless. The mount command automatically installs the software version, and there is no need to join the client to the cluster.

To mount a filesystem in this manner, first install the Weka agent from one of the backend instances and then mount the filesystem. For example:

# Agent Installation (one time)
curl http://Backend-1:14000/dist/v1/install | sh
# Creating a mount point (one time)
mkdir -p /mnt/weka
# Mounting a filesystem
mount -t wekafs Backend-1/my_fs /mnt/weka

For the first mount, this will install the Weka software and automatically configure the client. For more information on mount and configuration options, refer to Mounting Filesystems Using the Stateless Clients Feature.

It is possible to configure the client OS to automatically mount the filesystem at boot time. For more information refer to Mounting Filesystems Using fstab or Mounting Filesystems Using autofs.

Adding Clients Which Are Always Part of the Cluster

Note: It is possible to add instances which do not contribute resources to the cluster but are used for mounting filesystems. It is recommended to use the previously described method for adding client instances for mounting purposes. However, in some cases it could be useful to permanently add them to the cluster, e.g., to use these instances as NFS/SMB servers which are always expected to be up.

This is the same step as in the previous method of adding a client.

Step 2: Install the Weka Software

To download the Weka software, go to https://get.weka.io and select the software version to be downloaded. After selecting the version, select the operating system it is to be installed on and run the download command line as rooton all the new client instances.

When the download is complete, untar the downloaded package and run the install.sh command in the package directory.

For Example: If you downloaded version 3.6.1, runcd weka-3.6.1 and then run ./install.sh.

Note: ENA Driver Notice

When installing on an AWS instance with Elastic Network Adapter (ENA) and a non-up-to-date kernel, it may be necessary to install the ENA drivers or upgrade to a more recent operating system version. The ENA driver is automatically available on recent operating systems, such as RedHat/Centos 7.4, Ubuntu 16 and Amazon Linux 2017.09.

Step 3: Add Clients to the Cluster

Once the Weka software is installed, the clients are ready to join the cluster. To add the clients, run the following command line on each of the client instances:

weka local run -e WEKA_HOST=<backend-ip> aws-add-client <client-instance-id>

where <backend-ip> is the IP address or hostname of one of the backend instances.

On most shells the following would get the client instance ID and add it to the cluster:

weka local run -e WEKA_HOST=<backend-ip> aws-add-client `curl -s http://169.254.169.254/latest/meta-data/instance-id`

If successful, running theaws-add-client command will display the following line:

Client has joined the cluster

Note: Dedicated Client Resources

Once the aws-add-client command is complete, one core and 6.3 GB of RAM are allocated for the Weka system on the client instance. This is performed as part of the Weka system preallocation of resources, ensuring that variance in client activity does not result in the allocation of resources that may affect the programs running on the client host. For more information, see Memory Resource Planning.

Step 4: Mount Filesystems on the Clients

It is now possible to mount the filesystems on the client instances.

For Example: Using themkdir -p /mnt/weka && mount -t wekafs default /mnt/weka command will mount the defaultfilesystem under /mnt/weka.

Note: For more information about available mount options, see Mounting Filesystems.