RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
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.
The recommended approach to deploy Automatics for a stable test environment is using 3 VM setup. In this approach the automatics components are deployed among the VMs. Following diagram shows in which VM each component should be deployed.
In this approach all components that is shown in the above section will be deployed in single VM.
Before you begin, ensure you have the following installed in VMs:
Virtual Machine (VM): VMs with root access.
Git: Installed on your Jenkins VM.
Docker : To be installed in all VMs where Automatics components has to be deployed
Self Hosted Maven Artifact Repository : (Optional)
This is where Automatics maven artifacts will be deployed and used during test execution using maven. If this setup is not available, please press enter for inputs asking maven artifact repo details. If planning to keep the artifacts in maven local repo in the same machine, please replace the command clean deploy with clean install in jenkins jobs configuration where ever applicable.
Please follow below steps to setup docker in your VMs.
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
Note: 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.
After the pre-requisites are done, clone the automated deployment repository in the VM where Jenkins is planned to setup.
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 :
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 dev-ops/jenkinsServerSetup
Execute the installation script as sudo from dev-ops/jenkinsServerSetup
:
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.
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
).
Configure Jenkins security:
Modify the necessary configurations in the pre-created Jenkins jobs (e.g., Maven repo URL, shell script file paths).
First execute Automatics_Build_Job. This will build the source code of Automatics tools and services and generate war or jar files.
Populate the parameters as shown in the sample images.
Next, execute Automatics_Deployment_Job. This will create docker files and deploy dockers on the destination VMs. After this execution, Automatics tools should be up and running.
While running this job,
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_Job | NIL | |
Automatics_Deployment_job | NIL | |
CI_Automatics_Code_Deploy_And_3.0_Api_Parser | NIL | |
CI_Api_Parser_Automatics_Core | Configure automatics properties URL in the JAVA_OPTS "-Dautomatics.properties.file=Automatics_Props_URL_Tobe_Added_here" Under Goals of BUILD Tab |
|
CI_Api_Parser_RDKB_Utils | ||
CI_Api_Parser_RDKV_Utils | ||
CI_Api_Parser_Scriptless_Automation | ||
JOB1 | ||
Deploy_Automatics_Core | Configure your private repo(this is for storing the maven dependencies for automatics) along with maven deploy command under Build Section |
|
Deploy_RDKB_Utils | ||
Deploy_RDKV_Utils | ||
Deploy_RPi_Partner_Java_API |
After completing the above set of configuration execute Jenkins Jobs in below order.
The below mandatory system configurations needs to be done in Automatics orchestration for running a first dummy Test execution and result verification from automatics. Please follow Automatics Orchestration Setup#Configuration to configure required configs System Config page of Automatics Properties to make use of features like scriptless automation, review management etc
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 Param | Description |
---|---|
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_URL | Base URL of Automatics Orchestration Application |
MICROSERVICE_URL | Base URL of Scriptless Service |
JUN | Jenkins Admin User Name |
JUP | Jenkins Admin User Password |
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.
All the mandatory properties mentioned in the document Automatics Properties should be configured in automatics properties for the successful execution of a test case.
After all configuration are done, please login to the VM where debugger service is running and restart the debugger docker container.
For users upgrading from older versions of Automatics using the latest scripts, please note the following one-time activities:
automatics.properties
and device_config.json
files to the newly deployed application.To upgrade Automatics applications after a release using the latest automated deployment scripts: