Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Getting Started

Please setup Automatics system if not already done following Automatics Tool Setup

Follow below steps to deploy CDRouter service in Automatics System.

CDRouter Service Setup

Software Requirement

  • JDK 17

  • Maven 3

JDK 17 Setup Details

Follow Steps below to install Java 17 on CentOS/linux.

...

    • Install Java 17

      yum install java-17-openjdk
    • Verify Java is Installed

      java –version

CD-ROUTER Service Setup

For setting up the CDRouter Service of Automatics , clone the repo  << CDRouter Service >> . Once the repo is cloned, please follow the below steps,

Building CDRouter Service Source Code

  1. Clone CDRouter Service source code from CDRouter Service
  2.  Open cdrouterservice/src/main/resources/application.properties in source code
  3. Use the command "mvn clean install" to build the .jar file of the CDRouter Service.
  4. . If not added, add it using  , 'CDROUTERS', 'CDROUTER_SERVICE_BASE_URL' and  'CDROUTER_PAGINATION_LIMIT' as the config names in master_config table.  please refere this page (Automatics CDRouter Integration) for more detailed information on how to add the values using UI and Database(MySQL) as well.

    CDROUTERSUrl of different CDRoutersCDROUTER_PAGINATION_LIMITAdd the pagination value CDROUTER_SERVICE_BASE_URLBase URL of CDRouter ServiceIn CDrouter service  user should navigate to application.properties and update automatics.url with proper automatics base url and save the changes.please refer this Automatics CDRouter Integration page for more information.
  5. Build the source code using maven to generate the jar file

"mvn clean install

Deployment

  1. Copy the jar file to the VM where CDRouter Service to be deployed.
  2. Create 2 directories cdrouter-service and logs in VM.
  3. Copy the jar file to cdrouter-service directory.
  4. Run the below command from cdrouter-service directory to bring the CDRouter Service up in the VMCopy thecdrouterservice-0.0.1-SNAPSHOT.jar of CDrouter Service to a folder in VM. Create a empty folder with the name as 'logs' outside the folder that contains the CDRouter service jar file using the command mkdir logs. Run the below command inside the folder that contains the CDRouter Service jar file to bring the CDrouter Service up in the server.

    nohup java -XX:+UseSerialGC -Dlog4j2.formatMsgNoLookups=true -jar cdrouterservice-0.0.1-SNAPSHOT.jar > logfile.log 2>&1 &
  5. A CDRouterService.log file will be created in the logs folder with the name CDRouterService.log. We directory and we can check the real time logs of the CDRouter Service using this file.