ZE - Webhook Deployment
Prerequisite
Install Java 17.0.13
Ensure your Zephyr and Rabbit MQ application is set up and running, For RabbitMq Setup follow the instructions here RabbitMQ Deployment
[By launching the application in the browser:
Launch Zephyr with your respective host/domain. Example: 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/).
Webhook Service Deployment (Jar)
Create a directory under folder opt “zephyrservice”.
mkdir zephyrservice
Download the ze-jira-webhook.jar and copy it under
zephyrservice
.Create a ze-jira-webhook config file Named “
zeJiraWebhook.properties
" under folderzephyrservice
.vi zeJiraWebhook.properties
Add the below line in the file
zeJiraWebhook.properties
.#Webhook Service port server.port=8081 #context path property server.servlet.context-path=/webhook #Rabbitmq config zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=<hostname> spring.rabbitmq.port=<port> spring.rabbitmq.username=<username> spring.rabbitmq.password=<password> spring.rabbitmq.ssl.enabled=true # Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq spring.profiles.active={dbType},{queueType} spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration #ze_jira_webhook flags event.validator.json.file=classpath:webhook-events-validation.json ze.jira.webhook.event.validation_flag = false #ssl properties #uncomment the below line and add the SSL #server.ssl.enabled=true #server.ssl.key-store-type=PKCS12 #server.ssl.key-alias=<aliasname> #server.ssl.key-store=file:<path of the certificate> #server.ssl.key-store-password=<password>
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
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
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
An example of
zeJiraWebhook.properties
for MYSQL DB would look like the below:#Webhook Service port server.port=8081 #context path property server.servlet.context-path=/webhook #Rabbitmq config 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=guest spring.rabbitmq.password=guest spring.rabbitmq.ssl.enabled=true # Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq spring.profiles.active=mysql,rabbitmq spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration #ze_jira_webhook flags event.validator.json.file=classpath:webhook-events-validation.json ze.jira.webhook.event.validation_flag = false #ssl properties #uncomment the below line and add the SSL #server.ssl.enabled=true #server.ssl.key-store-type=PKCS12 #server.ssl.key-alias=<aliasname> #server.ssl.key-store=file:<path of the certificate> #server.ssl.key-store-password=<password> # 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
Open the “Terminal” or “Command Prompt”
Navigate to folder /opt/zephyrservice
Type the below command
Start the ze-jira-webhook with the following command
sudo nohup java -jar -Dspring.profiles.active=DB,queue_name -DzeWebhookConfigPath="<config file path till root folder>" ze-jira-webhook.jar &
Example command
sudo nohup java -jar -Dspring.profiles.active=mysql,rabbitmq -DzeWebhookConfigPath="/opt/zephyrservice" ze-jira-webhook.jar &
Notice
Log
The Logs folder will be created where your jars are deployed. Separate log files will be created for each jar. In the above example, it will be in /opt/zephyrservice.
Verification
Verify webhook application status by using http://<hostname>:8080/webhook/actuator/health
Webhook started snapshot for reference: -

Verification in the browser:

Webhook Service 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: #webhookservice ze-jira-webhook: image: smartbear/zejirawebhook:ze-jira-webhook container_name: ze-jira-webhook ports: - "8081:8081" - "8000:8000" environment: - server_port=8081 volumes: - ./zeJiraWebhook.properties:/usr/src/app/zeJiraWebhook.properties networks: - webhook_service networks: webhook_service: name: zephyr external: true
Create a ze-jira-webhook config file Named “
zeJiraWebhook.properties
" under the folderzephyrservice
vi zeJiraWebhook.properties
Add the below line in the file
zeJiraWebhook.properties
#Webhook Service port server.port=8081 #context path property server.servlet.context-path=/webhook #Rabbitmq config zephyr.queue.name=ze_queue zephyr.queue.exchange=ze_exchange zephyr.queue.routing.key=ze_routing_key spring.rabbitmq.host=<hostname> spring.rabbitmq.port=<port> spring.rabbitmq.username=<username> spring.rabbitmq.password=<password> #ze_jira_webhook flags event.validator.json.file=classpath:webhook-events-validation.json ze.jira.webhook.event.validation_flag = false #ssl properties #uncomment the below line and add the SSL #server.ssl.enabled=true #server.ssl.key-store-type=PKCS12 #server.ssl.key-alias=<aliasname> #server.ssl.key-store=file:<path of the certificate> #server.ssl.key-store-password=<password>
An example of
zeJiraWebhook.properties
should look like the below:#Webhook Service port server.port=8081 #context path property server.servlet.context-path=/webhook #Rabbitmq config 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=guest spring.rabbitmq.password=guest # ze_jira_webhook flags event.validator.json.file=classpath:webhook-events-validation.json ze.jira.webhook.event.validation_flag = false #ssl properties server.ssl.enabled=true server.ssl.key-store-type=PKCS12 server.ssl.key-alias=mycert server.ssl.key-store=file:/home/ubuntu/keystore.p12 server.ssl.key-store-password=changeit
Notice
Make sure port 8081 is available.
zeJiraWebhook should be able to connect with RabbitMQ.
Start the ze-jira-webhook with docker with the following command
Navigate to zephyrservice and run the below command.
docker-compose up -d
Verification
Webhook started snapshot for reference: -

Verification in the browser
Verify webhook application status by using http://<hostname>:8080/webhook/actuator/health
