Application Stack

OS Details

CentOS version 7.latest

Application Stack

Application Name Reference Links
HA Proxy Latest Version
Open JDK Latest Version
Tomcat Latest Version
Percona XtraDB Latest Version
ScyllaDB Latest Version
Redpanda Latest Version

HA Proxy

Please check the latest version at HA Proxy Website

Find the following instructions to install the HA Proxy

sudo groupadd haproxy
sudo useradd -r haproxy -g haproxy
yum -y install wget tar gcc make binutils pcre-devel pcre2-devel.x86_64 openssl-devel zlib-devel selinux-policy-devel systemd-devel readline- devel systemd-devel lua lua-devel
mkdir -p /etc/haproxy/errors
cd /opt
wget http://www.haproxy.org/download/2.1/src/haproxy-2.1.3.tar.gz 
tar -xvzf haproxy-2.1.3.tar.gz
cd haproxy-2.1.3
make -j5 USE_SYSTEMD=1 USE_REGPARM=1 USE_PCRE_JIT=1 TARGET=generic USE_THREAD=1 USE_LINUX_TPROXY=1 USE_TFO=1 CPU=generic USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
make install
cd contrib/systemd
make
cp haproxy.service /lib/systemd/system/haproxy.service
systemctl daemon-reload
useradd haproxy
systemctl enable haproxy.service
cd ../../
cp examples/errorfiles/* /etc/haproxy/errors/
mkdir /etc/ssl/xip.io

Create or Edit the file

vi /etc/haproxy/haproxy.cfg
global
  maxconn 1028
  daemon
  user haproxy
  group haproxy
defaults
  timeout connect 5000ms
  timeout client 50000ms
  timeout server 50000ms
frontend https_443_frontend
bind *:443 ssl crt /etc/ssl/xip.io/xip.io.pem
mode http
option forwardfor
option http-server-close
option httpclose
default_backend http_8181_backend
backend http_8181_backend 
  mode http
  balance roundrobin
  timeout connect 5s
  timeout server 30s
  server app01 127.0.0.1:8181

Create a file /etc/ssl/xip.io/xip.io.pem

vi /etc/ssl/xip.io/xip.io.pem
-----BEGIN CERTIFICATE-----
MIIGbjCCBVagAwIBAgISBPSZHB/3ajlPPY8AGOYFRRu/MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0M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XmXy/wRNTks8
4gow/de3DTaJQImJqmNzCa7rM7jBT6i6LIpmBjfJa/kZQ4SJ1B2Dl9A0vmp3KcSD
rPRrVVuOKLzKTBjeFhV67PCraApyf6ZK4bo80ymtEK7KtPezLJ5dIdPEkFqlYJQY
KXLn3OhhLTnuHQDGVGyMA++1AbpopycRAoIBAQCcW8EX5XH7FvbGY29xzkAaJbo9
y3d1ZFxA6/3SEQ0+Jx1NxbsH4JOkpgEifSYIY86KyIRiUkHM983st1Py8ysMyA0A
FjVEiB+WdTBAz0CMVrCaKoMXHRh5/2reCp7M64RgSxmCTFYF6rGB6VbRHhsKzQkn
4mgh/jiXug/Nn5fxA58/L0eGS6vKR0lRoaXXHqeM9qMUtwbl1fMiEKLoslot9Pkc
eeQ3wsvNBFC+WbhVgrDFXwquyFa9QGFgevBm0uXhxXxcqdV3PcCDP1xaPohca0hF
s8OTYevyv+EVrIgI2qBhysuHhrDKJe1+JjBEnQTT9QqK7vsLbVv+FB7WA3os
-----END RSA PRIVATE KEY-----
systemctl start haproxy.service
netstat -anpt | grep LIST

Install OpenJDK11

yum -y install java-11-openjdk java-11-openjdk-devel
cat > /etc/profile.d/java11.sh <<EOF
export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))
export PATH=\$PATH:\$JAVA_HOME/bin
EOF
source /etc/profile.d/java11.sh
java --version

Install Tomcat

sudo groupadd tomcat
sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat
sudo mkdir /opt/tomcat
cd /opt
wget https://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.44/bin/apache-tomcat-9.0.44.tar.gz
tar xvf apache-tomcat-*tar.gz -C /opt/tomcat --strip-components=1
cd /opt/tomcat
chgrp -R tomcat /opt/tomcat
chmod -R g+r conf
chmod g+x conf
chown -R tomcat webapps/ work/ temp/ logs/

Please modify the /opt/tomcat/bin/catalina.sh Replace following line CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar: with CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:$CATALINA_HOME/log4j2/lib/*:$CATALINA_HOME/log4j2/conf

create a file at /etc/systemd/system/tomcat.service

vi /etc/systemd/system/tomcat.service
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container 
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre 
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:////dev/urandom'

Environment=CATALINA_BASE=/opt/tomcat 
Environment=CATALINA_HOME=/opt/tomcat 
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid 
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'

ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/bin/kill -15 $MAINPID
ExecStop=/opt/tomcat/bin/shutdown.sh

UMask=0007
RestartSec=10
Restart=always

[Install] 
WantedBy=multi-user.target
systemctl daemon-reload 
systemctl start tomcat 
systemctl status tomcat 
systemctl enable tomcat

Percona XtraDB Cluster

Please check the latest version at Percona Website

Open the TCPv4ports though the firewall : 3306, 4444, 4567, 4568

firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=4444/tcp --permanent
firewall-cmd --zone=public --add-port=4567/tcp --permanent
firewall-cmd --zone=public --add-port=4568/tcp --permanent

systemctl restart firewalld
firewall-cmd --list-all

Install YUM Reporsitories

sudo yum -y install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
sudo percona-release enable pxc-80
sudo yum -y install percona-xtradb-cluster
sudo service mysql start
sudo grep 'temporary password' /var/log/mysqld.log

Capture the password from the above command output and change the password with the following commands Output of the command similar to the following

2021-03-13T07:53:10.901419Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Rp=B3zrY?d.F

mysql -uroot -p <Enter the password cpature from the above command>
ALTER USER 'root'@'localhost' IDENTIFIED BY '1!QMysqlRoot';
FLUSH PRIVILEGES;
exit

Configuring Nodes for Write-Set Replication

Please check the latest version at Percona Website

After installing Percona XtraDB Cluster on each node, you need to configure the cluster. In this section, we will demonstrate how to configure a three node cluster:

Node Host IP
node1 gsts-sdc-01 192.168.165.216
node2 gsts-sdc-02 192.168.165.210
node3 gsts-sdc-03 192.168.165.222
  • Stop the Percona XtraDB Cluster server. After the installation completes the server is not started. You need this step if you have started the server manually.
sudo service mysql stop
  • Edit the configuration file of the first node to provide the cluster settings. Edit /etc/my.cnf
wsrep_provider=/usr/lib64/galera4/libgalera_smm.so
wsrep_cluster_name=gsts_erdb_cluster
wsrep_cluster_address=gcomm://192.168.165.216,192.168.165.210,192.168.165.222
  • Configure node1, add the following to the above file
wsrep_node_name=gsts_erdb_node01
wsrep_node_address=192.168.165.216
pxc_strict_mode=ENFORCING
  • Configure node2, add the following to the above file
wsrep_node_name=gsts_erdb_node02
wsrep_node_address=192.168.165.210
pxc_strict_mode=ENFORCING
  • Configure node3, add the following to the above file
wsrep_node_name=gsts_erdb_node03
wsrep_node_address=192.168.165.222
pxc_strict_mode=ENFORCING

If you must disable pxc-encrypt-cluster-traffic, you need to stop the cluster and update [mysqld] section of the configuration file: pxc-encrypt-cluster-traffic=OFF of each node of /etc/my.cnf. Then, restart the cluster.

Bootstrapping the First Node

After you configure all PXC nodes, initialize the cluster by bootstrapping the first node. The initial node must contain all the data that you want to be replicated to other nodes. Bootstrapping implies starting the first node without any known cluster addresses: if the wsrep_cluster_address variable is empty, Percona XtraDB Cluster assumes that this is the first node and initializes the cluster. Instead of changing the configuration, start the first node using the following command:

systemctl start mysql@bootstrap.service

When you start the node using the previous command, it runs in bootstrap mode with wsrep_cluster_address=gcomm://. This tells the node to initialize the cluster with wsrep_cluster_conf_id set to 1. After you add other nodes to the cluster, you can then restart this node as normal, and it will use standard configuration again. To make sure that the cluster has been initialized, run the following & validate the parameters.

mysql@pxc1> show status like 'wsrep%';
Variable_name Value
wsrep_local_state_uuid c2883338-834d-11e2-0800-03c9c68e41ec
wsrep_local_state 4
wsrep_local_state_comment Synced
wsrep_cluster_size 1
wsrep_cluster_status Primary
wsrep_connected ON
wsrep_ready ON

The previous output shows that the cluster size is 1 node, it is the primary component, the node is in the Synced state, it is fully connected and ready for write-set replication.

Adding Nodes to Cluster

New nodes that are properly configured are provisioned automatically. When you start a node with the address of at least one other running node in the wsrep_cluster_address variable, this node automatically joins and synchronizes with the cluster.

Any existing data and configuration will be overwritten to match the data and configuration of the DONOR node. Do not join several nodes at the same time to avoid overhead due to large amounts of traffic when a new node joins. Percona XtraDB Cluster uses Percona XtraBackup for State Snapshot Transfer and the wsrep_sst_method variable is always set to xtrabackup-v2

Starting the Second Node

Start the second node using the following command:

systemctl start mysql

After the server starts, it receives SST automatically.

To check the status of the second node, run the following query in the MySQL CLi:

show status like 'wsrep%';
Variable_name Value
wsrep_local_state_uuid a08247c1-5807-11ea-b285-e3a50c8efb41
wsrep_local_state 4
wsrep_local_state_comment Synced
wsrep_cluster_size 2
wsrep_cluster_status Primary
wsrep_connected ON
wsrep_provider_capabilities :MULTI_MASTER:CERTIFICATION: …
wsrep_provider_name Galera
wsrep_provider_vendor Codership Oy info@codership.com
wsrep_provider_version 4.3(r752664d)
wsrep_ready ON

The output of SHOW STATUS shows that the new node has been successfully added to the cluster. The cluster size is now 2 nodes, it is the primary component, and it is fully connected and ready to receive write-set replication.

If the state of the second node is Synced as in the previous example, then the node received full SST is synchronized with the cluster, and you can proceed to add the next node.

Starting the Third Node

Start the second node using the following command:

systemctl start mysql

After the server starts, it receives SST automatically.

To check the status of the second node, run the following query in the MySQL CLi:

show status like 'wsrep%';
Variable_name Value
wsrep_local_state_uuid a08247c1-5807-11ea-b285-e3a50c8efb41
wsrep_local_state 4
wsrep_local_state_comment Synced
wsrep_cluster_size 2
wsrep_cluster_status Primary
wsrep_connected ON
wsrep_provider_capabilities :MULTI_MASTER:CERTIFICATION: …
wsrep_provider_name Galera
wsrep_provider_vendor Codership Oy info@codership.com
wsrep_provider_version 4.3(r752664d)
wsrep_ready ON

The output of SHOW STATUS shows that the new node has been successfully added to the cluster. The cluster size is now 2 nodes, it is the primary component, and it is fully connected and ready to receive write-set replication.

If the state of the second node is Synced as in the previous example, then the node received full SST is synchronized with the cluster, and you can proceed to add the next node.

Restarting the First node as Clusternode

Now, we need to restart the First node as cluster node using the following commands

systemctl stop mysql@bootstrap.service
systemctl start mysql

Redpanda Installation

Use the latest installer script to install the Redpanda Website

curl -1sLf 'https://packages.vectorized.io/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.rpm.sh' | sudo -E bash && sudo yum install redpanda -y

Then Enable Redpanda

systemctl enable redpanda

Configure and Start the Root Node

Now that the software is installed we need to configure it. The first step is to setup the root node. The root node will start as a standalone node, and every other one will join it, forming a cluster along the way.

For the root node we’ll choose 0 as its ID. –self tells the node which interface address to bind to. Usually you want that to be its private IP.

sudo rpk config bootstrap --id 0 --self 192.168.165.216 && sudo systemctl start redpanda-tuner redpanda

Configure and Start the Rest of the Nodes

For every other node, we just have to choose a unique integer id for it and let it know where to reach the root node.

sudo rpk config bootstrap --id 2 --self 192.168.165.210 --ips 192.168.165.210,192.168.165.216,192.168.165.222 &&  sudo systemctl start redpanda-tuner redpanda
sudo rpk config bootstrap --id 3 --self 192.168.165.222 --ips 192.168.165.210,192.168.165.216,192.168.165.222 &&  sudo systemctl start redpanda-tuner redpanda

Verify Installation

Check the following command verify the cluster connectivity

rpk cluster info

The the output of the above should as follows [root@gsts-sdc-03 ~]# rpk cluster info Redpanda Cluster Info
0 (192.168.165.216:9092) (No partitions)
2 (192.168.165.210:9092) (No partitions)
3 (192.168.165.222:9092) (No partitions)

ScyllaDB Installation

Use the latest installer script to install the Redpanda Website

Add the following package repo

sudo curl -o /etc/yum.repos.d/scylla.repo -L http://repositories.scylladb.com/scylla/repo/57ddf75b-c51c-4904-a8d2-8e19a7cc1d02/centos/scylladb-4.0.repo

Install the ScyllaDB version

sudo yum install scylla

Enable Developer mode

scylla_dev_mode_setup --developer-mode 1

Configure Scyalladb

Parameter Value Descr
cluster_name gspod-ts Name of the cluster, all the nodes in the cluster must have the same name
seeds ip1,ip2,… Seed nodes are used during startup to bootstrap the gossip process and join the cluster
listen_address IP of the Host IP address that Scylla uses to connect to other Scylla nodes in the cluster
rpc_address IP of the Host IP address of the interface for client connections (Thrift, CQL)
dc gsts_pdc Name of the datacenter
rack gsts_pdc_rack01 Name of the Rack

valodate the Cluster installation

Run the following command

nodetool status

Quick links