Server Configuration: The cluster consists of three nodes, installed on server1.
Hardware Requirements:
Operating System: Ubuntu-22.04
IP: 172.21.0.46
Step-1: Create node-1 using below command.
sudo virt-install \
--name eev-in-demo1a-node01 \
--os-variant ubuntu22.04 \
--vcpus 2 \
--memory 8192 \
--location /data1/os-iso/ubuntu-22.04.4-live-server-amd64.iso,kernel=casper/vmlinuz,initrd=casper/initrd \
--network bridge=virbr20,model=virtio,mac=00a:01:e1:20:02:01 \
--network network=virho10,model=virtio,mac=0a:01:e1:10:02:01 \
--disk size=128,pool=adm-images \
--uuid 00000000-0000-0000-0000-0a01e1200201 \
--graphics none \
--extra-args 'console=ttyS0' \
--debug
Step-2: Disk partition for the node.
Step-3: User Setup
<1!Devxxxx>
Note:
visudo
to add the following line at the end of the file:
devopsadmin ALL=(ALL) NOPASSWD: ALL
Execute the following command to clone the repository containing the automation scripts:
git clone https://github.com/DevOps-Model/DevOps-Automation-Scripts.git
Change directory to the cloned repository:
cd DevOps-Automation-Scripts
eevConfigurationFiles
FolderInside the repository, navigate to the eevConfigurationFiles
folder:
cd eevConfigurationFiles
Make the necessary changes to the configuration files according to the project requirements. The files to be updated are:
Edit the install.conf
file and set the following values:
hostname = eev-in-demo1a-node01
tomcatServiceFileName = tomcat
tomcatListenPort = 8182
tomcatServiceFilePath = /etc/systemd/system/tomcat.service
tomcatBaseInstallationPath = /opt/eev/tomcat/
Command to edit the file:
vi install.conf
Edit the configuration.conf
file and set the following values:
mysqlNodeName=eev-in-demo1a-node01
wsrepClusterAddress=eev-in-demo1a-pxc01
wsrepClusterName=eev-in-demo1a-pxc01
wsrepNodeName=eev-in-demo1a-pxc01
redpandaHostName=eev-in-demo1a-ms-node01
scyllaHostName=eev-in-demo1a-sdc-node01
scyllaClusterName=eev-in-demo1a-ds-sdc
scyllaListenAddress=eev-in-demo1a-node01
scyllaClusterClusterRackdc=eev-in-demo1a-ds-sdc-rack01
nodeHostname=eev-in-demo1a-node01
scyllaDc=eev-in-demo1a-ds-sdc
scyllaRack=eev-in-demo1a-ds-sdc-rack01
Command to edit the file:
vi configuration.conf
Edit the databases.conf
file and set the following values:
mysqlHostname=eev-in-demo1a-pxc-node01
mysqlDb=eldb_demo
qrtzDb=qrtz_eldb_demo
mysqlUserFile=/tmp/demo-resources-conf/resources/db/schema/demo/el_demo_user.sql
mysqlSchema=/tmp/demo-resources-conf/resources/db/schema/common/el_schema.sql
mysqlBaseData=/tmp/demo-resources-conf/resources/db/schema/common/el_base_data.sql
qrtzDemoUser=/tmp/demo-resources-conf/resources/db/schema/demo/qrtz_demo_user.sql
qrtzSchemas=/tmp/demo-resources-conf/resources/db/schema/common/qrtz_schema.sql
scyllaHostname=eev-in-demo1a-node01
scyllaDb=el_blob_demo
scyllaHostIp=eev-in-demo1a-sdc-node01
cqlPort=9042
cqlUserFile=/tmp/demo-resources-conf/resources/ds/schema/demo/el_demo_user.cql
cqlSchemaFile=/tmp/demo-resources-conf/resources/ds/schema/common/el_schema.cql
Command to edit the file:
vi databases.conf
After making the necessary changes, go back to the base folder:
cd ..
Execute the TechStackInstallation.py
script to install the required tech stack:
python3 TechStackInstallation.py eev java tomcat git scylla redpanda mysql
After installing the tech stack, configure the services using the following command:
python3 ConfigureScript.py eev configuration
Once the services are configured, run the following command to initialize the base data:
python3 ConfigureScript.py eev
Finally, the tech stack is completely installed, configured, and initialized with the base data.
After the tech stack installation there is a small configuration change in the tomcat service i.e add CLASS_PATH of conf folder in catalina.sh file. we need add “$CATALINA_HOME/conf” in the below mentioned path
# Add on extra jar files to CLASSPATH
if [ ! -z "$CLASSPATH" ] ; then
CLASSPATH="$CLASSPATH":
fi
CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:$CATALINA_HOME/log4j2/lib/*:$CATALINA_HOME/log4j2/conf:$CATALINA_HOME/conf
Hardening
folder inside the repository:cd DevOps-Automation-Scripts/Hardening
bash ubuntu.sh
bash checkScore.sh
/opt/maven/bin/mvn install package -DskipTests=true -Dtestng.dtd.http=true -Dsonar.skip=true -Dsnyk.skip=true
Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/data/jenkins/java-tmp-dir
/opt/maven/bin/mvn clean install
Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/data/jenkins/java-tmp-dir
/tmp/demo-resources-conf
/tmp/demo-tomcat-conf/demo