...
Install Java 17.
Ensure your Zephyr Rabbit MQ and ze-jira-webhook. application is set up and running, For RabbitMq Setup follow the instructions on the following page
[By launching the application in the browserLaunch Zephyr with your respective host/domain. Ex: https://test.yourzephyr.com
Launch RabbitMq with the host and configured port. Ex: http://localhost:15672]
Launch
ze-jira-webhook with the host and configured port. Ex: http://<hostname>:8080/actuator/healthLaunch RabbitMq Management in the browser with the host and port (Ex: http://localhost:15672).
Consumer Service Deployment (Jar): -
Create a directory under folder opt “zephyrservice”
Code Block |
---|
mkdir zephyrservice |
Download the ze-rabbitmq-consumer.jar and copy it under
zephyrservice
Create a ze-rabbitmq-consumer config file Named “
zeRabbitMQConsumer.properties
" under folderzephyrservice
Code Block |
---|
vi zeRabbitMQConsumer.properties |
Add the below line
...
to the file
...
Common properties for all the database’s
...
:
Code Block |
---|
#Consumer Service port server.port=90918082 # Rabbitmq config zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.listener.simple.prefetch=1 # Note :- hostname should point to continer name if in case you are running rabbitmq consumer on docker spring.rabbitmq.host=<rabbitmq_hostname> spring.rabbitmq.port=<rabbitmq_port> spring.rabbitmq.username=<rabbitmq_username> spring.rabbitmq.password=<rabbitmq_password> # Audit service configurations audit.service.baseUrl=http://localhost:80828083 # Zephyr service configurations zephyr.service.baseUrl=http://localhost:8080 # webhook service url --> must needs to pass as vm argument zephyr zephyr.rabbitmq.webhook.baseUrl=http://localhost:90908081/webhook # Jira retry callback configurations # BackOffDelay allows dynamic calculation of the delay between retry attempts zephyr.jiracall.retry.backOffDelay=500 # multiplier allows dynamic calculation of the multiplier factor for exponential backoff zephyr.jiracall.retry.multiplier=2 # maxAttempts specifies the maximum number of retry attempts for the jira call. zephyr.jiracall.retry.maxAttempts=1 |
Append the below database-specific properties based on the Zephyr database you are using.
...
View file | ||
---|---|---|
|
Code Block |
---|
#MYSQL#Consumer Service Propertiesport server.port=90918082 spring.rabbitmq.host=localhost spring.rabbitmq.port=5672 spring.rabbitmq.username=test spring.rabbitmq.password=test # 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 #Queue zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.listener.simple.prefetch=1 # Audit service configurations audit.service.baseUrl=http://localhost:80828083 # Zephyr service configurations zephyr.service.baseUrl=http://localhost:8080 # webhook service url --> must needs to pass as vm argument zephyr.rabbitmq.webhook.baseUrl=http://localhost:90908081/webhook # Jira retry callback configurations # BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond zephyr.jiracall.retry.backOffDelay=500 # multiplier allows dynamic calculation of the multiplier factor for exponential backoff zephyr.jiracall.retry.multiplier=2 # maxAttempts specifies the maximum number of retry attempts for the jira call. zephyr.jiracall.retry.maxAttempts=1 |
...
MSSQL
View file | ||
---|---|---|
|
Code Block |
---|
#webhook#Consumer service url with context path zephyr.rabbitmq.webhook.baseUrl=http://localhost:9090/ze-webhook |
MSSQL
View file | ||
---|---|---|
|
Code Block |
---|
#MSSQL would look like below: Service port server.port=90918082 spring.rabbitmq.host=localhost spring.rabbitmq.username=test spring.rabbitmq.password=test # 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:localhost: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 #Queue zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.listener.simple.prefetch=1 # Audit service configurations audit.service.baseUrl=http://localhost:80828083 # Zephyr service configurations zephyr.service.baseUrl=http://localhost:8080 # webhook service url --> must needs to pass as vm argument zephyr.rabbitmq.webhook.baseUrl=http://localhost:90908081/webhook # Jira retry callback configurations # BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond zephyr.jiracall.retry.backOffDelay=500 # multiplier allows dynamic calculation of the multiplier factor for exponential backoff zephyr.jiracall.retry.multiplier=2 # maxAttempts specifies the maximum number of retry attempts for the jira call. zephyr.jiracall.retry.maxAttempts=1 |
...
Oracle
View file | ||
---|---|---|
|
Code Block |
---|
#Oracle#Consumer wouldService look like below: port server.port=90918082 spring.rabbitmq.host=localhost spring.rabbitmq.username=test spring.rabbitmq.password=test # 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.comlocalhost: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=org.hibernate.dialect.Oracle12cDialect --- spring.profiles.active=oracle #Queue zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.listener.simple.prefetch=1 # Audit service configurations audit.service.baseUrl=http://localhost:80828083 # Zephyr service configurations zephyr.service.baseUrl=http://localhost:8080 # webhook service url --> must needs to pass as vm argument zephyr.rabbitmq.webhook.baseUrl=http://localhost:90908081/webhook # Jira retry callback configurations # BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond zephyr.jiracall.retry.backOffDelay=500 # multiplier allows dynamic calculation of the multiplier factor for exponential backoff zephyr.jiracall.retry.multiplier=2 # maxAttempts specifies the maximum number of retry attempts for the jira call. zephyr.jiracall.retry.maxAttempts=1 |
...
Info |
---|
|
Run the following command to start the ze-rabbitmq-consumer
...
Code Block |
---|
sudo nohup java -jar -Dspring.profiles.active=<db> -DzeConsumerConfigPath="<config file path till root folder>" ze-rabbitmq-consconsumer.jar & |
Example command for mysql:
Code Block |
---|
sudo nohup java -jar -Dspring.profiles.active=mysql -DzeConsumerConfigPath="/homeopt/ubuntu/Foldernamezephyrservice" ze-rabbitmq-consumer.jar & |
Consumer started snapshot for reference: -
...
...
Verification in the browser:
Verify webhook application status by using http://<hostname>:8082/actuator/health.
Note: -
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.
Consumer Service Deployment (Docker): -
Install Docker in the System
Create a directory under folder opt “zephyrservice”
Code Block |
---|
mkdir zephyrservice |
Download the Docker compose and copy it under
zephyrservice
View file name docker-compose.yaml
Code Block |
---|
#dockercompose
version: '3.5'
services:
#consumerservice
ze-rabbitmq-consumer:
image: zephyrdevbot/zedevservices:ze-rabbitmq-consumer
container_name: ze-rabbitmq-consumer
ports:
- "8082:8082"
environment:
- server_port=8082
volumes:
- ./zeRabbitMQConsumer.properties:/usr/src/app/zeRabbitMQConsumer.properties
networks:
- consumer_service
networks:
consumer_service:
name: zephyr
external: true |
Create a ze-rabbitmq-consumer config file Named “
zeRabbitMQConsumer.properties
" under folderzephyrservice
Code Block |
---|
vi zeRabbitMQConsumer.properties |
Add the below line to the file:
Code Block |
---|
#Consumer Service port
server.port=8082
# Rabbitmq config
zephyr.queue.name=ze_queue
zephyr.queue.exchange=ze_exchange
zephyr.queue.routing.key=ze_routing_key
spring.rabbitmq.listener.simple.prefetch=1
spring.rabbitmq.host=<rabbitmq_hostname>
spring.rabbitmq.port=<rabbitmq_port>
spring.rabbitmq.username=<rabbitmq_username>
spring.rabbitmq.password=<rabbitmq_password>
# Audit service configurations
audit.service.baseUrl=http://localhost:8083
# Zephyr service configurations
zephyr.service.baseUrl=http://localhost:8080
# webhook service url
zephyr.rabbitmq.webhook.baseUrl=http://localhost:8081/webhook
# Jira retry callback configurations
# BackOffDelay allows dynamic calculation of the delay between retry attempts
zephyr.jiracall.retry.backOffDelay=500
# multiplier allows dynamic calculation of the multiplier factor for exponential backoff
zephyr.jiracall.retry.multiplier=2
# maxAttempts specifies the maximum number of retry attempts for the jira call.
zephyr.jiracall.retry.maxAttempts=1 |
Append the below database-specific properties based on the Zephyr database you are using.
MsSQL:
Code Block |
---|
# 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:
Code Block |
---|
# 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:
Code Block |
---|
# 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.Oracle12cDialect
---
spring.profiles.active=oracle |
Your sample zeRabbitMQConsumer.properties
should look like Below:
MySQL
View file | ||
---|---|---|
|
Code Block |
---|
#Consumer Service port
server.port=8082
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=test
spring.rabbitmq.password=test
# 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
#Queue
zephyr.queue.name=ze_queue
zephyr.queue.exchange=ze_exchange
zephyr.queue.routing.key=ze_routing_key
spring.rabbitmq.listener.simple.prefetch=1
# Audit service configurations
audit.service.baseUrl=http://localhost:8083
# Zephyr service configurations
zephyr.service.baseUrl=http://localhost:8080
# webhook service url --> must needs to pass as vm argument
zephyr.rabbitmq.webhook.baseUrl=http://localhost:8081/webhook
# Jira retry callback configurations
# BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond
zephyr.jiracall.retry.backOffDelay=500
# multiplier allows dynamic calculation of the multiplier factor for exponential backoff
zephyr.jiracall.retry.multiplier=2
# maxAttempts specifies the maximum number of retry attempts for the jira call.
zephyr.jiracall.retry.maxAttempts=1 |
MSSQL
View file | ||
---|---|---|
|
Code Block |
---|
#Consumer Service port
server.port=8082
spring.rabbitmq.host=localhost
spring.rabbitmq.username=test
spring.rabbitmq.password=test
# 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://localhost: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
#Queue
zephyr.queue.name=ze_queue
zephyr.queue.exchange=ze_exchange
zephyr.queue.routing.key=ze_routing_key
spring.rabbitmq.listener.simple.prefetch=1
# Audit service configurations
audit.service.baseUrl=http://localhost:8083
# Zephyr service configurations
zephyr.service.baseUrl=http://localhost:8080
# webhook service url --> must needs to pass as vm argument
zephyr.rabbitmq.webhook.baseUrl=http://localhost:8081/webhook
# Jira retry callback configurations
# BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond
zephyr.jiracall.retry.backOffDelay=500
# multiplier allows dynamic calculation of the multiplier factor for exponential backoff
zephyr.jiracall.retry.multiplier=2
# maxAttempts specifies the maximum number of retry attempts for the jira call.
zephyr.jiracall.retry.maxAttempts=1 |
Oracle
View file | ||
---|---|---|
|
Code Block |
---|
#Consumer Service port
server.port=8082
spring.rabbitmq.host=localhost
spring.rabbitmq.username=test
spring.rabbitmq.password=test
# 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:@//localhost: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=org.hibernate.dialect.Oracle12cDialect
---
spring.profiles.active=oracle
#Queue
zephyr.queue.name=ze_queue
zephyr.queue.exchange=ze_exchange
zephyr.queue.routing.key=ze_routing_key
spring.rabbitmq.listener.simple.prefetch=1
# Audit service configurations
audit.service.baseUrl=http://localhost:8083
# Zephyr service configurations
zephyr.service.baseUrl=http://localhost:8080
# webhook service url --> must needs to pass as vm argument
zephyr.rabbitmq.webhook.baseUrl=http://localhost:8081/webhook
# Jira retry callback configurations
# BackOffDelay allows dynamic calculation of the delay between retry attempts in millisecond
zephyr.jiracall.retry.backOffDelay=500
# multiplier allows dynamic calculation of the multiplier factor for exponential backoff
zephyr.jiracall.retry.multiplier=2
# maxAttempts specifies the maximum number of retry attempts for the jira call.
zephyr.jiracall.retry.maxAttempts=1 |
Info |
---|
|
Start the ze-jira-webhook with docker with the following command.
Navigate to zephyrservice and run the below command:
Code Block |
---|
docker-compose up -d |
Verification in the browser:
Verify webhook application status by using http://<hostname>:8082/actuator/health
Post Deployment verification on RabbitMq
Once your webhook and consumer jar are up ze_queue,ze_exchange, and ze_routing_key will be created as mentioned in the properties file.
In the Management UI, you can verify.
→ "ze_queue" with type as "quorum" will be created in the Queues and Streams tab→ "ze_exchange" with type as "topic" will be created in the Exchanges tab
→ Click on the "ze_exchange” → queue name as “ze_queue“ and Routing key as “ze_routing_key“ will be created in Bindings.