Installation and Setup
In this installation and setup guide we walk you through the process of planning your deployment, installing RS, setting up a multi-node cluster, and creating your database—soup to nuts. So, grab a cup of coffee and let’s get started.
Planning your RS deployment
To install Redis Enterprise Software (RS) on each node in the cluster, you must first:
-
Set up your hardware according to the hardware requirements.
-
Choose the platform that you want to deploy on.
In addition to Linux operating systems (Ubuntu, RHEL/CentOS, Oracle Linux), you can also deploy RS with:
- Amazon AWS AMI
- Docker container (for development and testing only)
- Pivotal Cloud Foundry
- Kubernetes
-
Open network ports in the firewall to allow connections to the nodes.
-
Configure cluster DNS so that cluster nodes can reach each other by DNS names.
Downloading the installation package
To download the installation package for any of the supported platforms:
- Go to the Redis Labs download page.
- Log in with your Redis Labs credentials or sign up for a new account.
- In the Downloads section for Redis Enterprise Software, select the installation package for your platform and click Go.
Installing RS on Linux
After you download the .tar file installation package, you are ready to install the package on the nodes in the cluster. Here we walk you through the process for installing the RS installation package for Linux.
Before you install RS, review these notes:
-
If you want to use Redis on Flash (RoF) for your databases, review the prerequisites, storage requirements, and other considerations for RoF databases and prepare and format the flash memory.
-
Disable Linux swap on all cluster nodes.
-
Make sure that you have root-level access to each node, either directly or with sudo.
-
If you require the
redislabs
UID (user ID) and GID (group ID) numbers to be the same on all the nodes, create theredislabs
user and group with the required numbers on each node. -
When port 53 is in use, the installation fails. This is known to happen in default Ubuntu 18.04 installations in which systemd-resolved (DNS server) is running. To work around this issue, change the system configuration to make this port available before running the RS installation.
-
Make sure that the OS is not using ports in the range that Redis assigns to databases. We recommend that you restrict the OS from using Redis ports range in
/etc/sysctl.conf
withnet.ipv4.ip_local_port_range = 40000 65535
. -
The main directories that RS is installed in are:
- /opt/redislabs
- /etc/opt/redislabs
- /var/opt/redislabs
-
RS is installed with the system user and group
redislabs:redislabs
To install RS on Linux from the CLI:
-
Copy the installation package to the node.
scp redislabs-X.Y.Z-32-bionic-amd64.tar <username>@<ip_address>:/home
-
On the node, change to the directory where the installation package is and extract the installation files:
tar vxf <tarfile name>
-
To install RS, run:
Note -- The RS files are installed in the default file locations. You can also specify other directories for these files during the installation.
- RS is installed and run under the redislabs user and redislabs group. You can also specify a different user during the installation.
- You must either be logged in as the root user or use sudo to run the install process.
sudo ./install.sh
-
Answer the installation questions when shown to complete the installation process, and run
rlcheck
to verify the installation.After RS is successfully installed, the IP address of the RS web UI is shown:
Summary: ------- ALL TESTS PASSED. 2017-04-24 10:54:15 [!] Please logout and login again to make sure all environment changes are applied. 2017-04-24 10:54:15 [!] Point your browser at the following URL to continue: 2017-04-24 10:54:15 [!] https://<your_ip_here>:8443
RS is now installed on the node. Repeat this process for each node in the cluster.
-
For geo-distributed Active-Active replication, create an Active-Active database.
Set up the new cluster
A Redis Enterprise Software (RS) cluster typically consists of several nodes. For production deployments, Redis Labs recommends an uneven number of nodes, with a minimum of three.
To set up a new cluster, you must first install the Redis Enterprise Software package and then set up the cluster as described below. After the cluster is created you can add multiple nodes to the cluster.
To create a cluster:
-
In a browser, navigate to
https://<name or IP address of the machine with RS installed>:8443
. For example, if you installed RS on a machine with IP address 10.0.1.34, then navigate to https://10.0.1.34:8443.Note -- The RS management UI uses a self-signed SSL/TLS encryption.
- If the machine has both an internal IP address and an external IP address, use the external IP address to access the setup UI.
-
Click Setup.
-
In the Node Configuration page that appears:
-
Enter a path for Persistent storage, or leave the default path.
-
Enter a path for Ephemeral storage, or leave the default path.
-
If you want to enable Redis on Flash, select the Enable flash storage support checkbox and enter the path to the Flash storage.
-
If your machine is configured to have multiple IP addresses, the section IP Addresses Usage is shown. Use the IP Addresses Usage section to assign a single IPv4 type address for internal traffic and multiple IPv4/IPv6 type addresses for external traffic.
-
In Cluster configuration, select Create new cluster.
-
In Cluster name (FQDN), enter a unique name for the cluster. Also, make sure that you look at the [instructions for setting up DNS](/rs/installing-upgrading/configuring/cluster-dns/ to make sure your cluster is reachable by name.
-
Choose whether to Enable private & public endpoints support.
-
Choose whether to Enable rack-zone awareness. Enabling rack-zone awareness requires setting the Rack-zone ID for the node.
-
Click Next.
-
-
If you purchased a cluster key, use the Cluster authentication page to enter the key. Otherwise, you get the trial license by default. Read the product Terms and Conditions and click Next.
-
Click OK to confirm that you are aware of the replacement of the HTTPS SSL/TLS certificate on the node, and proceed through the browser warning.
-
In the Set admin credentials fields, enter the credentials of the cluster administrator.
-
Click Next.
After a short wait, your cluster is created and you can log in to the RS admin console.
Add more nodes to the cluster
When you install Redis Enterprise Software (RS) on the first node of a cluster, you create the new cluster. After you install the first node, you can add more nodes to the cluster.
Before you add a node to the cluster:
-
The clocks on all nodes must always be synchronized.
If the clock in the node you are trying to join to the cluster is not synchronized with the nodes already in the cluster, the action fails and an error message is shown indicating that you must synchronize the clocks first.
-
You must update the DNS records each time a node is added or replaced.
-
We recommend that you add nodes one after the other rather than in parallel to avoid errors that occur because the connection to the other nodes in the cluster cannot be verified.
To add a node in RS:
-
Install the RS installation package on a clean installation of a supported operating system.
-
To connect to the RS management UI of the new RS installation, go to: <https://URL or IP address:8443>
For example, if you installed RS on a machine with IP address 10.0.1.34, go to
https://10.0.1.34:8443
.Tip -The RS management UI uses SSL encryption with a default certificate. You can also replace the TLS certificate with a custom certificate. -
To start configuring RS, click Setup.
-
Configure the RS network and storage settings:
- You can enter a path for Persistent storage, or leave the default path.
- You can enter a path for Ephemeral storage, or leave the default path.
- If you want to enable Redis on Flash, select Enable flash storage support and enter the path to the Flash storage to use as RAM extension.
- If your machine has multiple IP addresses, in IP Addresses Usage assign a single IPv4 type address for internal traffic and multiple IPv4/IPv6 type addresses for external traffic.
-
Join the new RS node to the cluster:
-
In Cluster configuration, select Join cluster.
-
Enter the internal IP address or DNS name of a node that is a cluster member.
If the node only has one IP address, enter that IP address.
-
Enter the credentials of the cluster administrator.
The cluster administrator is the user account that you create when you configure the first node in the cluster.
-
-
Click Next.
If the cluster is configured to support rack-zone awareness, you are redirected to a page in which you must set the Rack-zone ID for the new node.
The node is added to the cluster. You can see it in the list of nodes in the cluster.
If you see an error when you add the node, try adding the node again.
Next steps
Now that your cluster is set up with nodes, you can:
- Add users to the cluster with specific permissions.
- Create databases to use with your applications.