Introduction

Welcome to the Automatics Jenkins Setup and Deployment Guide. This document will walk you through the steps to set up and deploy Automatics applications using Jenkins, ensuring a smooth and efficient process.

Automatics Automated build and deployment Repo

Repo : https://code.rdkcentral.com/r/admin/repos/rdk/tools/automatics/dev-ops

(Please open the above url in browser and git clone url is available in the page)

Branch : rdk-next

Sub folder : 

Prerequisites

Before you begin, ensure you have the following:

Jenkins Server Setup

  1. Clone the repository https://code.rdkcentral.com/r/admin/repos/rdk/tools/automatics/dev-ops(Please open the above url in browser and git clone url is available in the page) and navigate to the jenkinsServerSetup directory:

    git clone <repository_url>
    cd jenkinsServerSetup


  2. Execute the installation script as sudo:

    sudo sh install_jenkins_server.sh

    This script installs Docker, pulls the Jenkins server image from Docker Hub, and installs necessary dependencies like Maven and Jenkins plugins. It also creates Automatics Core & RDKB Utils build jobs and build and deployment jobs.

  3. During script execution, provide inputs such as the port for the Jenkins server. After setup, access Jenkins via the browser using the public IP and port (e.g., 192.168.91.44:8909).

  4. Configure Jenkins security:

  5. Modify the necessary configurations in the pre-created Jenkins jobs (e.g., Maven repo URL, shell script file paths).

Running the jobs

Build Job



Deployment Job

Prerequisite

  1. Docker : All the VMs in which you are planning to deploy Automatics should have docker pre installed in them before executing the deployment job.

Mandatory Automatics Configurations for Test Execution

The below configurations needs to be available in Automatics Orchestration, Automatics Properties, Device Manager and Jenkins jobs inorder to trigger a successful Test case execution from Automatics Orchestration

Jenkins Jobs

The below set of jobs will be created after successful completion of Automated Build and Deployment execution.

Configure all the jenkins jobs with below mentioned details 

Jenkins Job Name

Configuration to be

done in Jenkins Jobs

Steps carryout

the configuration

Automatics_Build_JobNIL
Automatics_Deployment_jobNIL
CI_Automatics_Code_Deploy_And_3.0_Api_ParserNIL
CI_Api_Parser_Automatics_CoreConfigure automatics properties URL in 
the JAVA_OPTS "-Dautomatics.properties.file=Automatics_Props_URL_Tobe_Added_here"
Under Goals of BUILD Tab
  1. Open the job by clicking the job name
  2. In the menus at the left click configure button
  3. Now click the Build tab at the top
  4. Now replace "Automatics_Props_URL_Tobe_Added_here" this string with the actual automatics properties URL in the Goals text field under " Invoke top-level Maven targets " menu
CI_Api_Parser_RDKB_Utils
CI_Api_Parser_RDKV_Utils
CI_Api_Parser_Scriptless_Automation
JOB1
Deploy_Automatics_CoreConfigure your private repo(this is for storing the maven dependencies for automatics) URL in 
the JAVA_OPTS "-DaltDeploymentRepository=REPO_URL_TOBE_ADDED_HERE"
Under Goals of BUILD Tab


  1. Open the job by clicking the job name
  2. In the menus at the left click configure button
  3. Now click the Build tab at the top
  4. Now replace "REPO_URL_TOBE_ADDED_HERE" this string with the private repo(this is for storing the maven dependencies for automatics) URL in the Goals text field under " Invoke top-level Maven targets " menu



Deploy_RDKB_Utils
Deploy_RDKV_Utils
Deploy_RPi_Partner_Java_API

After completing the above set of configuration "CI_Automatics_Code_Deploy_And_3.0_Api_Parser" job should be executed. This job will build and deploy all the automatics dependencies to the repo and run the parsers needed for Automatics Scriptless automation (Automatics 3.0). After that "Deploy_RPi_Partner_Java_API" job needs to be executed. Once all these jobs are executed successfully it is good to go with jenkins job configuration for Automatics( Full manual configuration can be found here Jenkins Job for Test Execution#2.ConfigureJenkinsJob)

Automatics Orchestration

System Configuration

The below mandatory system configurations needs to be done in Automatics orchestration for running a first dummy Test execution and result verification from automatics. All the URLs and DB credentials used for the deployment can be found as a YAML file in "archived artifacts" of Automatics Deployment Job execution DeploymentJob

System Config ParamDescription

DEFAULT_SYNDICATION_PARTNER

Default syndication partner. Eg: Company name

SYNDICATION_PARTNERS

Syndication partner names in comma separated format.  Eg: Company name1, Company name2

DEVICE_INVENTORY_BASE_URL

Base URL which is having the rest implementation of device management

EXECUTION_ENVIRONMENT_TYPES

Execution environment types in comma separated format. Supported values are RDKV, RDKB

AUTOMATICS_BASE_URLBase URL of Automatics Orchestration Application
MICROSERVICE_URLBase URL of Scriptless Service
JUNJenkins Admin User Name
JUPJenkins Admin User Password

Device Details

You need to configure the below data related to device in Automatics orchestration in order to trigger a Test case successfully for the first time.

Automatics Properties

All the mandatory properties mentioned in the document Automatics Properties should be configured in automatics properties for the successful execution of a test case.

Important Points to Note

New Features in Release 33

Simplified Container Management

Upgrading from Older Versions

For users upgrading from older versions of Automatics using the latest scripts, please note the following one-time activities:

  1. Stop and Remove Old Containers: Manually stop and remove old Automatics Docker containers.
  2. New Containers: After running the deployment job, all containers will be new, so no existing data will be present.
  3. Backup and Restore Data:
  4. Log Files: Old Automatics Docker container log files will remain in the existing VM directory. For accessing the logs you can go inside the docker container and open the logs folder, all the server logs will be available in that location. 


Upgrading Automatics Applications Post-Release

To upgrade Automatics applications after a release using the latest automated deployment scripts:

  1. Identify Changes: Determine which Automatics application stacks have new changes.
  2. Build Job:
  3. Deployment Job: