Teamwork Cloud uses Apache Cassandra, an open-source NoSQL distributed database. Before installing Teamwork Cloud, please follow the steps below to install Apache Cassandra.
To install Apache Cassandra
Install Apache Cassandra by executing the install_cassandra<version_number>_<os_version>.sh installation script.
Code Block
title
Example
sudo ./install_cassandra4x_centos_rhel_7.sh
Info
The script downloads and installs the necessary packages, Cassandra, and the Cassandra tools from the Apache Software Foundation repository, and creates the necessary firewall rules to allow proper operation both for a single node or a cluster installation. OpenJDK 8 will be installed with other packages, if you cannot use OpenJDK 8, you can install Oracle Java 8u202 instead. For instructions on how to do that, see Installing Oracle Java (optional). You can switch your setup to use OpenJDK 11 with Cassandra 4 alsoCassandra. Additionally, the installation script will install OpenJDK 11 and set the system environment to use the newer Java 11.
Start Apache Cassandra by executing the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
sudo systemctl start cassandra
Check if Apache Cassandra is running by executing the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
nodetool -h ::FFFF:127.0.0.1 status
Note
You can also use the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
nodetool -Dcom.sun.jndi.rmiURLParsing=legacy status
If Apache Cassandra is running, you should receive the output displayed below. If the service is fully operational, the first 2 characters of the last line are "UN", indicating that the node status is Up, and its state is Normal.
Wait for a few minutes until Cassandra starts for the first time before checking if it is running. If Cassandra has not started yet, you will get the error: "No nodes present in the cluster. Has this node finished starting up?" This means that you need to give Cassandra more time to start.
If Apache Cassandra is not running or if you used installation options other than the one described in this chapter, optionally configure Apache Cassandra.
Configuring Apache Cassandra (optional)
If you used other installation options and not the provided script or if Apache Cassandra does not start, configure it as described below.
Note
Before starting, note that you do not need to configure Apache Cassandra if you installed it using the installation script we provided (install_cassandra<version_number>_<os_version>.sh). It should start without any additional configuration.
To configure Apache Cassandra
Edit the cassandra.yaml file by executing the following command:
seeds - a comma-delimited list containing all of the seeds in the Cassandra cluster. Since our cluster consists of a single node, it contains only one entry - our IP address.
listen address - the IP address that Cassandra uses to listen for connections.
broadcast_rcp_address - the IP address used to broadcast to other Cassandra nodes in the cluster. This parameter may be commented. In such case, remove "#" and make sure there are no leading spaces.
rcp_address - when set to to 0.0.0.0, Cassandra listens to rpc requests on all interfaces.
Find the following parameters that control thresholds to ensure that the data being sent is processed properly, and change them as shown below:
Start Apache Cassandra by executing the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
sudo systemctl start cassandra
Check if Apache Cassandra is running by executing the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
nodetool status
If Apache Cassandra is running, you should receive the output displayed below. If the service is fully operational, the first 2 characters of the last line are "UN", indicating that the node status is Up, and its state is Normal.
If you did not use the installation script or want to increase the RAM usage by Cassandra, make the following changes. Otherwise, these configuration changes are set automatically by the Cassandra installation script.
Tip
Configuration files are located in /etc/cassandra/conf/.
By default, the maximum RAM usage for Cassandra is 8GB. To change the amount of RAM used by Cassandra, uncomment -Xms4G (min) and -Xmx4G (max) in the jvm-server.options file and specify their values.
In the jvm11-server.options and jvm8-server.options files, comment all lines from"### CMS Settings" to "### G1 Settings".
In the jvm11-server.options and jvm8-server.options files, uncomment the following lines:
Code Block
#-XX:+UseG1GC
#-XX:MaxGCPauseMillis=500
In the jvm11-server.options and jvm8-server.options files, uncomment the following lines and set the values to the physical CPU core count (the values of both parameters should be the same):
Code Block
#-XX:ParallelGCThreads=16
#-XX:ConcGCThreads=16
In the jvm8-server.options file, comment all lines from "### GC logging options" to the end of the file.
Synchronize CPU clocks on all Cassandra cluster nodes. Otherwise, you may encounter issues when creating an empty Cassandra cluster.
When using cqlsh, use Python 3.6.0 or a later version. Python 2.7 series is no longer supported.
In the logback.xml file, comment the "<appender-ref ref="ASYNCDEBUGLOG" />" line. This will increase Cassandra's performance by disabling the debug log.
Tuning Linux to improve Apache Cassandra performance
Note
If you install Teamwork Cloud using the install_twc<os_version>.sh script, Cassandra performance is tuned automatically. However, if you plan to use other installation options or if you need to set other parameters after running the script, you can do it manually as described in this section.
To improve Apache Cassandra performance
Open the sysctl.conf file by executing the following command:
Code Block
language
bash
theme
DJango
linenumbers
true
sudo nano /etc/sysctl.conf
To configure the TCP settings, add the following tuning parameters to the file: