ZE - Audit Service Deployment (Artemis)

Prerequisites

  1. Install Java 17.

  2. Ensure your Zephyr Enterprise and Artemis is set up and running, by launching the application in the browser:

Audit Service Deployment (Jar)

  1. Create a directory under folder opt zephyrservice.

    mkdir zephyrservice
  2. Download the ze-audit-service.jar and copy it under zephyrservice.

  3. Create a ze-audit-service config file named zeAuditService.properties under folder zephyrservice.

    vi zeAuditService.properties
  4. Add the below line in the file zeAuditService.properties.

    #Audit Service port
    server.port=8083
    
    #Artemis Configuration
    artemis.queue.name=ze_audit_queue
    artemis.queue.host.broker.ip=localhost
    artemis.queue.host.broker.port=61616
    spring.artemis.mode=native
    
    # Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq
    spring.profiles.active={dbType},{queueType}
    spring.autoconfigure.exclude= org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration, org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration
    
    

Append the below database-specific properties based on the Zephyr database you are using.

An example of zeAuditService.properties for MySQL DB would look like the below:

#Audit Service port
server.port=8083

#Artemis Configuration
artemis.queue.name=ze_audit_queue
artemis.queue.host.broker.ip=localhost
artemis.queue.host.broker.port=61616
spring.artemis.mode=native

# Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq
spring.profiles.active=mysql,artemis
spring.autoconfigure.exclude= org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration, org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration


# Data source configurations applied for mysql
---
spring.config.activate.on-profile=mysql
spring.datasource.url=jdbc:mysql://localhost:3306/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=root
spring.datasource.password=root
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-audit-service with the following command:

sudo nohup java -jar -Dspring.profiles.active=DB,queue_name -DzeAuditConfigPath="<config file path till root folder>" ze-audit-service-main.jar &

Example command:

sudo nohup java -jar -Dspring.profiles.active=mysql,artemis -DzeAuditConfigPath="/opt/zephyrservice" ze-audit-service-main.jar &

Note

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.

Publication date: