ZE-AuditProcessor Deployment
Prerequisite
Install Java 17.
Ensure your Zephyr and Rabbit MQ application is set up and running. See, RabbitMQ Deployment
Launch Zephyr with your respective host/domain. Ex: https://test.yourzephyr.com/
Launch RabbitMq with the host and configured port. Ex: http://localhost:15672]
Launch RabbitMq Management in the browser with the host and port (Ex http://localhost:15672/).
AuditProcessor Deployment (Jar)
Create a directory under folder opt “zephyrservice”
mkdir zephyrservice
Download the ze-audit-processor.jar and copy it under
zephyrservice
.Create a ze-audit-processor config file Named "
zeAuditProcessor.properties
"under folder
zephyrservice
vi zeAuditProcessor.properties
Add the below line in the file
zeAuditProcessor.properties
server.port=8084 zephyr.queue.name=ze_audit_queue zephyr.queue.exchange=ze_audit_exchange zephyr.queue.routing.key=ze_audit_routing_key # hostname should point to continer name if in case you are running webhook on docker spring.rabbitmq.host=<rabbitmq_hostname> spring.rabbitmq.port=<rabbitmq_port> spring.rabbitmq.username=<rabbitmq_username> spring.rabbitmq.password=<rabbitmq_password> spring.devtools.restart.enabled=false
Append the below database-specific properties based on the Zephyr database you are using.
MsSQL
# Data source configurations applied for mssql --- spring.config.activate.on-profile=mssql spring.datasource.url=jdbc:sqlserver://<database_ipaddress>:<database_port>;database=itcc;encrypt=true;trustServerCertificate=true spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect --- spring.profiles.active=mssql
MySQL
# Data source configurations applied for mysql --- spring.config.activate.on-profile=mysql spring.datasource.url=jdbc:mysql://<database_ipaddress>:<database_port>/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect --- spring.profiles.active=mysql
Oracle
# Data source configurations applied for oracle --- spring.config.activate.on-profile=oracle spring.datasource.url=jdbc:oracle:thin:@<hostname>:<port>:orcl spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect --- spring.profiles.active=oracle # For oauth2 spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Your sample zeAuditProcessor.properties should look like below:
MySQL
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false # Data source configurations applied for mysql --- spring.config.activate.on-profile=mysql spring.datasource.username=root spring.datasource.password=root spring.datasource.url=jdbc:mysql://localhost:3306/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect --- spring.profiles.active=mysql
MSSQL
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties spring.jpa.properties.hibernate.dialect=com.thed.orm.Oracle10gCustomDialect
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #Data source configurations applied for mssql --- spring.config.activate.on-profile=mssql spring.datasource.username=sa spring.datasource.password=root spring.datasource.url=jdbc:sqlserver://zops-50.c4n7zxvdu2ao.ap-southeast-1.rds.amazonaws.com:1433;database=itcc;encrypt=true;trustServerCertificate=true spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect --- spring.profiles.active=mssql
Oracle
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect # For oauth2 spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #Data source configurations applied for oracle --- spring.config.activate.on-profile=oracle spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast-1.rds.amazonaws.com:1521:orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=com.thed.orm.Oracle10gCustomDialect --- spring.profiles.active=oracle
Start the AuditProcessor with the following command:
sudo nohup java -jar -Dspring.profiles.active=<db> -DzeAuditConfigPath="<config file path till root folder>" ze-audit-processor.jar &
Example command:
sudo nohup java -jar -Dspring.profiles.active=mysql -DzeAuditConfigPath="/opt/zephyrservice" ze-audit-processor.jar &
AuditProcessor started snapshot for reference: -
Notice
The Logs folder will be created where your jars are deployed. Separate log files will be created for each jar.
---
at the start and end of the DB configuration is necessary. Follow the same mentioned.
AuditProcessor Deployment (Docker)
Install Docker in the System
Create a directory under folder opt “zephyrservice”
mkdir zephyrservice
Download the Docker compose and copy it under
zephyrservice
#dockercompose version: '3.5' services: #AuditProcessor ze-audit-processor: image: smartbear/zeauditprocessor:ze-audit-processor container_name: ze-audit-processor ports: - "8084:8084" environment: - server_port=8084 volumes: - ./propertiesFile/zeAuditProcessor.properties:/usr/src/app/zeAuditProcessor.properties # extra_hosts: # - "host.docker.internal:host-gateway" networks: - audit_processor networks: audit_processor: name: webhook_service external: true
Create a ze-audit-processor config file Named "
zeAuditProcessor.properties
" under folderzephyrservice
vi zeAuditProcessor.properties
Add the below line in the file
zeAuditProcessor.properties
server.port=8084 zephyr.queue.name=ze_audit_queue zephyr.queue.exchange=ze_audit_exchange zephyr.queue.routing.key=ze_audit_routing_key # hostname should point to continer name if in case you are running webhook on docker spring.rabbitmq.host=<rabbitmq_hostname> spring.rabbitmq.port=<rabbitmq_port> spring.rabbitmq.username=<rabbitmq_username> spring.rabbitmq.password=<rabbitmq_password> spring.devtools.restart.enabled=false
Append the below database-specific properties based on the Zephyr database you are using.
MySQL
# Data source configurations applied for mysql --- spring.config.activate.on-profile=mysql spring.datasource.url=jdbc:mysql://<database_ipaddress>:<database_port>/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect --- spring.profiles.active=mysql
MsSQL
# Data source configurations applied for mssql --- spring.config.activate.on-profile=mssql spring.datasource.url=jdbc:sqlserver://<database_ipaddress>:<database_port>;database=itcc;encrypt=true;trustServerCertificate=true spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect --- spring.profiles.active=mssql
Oracle
# Data source configurations applied for oracle --- spring.config.activate.on-profile=oracle spring.datasource.url=jdbc:oracle:thin:@<hostname>:<port>:orcl spring.datasource.username=<datbase_username> spring.datasource.password=<database_password> spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect --- spring.profiles.active=oracle # For oauth2 spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Your sample zeAuditProcessor.properties
should look like this:
MySQL
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties spring.jpa.properties.hibernate.dialect=com.thed.orm.Oracle10gCustomDialect
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false # Data source configurations applied for mysql --- spring.config.activate.on-profile=mysql spring.datasource.username=root spring.datasource.password=root spring.datasource.url=jdbc:mysql://localhost:3306/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect --- spring.profiles.active=mysql
MSSQL
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties spring.jpa.properties.hibernate.dialect=com.thed.orm.Oracle10gCustomDialect
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #Data source configurations applied for mssql --- spring.config.activate.on-profile=mssql spring.datasource.username=sa spring.datasource.password=root spring.datasource.url=jdbc:sqlserver://zops-50.c4n7zxvdu2ao.ap-southeast-1.rds.amazonaws.com:1433;database=itcc;encrypt=true;trustServerCertificate=true spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect --- spring.profiles.active=mssql
Oracle
#Oracle would look like below: server.port=8083 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #For oracle db url spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast- 1.rds.amazonaws.com:1521/orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=true # Hibernate Properties spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect # For oauth2 spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
server.port=8084 #RabbitMq zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test spring.devtools.restart.enabled=false #Data source configurations applied for oracle --- spring.config.activate.on-profile=oracle spring.datasource.username=admin spring.datasource.password=password spring.datasource.url=jdbc:oracle:thin:@//ze-oracle19c.c4n7zxvdu2ao.ap-southeast-1.rds.amazonaws.com:1521:orcl spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.jpa.properties.hibernate.default_schema=itcc spring.jpa.hibernate.ddl-auto=none spring.jpa.properties.hibernate.dialect=com.thed.orm.Oracle10gCustomDialect --- spring.profiles.active=oracle
Notice
Make sure port 8084 is available.
zeAuditProcessor
should be able to connect with RabbitMQ.zeAuditProcessor
should be able to connect to the Database of Zephyr.
Start the ze-jira-webhook with docker with the following command:
Navigate to zephyrservice and run the below command:
docker-compose up -d
Verification in the browser:
Verify webhook application status by using http://<hostname>:8084/actuator/health.