Jenkins Execution Engine
The default execution engine in XPRESSO is Jenkins which serves as the workflow engine to manage/provide a CI/CD solution/process to execute Job Requests on a server using the provided Test Harness. Jenkins is highly extensible; functionality can be extended through the installation of plugins. There are three specific Jenkins plugins designed to work with XPRESSO (see below for details).
About the Jenkins Execution Engine
Jenkins is a self-contained, open source, orchestration and automation execution engine (server) used to automate the various tasks related to the building, testing, delivery, and deployment of software. Jenkins enables developers to automate this process as much as possible.
Jenkins has the following attributes that apply to XPRESSO:
Execution Behavior
During execution, XPRESSO automatically creates one project per Job/Profile in this format: $INSTANCEID-$JOB-$UUID
. Each Job Run (build) performs using the standard Jenkins user (typically, jenkins
). This is a Jenkins default behavior. These project files are synced and automatically maintained by XPRESSO.
CAUTION!
Do not attempt to modify the associate Jenkins project file as this may cause all subsequent Job Runs with the associate Job/Profile to terminate.
Jenkins Operational/Deployment Requirements
You need the following prerequisites to register a Jenkins Engine Instance in XPRESSO:
Jenkins v2.80+ with Java v1.8 (Java SE 8).
If your testbed is in a DMZ'ed lab, the Jenkins Engine Instance requires a network interface connecting to your lab LAN.
Ensure your Jenkins deployment has the appropriate resources for the amount of Job Runs you plan to execute on it.
Ensure your Jenkins Engine Instance can access your test harness. This also applies if you are using a slave Jenkins deployment.
Ensure the Jenkins user has the correct permissions to the files and directories associated with the Jenkins Engine Instance. This also applies if you are using a slave Jenkins deployment.
Jenkins Plugin Requirements
Jenkins plugins are the primary means of enhancing the functionality of Jenkins to suit an organization or user-specific automation needs. There are many plugins available for Jenkins; the following specific Jenkins plugins are used with XPRESSO and pyATS:
- Pipeline Plugin: Used to execute XPRESSO Jobs or Profiles as a Jenkins Pipeline job. This plugin is may already be installed by default.
NOTE:
Refer to the Jenkins user documentation for information about how to install these plugins with Jenkins.
Initial Jenkins Setup Requirements
Prior to registering a Jenkins execution engine in XPRESSO, you need to make sure the related-backend equipment is deployed and reachable:
Making a Request to Register a New Jenkins Engine Instance
This sub-topic only applies to Member and Privilege Member Roles. See the above plugin and setup requirement sub-topics for the prerequisites tasks that must be in place before a Jenkins Engine can be registered in XPRESSO.
You can view all current registered Jenkins Engine Instances on the Registered Engine Instances page.
In the event your Jenkins Engine is not registered in XPRESSO, you can make a request to the Group Administrator to add (register) it.
To Make a Request to Register a New Jenkins Engine Instance:
From the Main Navigation Bar, choose ENVIRONMENT→Execution Engines to open the Registered Engine Instances page.
Click the Request New Engine button located on the top-right side of the page. The Request New Engine Instance form appears.
Configure the Name parameter and click the Send Request button. The request is forwarded to the Group Admin for processing.
Registering a New Jenkins Engine Instance
You need to register your Jenkins Engine Instance in XPRESSO so you can execute your Job Runs on them. Only a Group Admin or System Admin can register a new Jenkins Engine Instance:
To Register a New Jenkins Engine Instance:
From the Main Navigation Bar, choose ENVIRONMENT→Execution Engines to open the Registered Engine Instances page.
Click the Add Engine Instance button located on the top-right side of the page. The Add a New Execution Engine Instance page appears.
Configure the following required parameters:
NOTE:
You must ensure the same fully qualified URL is set properly in your Jenkins instance. To validate the URL is configured correctly: login to your Jenkins instance using an account with administrative access, click Manage Jenkins→Configure System and ensure a fully qualified URL is used under the Jenkins Location→Jenkins URL options.
Site: Select the geo-location of the Jenkins Engine Instance from the pull-down window.
Building: Enter the specific building(s) in the selected geo-location of the Jenkins Engine Instance.
User ID: Enter a User ID used to authenticate the new Jenkins Engine Instance for example: admin.
Jenkins API token: Enter the API token used to authenticate with Jenkins. Follow this guide
for information about how to obtain a Jenkins API token.
NOTE:
The XPRESSO API automation token can only be used to interact with XPRESSO REST APIs and cannot be used for any API token fields within the XPRESSO application itself. For example, when creating a new Jenkins Engine Instance, you are required to enter the API automation token obtained from Jenkins itself, not the XPRESSO-generated API automation token.
- Click Save. The new Jenkins Engine instance appears in the list of Registered Engine Instances.
Only the Group Admin and System Admin can perform operations on a registered Jenkins Engine Instance.
From the Main Navigation Bar, choose ENVIRONMENT→Execution Engines to open the Registered Engine Instances page. All Engine Instances registered to your Group display.
Locate and highlight the Jenkins Engine Instance that you want to perform the operation on and click the appropriate floating action button (Edit | Delete | Enable | Disable | Maintenance) located to the right of the selected Instance.
If you click the Edit button, you can only edit the following Jenkins Engine Instance details: URL | Configuration State | Building | Site of the Instance. For any other changes you want to make, you must delete the Instance and recreate it.
- Click the Save button.
Integrating DevAT Jobs
Refers to Integrating DevAT Jobs
Refer to the following topics for other related Jenkins information: