Versions Compared

Key

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

Setup

If you already have an existing setup of Automatics you can follow the steps in this page for upgrading the software's Automatics Technology Stack - Upgrade 

Software Requirement

  • JDK 17

Please note that even though the recommended version of Orchestration is JDK17, it is reverse compatible with JDK11 also. So code also be compiled with JDK11.

Setup

Software Requirement

  • JDK 1.8

Follow Steps below to install Java

...

17 on CentOS/linux.

    • Update before installing any new program

Image Removed

    • Install Java 1.8

Image Removed

    • Verify Java is Installed

Image Removed

Sample output:

Image Removed

  • MySql 5.6

Follow below steps to install and configure MySQL on CentOS/linux

    • Go to the Download MySQL Yum Repository page (https://dev.mysql.com/downloads/repo/yum/) in the MySQL Developer Zone.

    • Select and download the release package for your platform.

    • Install the downloaded release package with the following command, replacing platform-and-version-specific-package-name with the name of the downloaded RPM package.

$> rpm -ivh  platform-and-version-specific-package-name.rpm

Example Output:

Image Removed

    • By using yum command, now we will install MySQL Server 5.6 . All dependencies will be installed itself.

Image Removed

    • To start MySQL Service, run command "systemctl start mysqld".

    • To stop MySQL Service, run command "systemctl stop mysqld".

    • To restart MySQL Service, run command "systemctl restart mysqld".

    • To get status of MySQL Service, run command "systemctl status mysqld".

    • Run "mysql_secure_installation"  to perform to reset the root user password.

Image Removed

  • Tomcat 7.0.XX

Follow below Steps to setup Tomcat server  on CentOs/linux.

Image Removed

    • After competed download extract archive file in /tmp directory and move to the proper location as per your need.

Example:

Image Removed

    • Navigate to the tomcat file path and run ./bin/startup.sh cmd to start the tomcat server.

Sample Output:

Image Removed

  • Maven 3

Follow below steps to setup maven on Centos/linux.

Image Removed

    • Add maven bin folder path using cmd "export PATH=<MAVEN_FOLDER_PATH>:$PATH.

Example:

Image Removed

    • Verfiy Maven is installed by giving "mvn -v" cmd.

Image Removed

  • SMTP server (optional, if email feature in Automatics to be enabled)

MySQL Configuration           

  • Create database with name ‘automatics’.
  • Execute the script 'Automatics_DB.sql' that is available with Orchestration source at 'automatics\resources\'. Now the Automatics tables are created with basic configuration data.
  • Execute the script 'Automatics_RDKB' that is available with Orchestration source at 'automatics\resources\'. Now the Automatics tables are updated with basic Automatics_RDKB data.
  • Execute the script 'Automatics_MySqlProcedures.sql' that is available with Orchestration source at 'automatics\resources\'.  This is a stored procedure invoked by orchestration to update test pass/fail count in DB.

WAR Generation

  • Pull the latest Automatics Orchestration tool project from the repository (rdk/tools/automatics) with branch “rdk-next”.
  • After taking the pull, do “mvn clean install” then war file will be generated and will be present inside Automatics/release/Automatics-v<version>/ folder inside the project.
  • Rename war to Automatics.war.

War Deployment

  • Copy the Automatics.war file to the apache-tomcat/webapps folder.
  • Copy the restartTMR.sh file which is inside Automatics/config to apache-tomcat/bin folder.
  • Copy “hibernate.cfg.xml”(inside Automatics/config folder) and “log4j.properties”(inside Automatics) files to any specific location,
  • Update “hibernate.cfg.xml” with database user name and password. And the password updating in "hibernate.cfg.xml” should be Base64 encoded. And, the DB name should be 'automatics'.
  • Add the following params to JAVA_OPTS inside apache-tomcat/bin/catalina.sh file   

-DAutomatics -DhibernateUI.config.file = {path to hibernate config file} 

  • Log4j Configuration
    • Orchestration <= v3.0
      • Log4j configuration is mandatory 
      • Copy “log4j.properties” (inside Automatics/src/main/resources) to any specific location,
      • Add the following param to JAVA_OPTS inside apache-tomcat/bin/catalina.sh file 

        -DloggerUI.properties.file = {path to log properties file} 

    • Orchestration >= v3.1
      • Log4j configuration is optional.
      • log4j.properties has been replaced with log4j2-test.xml and is available at Automatics/src/main/resources/. By default, log4j2-test.xml logging configuration will be taken and no explicit configuration is required. However, if custom logging is preferred then it can be configured with JVM property
      • Add the following param to JAVA_OPTS inside apache-tomcat/bin/catalina.sh file 

-Dlog4j.configurationFile={path_to_custom_log4j2-test.xml}

  •  Create empty files childUI.jmd and mainUI.jmd in apache-tomcat/bin/. This is required by orchestration for job scheduling.
  • Navigate to apache-tomcat/bin directory and start the server by executing command.

./startup.sh

  • To verify the server logs, navigate to logs directory (apache-tomcat/logs) under tomcat. 
    • catalina.out - server start up logs
    • automatics_{time_stamp} - Automatics logs
    • traces/trace_automatics_{time_stamp} - Automatics trace logs
  • Automatics Orchestration can be launched from “{protocol}://{host:port}/Automatics/login.htm
  • To stop the server type ./shutdown.sh.

Configuration

...

System Configuration

  • From Automatics UI, go to Settings -> System Configuration page.

           The system configuration page has following parameters and partner has to configure values for their environment. The description of each parameter is provided below which helps to configure them.

...

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

...

JUN

...

Jenkins Username 

...

JUP

...

Jenkins Password 

...

LDAP

...

LDAP Configuration values

...

Test_Types

...

Test Types supported by Automatics, QUICK, QUICK_CI, 1HOUR, 4HOUR, 2DAYS, FAST_QUICK, FAST_QUICK_CI

...

EXECUTION_PRIORITY

...

Test cases will be executed based on the priority. Default provided values in comma separated format for execution priority are P0,P1,P2,P3

...

JOB_NAME_PREFIX

...

Prefix of the Jenkins job name. Depending on the test environment partner can configure multiple jenkins jobs for test execution and they all should have name that is configured here with an index. Default provided value is “GENERIC_RDKM_JOB”. eg: GENERIC_RDKM_JOB1, GENERIC_RDKM_JOB2 ...GENERIC_RDKM_JOBN

...

MINIMUM_FAIL_PERCENTAGE_TO_RETRY_TEST

...

After test execution, orchestration will calculate the percentage of failed test steps in a test script. If the failure percentage is beyond the limit configured here, then test will be automatically selected for re-trigger. Default value is 20

...

USER_DEFAULT_MODULES

...

Values of the default modules that can be accessed by the guest user. Default provided values separated by hyphen -3-5-6-8-9-13-

...

MASTER

...

Comma separated string keywords to identify a build name as master

...

SPRINT

...

Comma separated string keywords to identify a build name as sprint

...

STABLE

...

Comma separated string keywords to identify a build name as stable

...

CI_BUILD

...

Comma separated string keywords to identify a build name as CI build

...

TM_TYPE

...

Automatics deployment environment. Valid values DEV or PROD

...

HEAD_ENDS

...

Head ends to which devices are connected. Values added in comma separated format

...

SERVICE_CI_VERIFICATION_VALUE

...

Value for service CI_VERFICATION. Supported value CI_VERIFICATION.

...

SERVICE_FUNCTIONAL_VERIFICATION_VALUE

...

Value for service FUNCTIONAL_VERIFICATION. Supported value FUNCTIONAL _VERIFICATION.

...

REASON_TYPES

...

Reasons for adding/updating/deleting scripts via 'Manage Script' page. Values added in comma separated format

...

Code Block
languagebash
sudo yum -y update
    • Install Java 17
Code Block
languagebash
sudo yum install java-17-openjdk
    • Verify Java is Installed
Code Block
languagebash
java -version

Sample output:

Image Added

This Scriptless Service uses the Automatics Orchestration database, so for the scriptless service server to start UP it should have access to Automatics Orchestration and the below mentioned tables should be available in that database.

Scriptless Service Setup

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

  1. Add the username and password of Automatics MYSQL Database in the application.properties file(/src/main/resources/). Enter the value of username and password of the database to 'spring.datasource.username' and 'spring.datasource.password'.
  2. The password should be entered in base 64 encrypted format.
  3. Use the command "mvn clean install" to build the .jar file of the Scriptless Service.
  4. Check whether the tables that are required for Scriptless Service is present in the automatics database. If not present, create it using the SQL scripts present in the Automatics_DB.sql file starting from line number 1596
  5. Check whether the base URLs of Automatics Orchestration and Scriptless Service application is added to the database. If not added, add it using 'AUTOMATICS_BASE_URL' and 'MICROSERVICE_URL' as the config names in master_config table.  

    AUTOMATICS_BASE_URLBase URL of Automatics Orchestration Application
    MICROSERVICE_URLBase URL of Scriptless Service
  6. Copy the rackdataservice-1.0.0.jar of Rackdataservice Scriptless Service to a folder in VM. Create a empty folder with the name as 'logs' outside the folder that contains the Rackdataservice jar file using the command mkdir logs. Run the below command inside the folder that contains the Rackdataservice jar file to bring the Scriptless Service up in the server.

    Code Block
    nohup java -XX:+UseSerialGC -Dlog4j2.formatMsgNoLookups=true -jar rackdataservice-1.0.0.jar > logfile.log 2>&1 &
  7. A log file will be created in the logs folder with the name rackDataService.log. We can check the real time logs of the Scriptless Service using this file. 

Tables which are used in RackDataService

 Image Removed

Image Removed

Image Removed

Image Removed

Device Models

  • From Automatics UI, navigate to Settings -> Manage Scripts -> Run on Models

User needs to configure all device models that is going to execute from Automatics.  

Automatics identifies a device model from its build name. For this, admin user has to configure device model and its corresponding build name. It requires only to map the device model and initial starting sub string of build name. The starting few letters(image prefix) in build name should be unique to a device model and this should be added in 'Image Name Prefix' text.

Image Removed

    • Click on Add Device Name
    • Enter the Device Name.
    • Enter the Image Prefix Name. The build name prefix which will be unique to identify a device model. Automatics identify a device model from the build name.
    • Select the device category.
    • Check-in isClientDevice, if the device is a RDKV client device.

Device Group

  • From Automatics UI, navigate to Settings -> Device Groups

For Automatics to use devices from partner's inventory, device groups have to be configured. The device group name in inventory should be added here so that user can execute tests on devices within these groups only. Admin user can map device groups to users so that only those users mapped to device group can execute tests on device.

Image Removed

    • Go to Settings -> Device Groups
    • Click on Add New Device Group Name
    • Enter the Device Group Name. Devices should be present in this Group Name.

Resource Details

  • From Automatics UI, navigate to Settings ->  Resource Details

User can configure Jenkins details in resource details. The test execution happens at jenkins. The jenkins job name should be configured in 'System Configuration' page for param 'JOB_NAME_PREFIX'. 

Image Removed

    • Click on Add Resource Details.
    • Enter the Jenkins resource base URL
    • Select the Category type from the dropdown (Select if jenkins is configured for RDKV or RDKB execution).
    • Maximum Parallel Jobs :- It represents the number of jobs configured in Jenkins for Automatics. It also requires, the configured jenkins jobs should have pre-defined name which is configurable from system property 'JOB_NAME_PREFIX'. For, eg: If "JOB_NAME_PREFIX" is set to AUTO_JOB, then in jenkins, jobs dedicated for Automatics execution should have names AUTO_JOB1, AUTO_JOB2, AUTO_JOB3 etc. Here, the Maximum Parallel Jobs configured is 10. So at a time Automatics can perform 10 job executions and remaining jobs will be in Queued state in Automatics waiting for free jenkins job.

Source Code Repository

            Admin user has to configure source repositories of test projects in Automatics Orchestration. 

 User can update source repo details via DB. UI support is not available now.

Source Repo Configuration for RDKB

Following are the source repository details to be configured for RDKB. Please execute following SQL Queries.

Configure generic core tests 

insert into source_code_details (NAME, CATEGORY_TYPE, SOURCE_REPO, SOURCE_BRANCH, DELETED_DATE, UPDATED_BY, UPDATED_DATE) values ('RDKB_CORE_TESTS', 'RDKB', 'generic-automation-tests', 'rdk-next', NULL,  'admin', now());

Configure RDKB tests 

insert into source_code_details (NAME, CATEGORY_TYPE, SOURCE_REPO, SOURCE_BRANCH, DELETED_DATE, UPDATED_BY, UPDATED_DATE) values ('RDKB_TESTS', 'RDKB', 'rdkb-tests', 'rdk-next', NULL,  'admin', now());

Source Repo Configuration for RDKV

Following are the source repository details to be configured for RDKV. Please execute following SQL Queries.

Configure generic core tests 

insert into source_code_details (NAME, CATEGORY_TYPE, SOURCE_REPO, SOURCE_BRANCH, DELETED_DATE, UPDATED_BY, UPDATED_DATE) values ('RDKV_CORE_TESTS', 'RDKV', 'generic-automation-tests', 'rdk-next', NULL,  'admin', now());

 Job Settings

From Automatics UI,User can navigate to the page Settings ->  Job Settings.

And verify (AUTO_QUICK_TEST_JOB, AUTO_QUICK_TEST_JOB_CI, AUTO_1HOUR_TEST_JOB, AUTO_4HOUR_TEST_JOB,AUTO_2DAYS_TEST_JOB,AUTO_COMPONENT_TEST_JOB,) jobs are created in the UI.

If job is not created please follow this Url Automatics Orchestration User Manual - Preferred Program - RDK Central Wiki

 If the jos not configured you can follow the UI.

For the below test types configured in Automatics, user has to create a Job template from Job Settings page. The Job names and test types names should be configured as below.

Job templates are created . If it is not not created you can follow Automatics Orchestration User Manual - Preferred Program - RDK Central Wiki

...

Test Type

...

Template Job Name

...

Email Notification

  • From Automatics UI, navigate to Settings ->  System Configuration.

Automatics Orchestration has the support to update test execution details and other updates to users via automated email notification.

To enable this feature, admin user has to configure following fields in System Configuration page:

...

System Config Param

...

Description

...

Following features should be given permission only to Admin.

Upgrade Automatics

Admin can upgrade the Automatics by going to Settings -> Upgrade Automatics

Automatics provides support for automated deployment.

  • Click on Browse button, now select the Automatics.war file in releases/automatics-v{pom_version} folder and click on Open.
  • Click on Upgrade button to upgrade the Automatics.

User Management

  • From Automatics UI, navigate to Settings ->  User Management

Admin can manage all the users of the Automatics.

Admin can Add/Delete the user details and groups. Also, manages the user group module access.

  • Click on Add New User
    • Enter Preferred User Id: “guest”
    • Enter the user name: “guest”
    • Enter user email id
    • Select user group: GUEST
  • Click on Add New User Group
    • Enter User Group name: GUEST_1
  • Click on Delete User Group
    • Select the User Group, you want to delete and click on Delete
  • Click on User Group Module Access
    • Select the User Group and click on Fetch Access Rights.
    • Select the access right checkbox of the Module Name, you want to provide access.
    • Click on Save.

Microservice Setup

For accessing the Microservice setup.

We need to download the repo << Rack Data Service>> . Once we deployed the repositories, we need add the username and password inside the Automatics properties.

In Automatics Orchestration we need to add the tables inside Automatics_DB.sql

In Automatics Rack service repo → com.automatics.entity the tables are created.

Tables which are used in RackDataMicroservice

command_details
connected_client_config
master_config
predefined_class
predefined_method
predefined_param
primary_command_config_details
scriptless_test_case_details
stb_image_mapping
stb_type
step_actions
step_command_input
step_conditions
step_connected_client
step_details
step_iterations
step_command_params
step_properties
step_utility
test_case_command_config_details
test_cases_repository
test_constants
test_utility
user_group

...