You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

Branch : rdk-next

Sub folder : 

  • Build : automationScripts\build\
  • Deployment : automationScripts\deployment\
  • Jenkins Setup : jenkinsServerSetup\

Prerequisites

Before you begin, ensure you have the following:

  • Virtual Machine (VM): A VM with root access.
  • Git: Installed on your VM.
  • Docker (Optional): Install using the following commands:
    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
  • Create a new user group named "docker" and add the Jenkins user to this group:
    sudo groupadd docker
    sudo usermod -aG docker $USER
  • Log out and log back in to re-evaluate group membership. On a virtual machine, you may need to restart it. On Linux, you can also run:
    newgrp docker
  • Verify Docker commands can be run without sudo:
    docker run hello-world
  • Ensure access to pull Docker base images like Tomcat and MySQL from Docker Hub. If access is not available, ensure these images are available locally on the Jenkins VM.

Jenkins Server Setup

  1. Clone the repository 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:

    • Go to "Manage Jenkins" → "Security".
    • Under Security Realm, select Jenkins’ own user database.
    • In the Authorization section, select "Logged-in users can do anything".
    • Unselect "Allow anonymous read access".
    • Click "Save".
  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

  • Populate the parameters as shown in the sample images.



  • Tick the checkbox like "BUILD_AUTOMATICS_ORCHESTRATION" for the orchestration build. You can tick or untick checkbox against each Automatics application to build the corresponding docker container
  • Provide the repository URL, branch, and credentials for each Automatics project.
  • Click "Build" to start the build.

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.
  • Provide details of the VMs for deploying each tool, including user details for SSH access.
  • Ensure SSH connection to the Jenkins VM for executing commands and copying Docker images.
  • Select the tools to deploy and click "Build".

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.

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.


  • No labels