2012 Nolio Ltd. All rights reserved The information contained herein is proprietary and confidential. No part of this document may be reproduced without explicit prior written permission from Nolio Ltd.
Contents Contents Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers... 4 Overview... 4 Workflow... 4 Basic Concepts... 5 Related Documentation... 5 Technical Support... 6 Installing and Uninstalling Nolio Hudson/Jenkins Plugin... 7 Requirements and Supported Versions... 7 Retrieving Nolio Plugin... 7 Updating Plugin on Hudson/Jenkins... 8 Uninstalling Nolio Plugin... 8 Configuring for Continuous Integration... 9 About Triggering Nolio Processes... 9 Using Hudson Parameters...10 Selecting a Build Job...10 Defining Parameters for Use in Build Job...11 Configuring a Build Job...12 Importing Custom Certificates...15 Copying a Job...16 Creating Generic Nolio Deployment Processes...16 Running and Monitoring a Build Job... 17 Continuous Integration Build Progress...17 Nolio Deployment Process...18 Process Execution Pane...18 Viewing a Process Run...18 Viewing Process Details...19 Viewing Events...20 Resources... 21 Hudson Continuous Integration Server...21 Jenkins Continuous Integration Server...21 Nolio Zero Touch Deployment with MS TFS...21 Index... 22 Zero Touch Deployment 3
Guide to Plugin for Hudson/Jenkins 2.0Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers Chapter 1 Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers In This Chapter Overview...4 Workflow...4 Basic Concepts...5 Related Documentation...5 Technical Support...6 The following topics introduce the Nolio Zero Touch Deployment (ZTD) Plugin for Hudson and Jenkins Continuous Integration (CI) Server concepts and workflow for Nolio Application Release Automation. Note: The Jenkins application is used in procedures and examples as the interface is the same as for Hudson. Overview The Nolio Plugin allows Hudson and Jenkins users to execute Nolio processes after a build has finished successfully. The process can be designed for any type of activity, such as, deployment, maintenance, notification. Integrating the Nolio ZTD solution with Hudson or Jenkins CI enables agile deployment and sanity checking with every build. Continuous deployments are realized allowing development teams to easily deploy multiple times a day. Workflow With the Nolio Plugin for Hudson/Jenkins, users can implement a CI solution in three steps: 1. In Hudson/Jenkins, create a new job. 2. In Nolio ASAP Release Automation, create a complete application tree with a matching generic process to deploy, manage, or report the build. 3. Define optional Hudson/Jenkins parameters to be used in the Nolio process run. 4 Zero Touch Deployment
Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers 4. Configure the Hudson/Jenkins build job to run the matching Nolio post-build process upon completion. Basic Concepts In Hudson/Jenkins, a build job is created and configured to run a matching Nolio ASAP Release Automation process as a 'post-build run'. The post-build run performs actions on and related to the build. In Nolio ASAP Release Automation, a matching process is created to deploy the successful Hudson/Jenkins build. Nolio ASAP Release Automation process names are created with names matching the Hudson/Jenkins build name. Nolio ASAP Release Automation allows full deployment on a variety of environments. Related Documentation The Nolio Application Release Automation Documentation Set also includes the following: Nolio Application Release Automation Actions Reference Guide - Nolio-installed action templates and categories. Nolio Application Release Automation Applications Support Matrix for Actions - Supported applications for Nolio-installed actions. Nolio Application Release Automation Application Interface Guide - Using Nolio APIs for Command Line Interface (CLI), REST and SOAP. Nolio Application Release Automation Custom Actions SDK - Implementing a custom actions library. Nolio Application Release Automation Introduction to Nolio - Getting started with Nolio. Nolio Application Release Automation Installation and Administration Guide - Installing and administering Nolio Application Release Automation. Nolio Application Release Automation Release Notes - Details of new features, enhancements, resolved issues, and how to upgrade to latest version of Nolio Application Release Automation. Nolio Application Release Automation Security Description - Information on Nolio Application Release Automation security and certificates. Nolio Application Release Automation System Upgrade Guide - Upgrading to the latest version of Nolio Application Release Automation. Nolio ASAP Release Automation User Guide - Using Nolio ASAP Release Automation to develop and execute automated release processes. Nolio Dashboard User Guide - Using Nolio Dashboard. Nolio Release Operations Center User Guide - Using Nolio Release Operations Center. Zero Touch Deployment 5
Guide to Plugin for Hudson/Jenkins 2.0Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers Nolio Zero Touch Deployment Plugin for Microsoft Team Foundation Server (TFS) - Installing and running the Nolio Plugin for Microsoft TFS. Nolio Zero Touch Deployment Plugin for ServiceNow - Installing and running the Nolio Plugin for Service Now. Technical Support If you have any questions, please feel free to contact Nolio technical support. Telephone: North America Toll free number: 1-888-869-8485 - ext. 1 United Kingdom Toll free number: 0-800-680-0429 - ext. 1 Email: support@noliosoft.com Online: http://www.noliosoft.com/support 6 Zero Touch Deployment
Installing and Uninstalling Nolio Hudson/Jenkins Plugin Installing and Uninstalling Nolio Hudson/Jenkins Plugin Chapter 2 In This Chapter Requirements and Supported Versions...7 Retrieving Nolio Plugin...7 Updating Plugin on Hudson/Jenkins...8 Uninstalling Nolio Plugin...8 The installation process consists of: 1. Requesting the plugin from Nolio 2. Downloading the plugin file to the Hudson/Jenkins installation 3. Updating Hudson/Jenkins CI with the plugin 4. Optionally, uninstalling Nolio Hudson/Jenkins plugin Requirements and Supported Versions The Nolio Plugin does not necessitate any additional requirements than those for the Hudson and Jenkins applications. Supported versions are: Hudson - versions 2.01 and higher Jenkins - 1.443 Retrieving Nolio Plugin To retrieve the Nolio Plugin: 1. At the Nolio Zero Touch Deployment for Hudson/Jenkins Web site, register to get the download: http://www.noliosoft.com/solutions/hudson-ci 2. When you receive the confirmation message, download the plugin installation file to a local folder, such as $HUDSON_HOME/plugins. Zero Touch Deployment 7
Guide to Plugin for Hudson/Jenkins 2.0 Installing and Uninstalling Nolio Hudson/Jenkins Plugin Updating Plugin on Hudson/Jenkins Note: The following procedure is also relevant for Hudson with the appropriate substitutions. To update Jenkins CI with the Nolio plugin: 1. Log on to Jenkins Web page. 2. Click Manage Jenkins. The Manage Jenkins window displays. 3. Click Manage Plugins. The Update Center browser tab opens. 4. Click the Advanced tab. 5. In the Upload Plugin section, click Choose File. 6. Browse and select the hpi file downloaded from Nolio. 7. Click Upload. 8. Restart Jenkins (Service Tomcat6-Jenkins). Uninstalling Nolio Plugin Note: The following instructions are also valid for uninstalling the Hudson plugin. To uninstall the Jenkins Plugin: 1. Stop the Jenkins service. 2. Remove the Nolio folder from C:\jenkins\plugins. 3. Remove the installer hpi files from C:\jenkins\plugins. 4. Restart the Jenkins service. 8 Zero Touch Deployment
Configuring for Continuous Integration Configuring for Continuous Integration Chapter 3 In This Chapter About Triggering Nolio Processes...9 Using Hudson Parameters... 10 Selecting a Build Job... 10 Defining Parameters for Use in Build Job... 11 Configuring a Build Job... 12 Importing Custom Certificates... 15 Copying a Job... 16 Creating Generic Nolio Deployment Processes... 16 The configuration process consists of two steps: 1. Configuring a Jenkins Build Job 2. Creating a generic Nolio post-build deployment process Note: For illustrative purposes, examples and procedures refer to Jenkins as the user interface is identical to Hudson. About Triggering Nolio Processes The Nolio deployment process is triggered by the successful completion of a Jenkins build job. Configure each Jenkins build job to trigger a matching deployment process within Nolio ASAP Release Automation. A Nolio process is distinguished at three levels: Application name Environment Process name User name defines the credentials under which the process will run assuming that the user has privileges to execute the process. Zero Touch Deployment 9
Guide to Plugin for Hudson/Jenkins 2.0 Configuring for Continuous Integration Using Hudson Parameters Hudson parameters may be used as input to the following Run Nolio Process options: Host Name User Name Password Process Name Application Environment Job Name It is not necessary for the input strings to the above fields to be only one parameter or value. It is possible to combine several parameters together with fixed characters to develop unique and informative strings. For example, QA_${build}_${myParam} Before Hudson parameters may be used in the Run Nolio Process options, the build must be defined as 'parameterized' and each parameter to be used in Nolio defined with a name and default value. Selecting a Build Job To select a build job for Nolio: 1. Click on the main Jenkins link to go to the Jenkins Dashboard. 10 Zero Touch Deployment
Configuring for Continuous Integration The Dashboard with a list of build job names will display. 2. Click the name of a build job, such as Nolio Financial Application. The Nolio Financial Application Configuration tab will display. Defining Parameters for Use in Build Job There is no requirement to use Hudson/Jenkins parameters in the Nolio process run. If you are not using Hudson/Jenkins parameters, see Configuring a Build Job (on page 10). To define Parameter for Nolio: 1. In the Hudson Dashboard, click Configure. The configuration window appears. 2. Enter the Project name and description for the build. 3. Select the This build is parameterized check box. Zero Touch Deployment 11
Guide to Plugin for Hudson/Jenkins 2.0 Configuring for Continuous Integration 4. In the data type Parameter definition boxes, enter the parameter Name and Default Value for each Hudson parameter to be used in the Run Nolio Process. 5. Click the button. 6. Continue making the appropriate option selections for the build. Configuring a Build Job To configure a build job: 1. In the Post-build Actions section of the Configure page, select the Run Nolio Process checkbox. The Run Nolio Process options appears. 12 Zero Touch Deployment
Configuring for Continuous Integration Note: To use a Jenkins-defined parameter in an option box, enclose the parameter in curly brackets ({ }) and precede the enclosed parameter by a dollar sign ($), for example, ${myappl}. Jenkins-defined parameters may be entered for Host Name, User Name, Password, Process Name, Application, Environment, and Job Name. 2. Click next to an entry box for complete option information. 3. In the Host Name box, enter 'localhost' or other Nolio host name. 4. In the Port box, enter the relevant Nolio port number. Default is 8080. 5. In the User Name box, enter the user name under which the Nolio process will run. The user should have execution permissions for the target process. 6. In the Password box, enter the password for the Nolio User Name. Zero Touch Deployment 13
Guide to Plugin for Hudson/Jenkins 2.0 Configuring for Continuous Integration 7. In the Process Name box, enter the name of the matching Nolio ASAP Release Automation deployment process. For processes in a subfolder, the Process Name should be /processes/subfolder/processname. 8. In the Application Name box, enter the name of the Nolio ASAP Release Automation Application, for example, Nolio Financial Application. 9. In the Environment Name box, enter the name of the Nolio ASAP Release Automation Environment, for example, Two Servers. 10. In the Job Name box, enter the name of the job. Each Job Name represents a single execution of the Nolio process. 11. In the Parameters box, enter one or more parameters, in the relevant type format, for Nolio UI values and Jenkins-generated process values. IMPORTANT: All Nolio parameters must reference parameters defined as User Input in Nolio UI. Nolio Server Type parameters are preceded by the agent ID and the Server Type name: agentid/servertypename/parametername=value Note: Each agent assigned to a Server Type must be defined and mapped to the Server Type in the Agents box below. Nolio Process parameters are preceded by the fixed string Application Parameters/ : Application Parameters/processParameterName=value Nolio Application parameters are preceded by the fixed string Application Parameters/ : Application Parameters/applicationParameterName=value Jenkins-generated process parameters based on execution build number (${build}), build ID (${build_id}), and project name (${project}) values. Jenkins-generated process parameters are preceded by a dollar sign ($) and enclosed in curly brackets ({}). buildnumber=${build},projectname=${project},buildid=${build_id} Click the Parameters Help tip for complete descriptions, formats, and examples. 12. In the Agents box, enter the agents mapped to each Server Type defined as a parameter in the Parameters box above using the format: servertypename=agent1,agent2 Use two commas (,,) to separate Server Types. Agent mapping reflects the relationship defined for an Environment in Nolio UI. Define dependencies between Agents in the Agents Dependencies box. 14 Zero Touch Deployment
Configuring for Continuous Integration 13. In the Agents Dependencies box, enter necessary dependencies between Agents defined in the Agents box using the format: dependentservertype1/dependentagent1=servertype2/agent2 The start of processing on host1 is dependent on completion of processing on host2. The dependencies option reflects the relationship defined in the Dependencies tab of the Run Process dialog in Nolio UI. 14. If requested by Nolio Support to display debug messages in the log, select the Show Debug messages check box. 15. To run the job asynchronously, select the Run Process Asynchronously check box. Note: With this option it will not be possible to determine if job finished. Selecting this option causes the job to return only the Job ID of the process, but not the process status. 16. If you want to allow Nolio to work with custom certificates, select the Use SSL check box. See Importing Custom Certificates (on page 15). 17. To reset successful Jenkins builds to 'failed' if the Nolio ASAP Release Automation process fails, select the Fail Build if Nolio Process fails check box. Note: It is recommended to select the Fail Build option. 18. If you want to run the Nolio process regardless if the build passed successfully, clear the Run Nolio Process only if build succeeded check box. Default value is to run the process only if the build passed successfully. 19. Click to store the configuration for the Nolio Financial Application build. 20. Repeat the configuration process for each Hudson/Jenkins build to be deployed by Nolio ASAP Release Automation. Importing Custom Certificates To import a custom certificate to the local truststore: 1. In the UI, configure the application build job as follows: a. In the Port box, enter 8443 (default HTTPS port). b. In the Advanced Nolio Options section, select the User SSL check box. 2. On the Jenkins server, import the server certificate to the local truststore, by running the following command: Zero Touch Deployment 15
Guide to Plugin for Hudson/Jenkins 2.0 Configuring for Continuous Integration keytool -import -v -trustcacerts -alias alias -file certificate.pem -keystore $JAVA_HOME/jre/lib/security/cacerts password changeit 3. Restart the Jenkins service. Copying a Job To copy a job: 1. In the Jenkins Dashboard, click New Job. 2. In the Copy Existing Job box, enter the job name to copy and click OK. 3. Enter a new name for the job and edit the configuration as needed. 4. Click OK. Creating Generic Nolio Deployment Processes In the Nolio ASAP Release Automation UI, create a deployment process with the same name as the Jenkins Build Job. When creating the deployment process, you may set parameters and values. 16 Zero Touch Deployment
Running and Monitoring a Build Job Running and Monitoring a Build Job Chapter 4 In This Chapter Continuous Integration Build Progress... 17 Nolio Deployment Process... 18 After a build is started in Jenkins, you can follow the build progress from completion on Jenkins to its deployment using Nolio ASAP Release Automation UI. Continuous Integration Build Progress You can track the status of a Jenkins build by viewing the Build Queue and Build Executor Status tables in the Dashboard tab. Note: It is recommended to select the Fail Build if Nolio Process fails check box in the Advanced Nolio Options section of the build configuration. You can also view the progress of a Jenkins Build by viewing the build job log from the application console tab. Note: Jenkins is used in all examples as the interface is the same as for Hudson. Zero Touch Deployment 17
Guide to Plugin for Hudson/Jenkins 2.0 Running and Monitoring a Build Job Nolio Deployment Process In Nolio ASAP Release Automation you can follow the progress of the deployment process using a variety of UI options. See "Process Execution Pane" in Nolio ASAP Release Automation User Guide for complete details for viewing and controlling process jobs. Process Execution Pane In the Nolio UI, select the Environments panel and select the deployment process which matches the CI build. The process execution pane displays. Viewing a Process Run The Process View displays the execution of the process currently being run. It does so using the same process diagram that was designed for a given environment in Nolio ASAP Release Automation. However, the graphic depiction of the process is dynamic, thereby enabling you to visually trace the run's progress. 18 Zero Touch Deployment
Running and Monitoring a Build Job Viewing Proces s Details The Detailed View displays the current status, overall progress, and current step being executed both by server type, and each of the individual instances of each type, involved in the process run. Process run status Instance Status Progress Current Step Displays The name of the server type or the name of the server Current status of the server Current progress Current running action on this server When a process starts, one of the standard preparation steps that is not contained within the designed process is copying files from the central server to the target agents. The progress of copying files to the agents is displayed in the Detailed View tab as follows: In the Status column, 'File Distribution' appears. In the Progress column the percentage of the total files copied appears. In the Current Step column, the number of bytes copied and the total number of bytes to be copied appears. Zero Touch Deployment 19
Guide to Plugin for Hudson/Jenkins 2.0 Running and Monitoring a Build Job Viewing Events The Events View displays a table of notifications related to the execution of a process. To view the events of a process run: Click the Events View tab to display the information shown in the following table. Table 1: Process Status Events View Process status Event Source Step Start End Comments Displays Any one or more of the event filters The server name and IP The name of the action Start time End time Results or comments on the current event 20 Zero Touch Deployment
Resources Appendix A Resources In This Appendix Hudson Continuous Integration Server... 21 Jenkins Continuous Integration Server... 21 Nolio Zero Touch Deployment with MS TFS... 21 Following are some of the available online resources: Hudson Continuous Integration Server Find out everything about Hudson CI at http://hudson-ci.org/ Jenkins Continuous Integration Server Find out everything about Jenkins CI at http://jenkins-ci.org/ Nolio Zero Touch Deployment with MS TFS Find out more about Zero Touch Deployment with Microsoft TFS 2010 at http://www.noliosoft.com/solutions/tfs Zero Touch Deployment 21
Guide to Plugin for Hudson/Jenkins 2.0 Index Index A About Triggering Nolio Processes 9 B Basic Concepts 5 C Configuring a Build Job 12 Configuring for Continuous Integration 9 Continuous Integration Build Progress 17 Copying a Job 16 Creating Generic Nolio Deployment Processes 16 D Defining Parameters for Use in Build Job 11 H Hudson Continuous Integration Server 21 I Importing Custom Certificates 15 Installing and Uninstalling Nolio Hudson/Jenkins Plugin 7 Introducing Nolio Plugin for Hudson/Jenkins Continuous Integration Servers 4 R Related Documentation 5 Requirements and Supported Versions 7 Resources 21 Retrieving Nolio Plugin 7 Running and Monitoring a Build Job 17 S Selecting a Build Job 10, 11 T Technical Support 6 U Uninstalling Nolio Plugin 8 Updating Plugin on Hudson/Jenkins 8 Using Hudson Parameters 10 V Viewing a Process Run 18 Viewing Events 20 Viewing Process Details 19 W Workflow 4 J Jenkins Continuous Integration Server 21 N Nolio Deployment Process 18 Nolio Zero Touch Deployment with MS TFS 21 O Overview 4 P Process Execution Pane 18 22 Zero Touch Deployment