Getting Started

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

Follow below steps to deploy CDRouter service in Automatics System.


Deployment of CDRouter Service

User can deploy CDRouter service in automated approach or manually. Recommended approach is the automated way of deployment.

Automated Deployment of CDRouter Service

User has to run first run Automatics_Build_job to build the docker image of CDRouter Service and then Automatics_Deployment_job to bring up cdrouter docker service.


Build CDRouter Service Docker File

In Automatics_Build_job, please check the option BUILD_CDROUTER_SERVICE and run the job. This will create CDRouter Service Docker File upon success.

Deploy CDRouter Service Docker File

In Automatics_Deployment_job, please check the option DEPLOY_CDROUTER_SERVICE. Select options as given in below screenshots and Build the job. This will deploy CDRouter Service Docker on destination VM.

  • Provide VM IP address on which CDRouter service to be deployed
  • Select the SSH credential to the VM

  • Select the port in destination VM on which docker will be exposed.
  • Provide the Automatics Orchestration and DeviceManager base urls in the format given in screenshot.
  • Next, Click on Build

Manual Deployment of CDRouter Service

Software Requirement

  • JDK 17

  • Maven 3

JDK 17 Setup Details

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

    • Update before installing any new program

      yum -y update
    • Install Java 17

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

      java –version

Configuration in CDRouter Service

In application.properties file of CDRouter Service, we can configure certain values for cdrouter test execution.

  1. automatics.url - We need to enter the base URL of Automatics
  2. devicemanager.url - We need to enter the base URL of device manager service.
  3. cron.package.details.jobs - This property is a used to specify the cron expression for sending the package details from CDRouter Service to Automatics for saving in the database. By default it is configured in such a way that from Monday to Friday at 10:30 AM, package details from CDRouter Instance will be sent to Automatics.


Building CDRouter Service Source Code

  • Clone CDRouter Service source code from CDRouter Service
  •  Open cdrouterservice/src/main/resources/application.properties in source code and update below properties with values and save the changes.  
Property NameDescription
automatics.url

Base url of orchestration

(http://orchestration_ip:port/Automatics)

devicemanager.url

Base url of device manager service

(http://device_manager_ip:port/DeviceManager)


  • 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 VM.

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