- 23 Jul 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Scheduler Setup (CI-Notification Tomcat Server Setup)
- Updated on 23 Jul 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Overview
The outlined process ensures the successful installation and configuration of the Scheduler server on designated servers.
Installation of Scheduler
Pre-requisites:
Server with a sudo non-root user.
Ensure that JRE or JDK is installed on your system.
Ensure that the version of Java you have installed is compatible with the version of Apache Tomcat you intend to install for the Schedular and Recon service.
Ensure that the ports required by Apache Tomcat (e.g., default HTTP port 8080) are available and not used by other applications.
If you have a firewall enabled, configure it to allow traffic on the ports used by Tomcat.
Ensure connectivity between App servers (Tomcat) and Scheduler server.
Information:
CI-Notification service must be setup using separate tomcat service, where CIDSaas must be running, you can setup this with standalone instance having CIDSaas and CidNotification or you can deploy CidNotification service along with CI-Server one of the nodes.
Steps:
Copy the archive file of the apache-tomcat-9.0.73 version to /opt/cidserver/tomcat/ directory of the CI server, and rename the apache-tomcat-9.0.73 to schedular-tomcat-9.0.73.
Extract it to directory /opt/cidserver/tomcat/schedular-tomcat-9.0.73/.
Note:
The below step can be skipped if already done during Tomcat installation.
Create a file setenv.sh file in /opt/cidserver/tomcat/ schedular-tomcat-9.0.73/bin and add the following lines:
“export JRE_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08- 1.el7_9.x86_64/jre"
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08- 1.el7_9.x86_64/jre" export CATALINA_HOME="/opt/cidserver/tomcat/schedular-tomcat-9.0.73"
Note:
Please execute the JRE commands wrt the path of JRE folder location installed in the respective servers.
Scheduler Configuration
Create a service file “schedular.service” in /etc/systemd/system/ directory for tomcat and paste the below information in it.
Use the following command to verify the java path:
sudo alternatives --config java
[Unit]
Description=Apache Tomcat Web Application Container After=network.target
[Service] Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk- 1.8.0.282.b08-1.el7_9.x86_64/jre
Environment=CATALINA_PID=/opt/cidserver/tomcat/schedular- tomcat-9.0.73/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/cidserver/tomcat/schedular- tomcat-9.0.73
Environment=CATALINA_BASE=/opt/cidserver/tomcat/schedular- tomcat-9.0.73
Environment='CATALINA_OPTS=-Xms512M -Xmx2048M -server - XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true - Djava.security.egd=file:/dev/./urandom'
Environment="JAVA_OPTS=- Djava.security.egd=file:///dev/urandom"
ExecStart=/opt/cidserver/tomcat/schedular-tomcat- 9.0.73/bin/startup.sh
ExecStop=/opt/cidserver/tomcat/schedular-tomcat- 9.0.73/bin/shutdown.sh
User=root Group=root UMask=0007 RestartSec=10 Restart=always [Install]
WantedBy=multi-user.target
Ensure to change the JAVA path, tomcat path accordingly to your environment. Also, set MAX MIN RAM usage for tomcat service accordingly (similar to tomcat configuration).
Save and close the file.
Create a document in ROOT directory, /opt/cidserver/tomcat/schedular-tomcat- 9.0.73/webapps/.
Create a Log directory, /opt/cidserver/tomcat/schedular-tomcat-9.0.73/logs/.
Change the server shutdown port from -1 to 9005 in server.xml file of tomcat:
<Server port="9005" shutdown="SHUTDOWN">
Uncomment the Connector port in server.xml file of tomcat and alter the port:
<Connector port="9009" protocol="AJP/1.3" redirectPort="8443" />
Change the tomcat default port:
<Connector port="9080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="9443" />
Session timeout in web.xml is configured to 30 sec:
<session-config>
<session-timeout>30</session-timeout>
</session-config>
Cidnotification.war files to be deployed in webapps directory of tomcat. Update the following properties files from the said directory.
/opt/cidserver/tomcat/schedular-tomcat- 9.0.73/webapps/cidnotification/WEB-INF/classes/
application.properties
saas.properties
log4j.properties
Saas.properties
Application.properties: For the application properties file, change the url, username and password with the encrypted ones.
Remove the following para from context.xml file from the scheduler- tomcat, if present:
<Resource name="jdbc/CIDAUDIT" auth="Container" type="javax.sql.DataSource" maxActive="10" maxIdle="5" maxWait="10000"
username="pGoB42WJvna6bKr+Q8cfHw==" password="p/LaUUUvrnrEZCtyX0FdDg==" driverClassName="com.mysql.jdbc.Driver" url="WX54Vwv3MLSRErih1GzK7DNpxs6FOvXpGwjkYQxYK3akAM6NeD3uTRwTf waQ9azh"/>
Crossrecon.war Configuration
For direct reconciliation:
Get the Crossrecon war file.
Deploy the war filein the same directory where the CidSaasNotification for Scheduler is deployed.
Ensure the name of the warfile is Crossrecon.war.
Restart the schedular services.
Verify that a new directory named Crossrecon is created.
Go to the following location and verify the .properties files:
/Crossrecon/WEB-INF/classes
Open the application.properties file and edit the following details:
spring.datasource.url=jdbc:mysql://<MySQL_IP:Port>/<CIDSaas_CIDB_Name>?characterEncoding=UTF-8
spring.datasource.username=<mysql_username>
spring.datasource.password=<mysql_password_encrypted>
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
##spring.datasource.driver-class-name=com.mysql.jdbc.Driver (Comment this)
spring.jpa.hibernate.naming.physical strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Note:
If you’re using Crossrecon to fetch account details from target application, make sure to change RabbitMQ status to ‘false’ in target application’s connector’s recontype.properties file.
For RabbitMQ reconciliation:
Open the rabbitmq.properties file and edit the following details:
host=<RabbitMQ_IP>
port=5672 (RabbitMQ Listener port)
username=<rabbitMQ_Username>
password=<RabbitMQ_Password_Encrypted>
QUEUE_NAME=<Queue_Name_For_Reconcilliation>
url=http://<RabbitMQ_IP:Port>/<CIDSaas_Application_Name>/admin/provwinup/RabbitMQrecon
Access mysql and execute the following commands:
select the CIDSaas DB;
select * from fluidiam_rabbitmq_details;
Make the following changes to the table:
Ensure to use the correct IP, username, port, encrypted_password, and queue_tenant(may vary from user to user).
Note:
The queue_name provided must be same as the queues created in RabbitMQ.
Note:
If you’re using Crossrecon to fetch account details from target application, make sure to change RabbitMQ status to ‘true’ in target application’s connector’s recontype.properties file.
Outcome
The document provides detailed instructions for configuring Apache Tomcat, setting up systemd services, deploying WAR files, and configuring properties for both direct and RabbitMQ reconciliation in the Crossrecon.war.