IMPACT 2014

April 27 - May 1Las Vegas, NV

2692 : Accelerate Delivery with DevOps with IBM Urbancode Deploy and IBM Pure Application System

Lab Instructions

Authors:

AnujayBidla, DevOps and Continuous Delivery Specialist

Dennis W Schultz, Sr. IT Specialist - Rational Emerging Technologies

Zhi Cheng Liu, Rational Patterns Team Lead

Contributors:

Robbie Minshall, DevOps Technologist

Peter H Luckey, Rational Technical Segment Lead for DevOps

Randall Langehennig, Senior IT Specialist

Robert W Bogan, Rational DevOps Practice Leader

1Lab requirements and objectives

1.1What you should be able to do

1.2Prerequisite knowledge

1.3About the sample application

1.4Lab requirements

2Lab Instructions

2.1Hostnames, userIDs and passwords

2.2End to end story

2.2.1Actors

2.2.2Overall workflow

3Activities

3.1Demo: Infrastructure Setup

3.2Demo: Project Initialization

3.3Activity: Deploying an Application

3.3.1Login to IBM Urbancode Deploy and view the JKE Application

3.3.2Locate the Environment which you will deploy the application into

3.3.3Review your Application Environement

3.3.4Review the deployed Virtual System Instance in IBM Pure Application System

3.3.5Deploy the JKE Application into your Environment in IBM Urbancode Deploy

3.3.6Monitor the Deployment process

3.3.7View the JKE Application

3.4Activity: Creating Virtualized Test Service

3.4.1Connect to your Rational Test Workbench instance

3.4.2Open Rational Integration Tester

3.4.3Explore the Logical View model

3.4.4Create a Stub

3.4.5Deploy the Stub to Rational Test Control Panel

3.5Demo: Continuous Integration and Deployment

4What you did in this exercise

4.1Content reviewed

4.2Activities Completed

5Resources

5.1Lab Material

5.2Related Demos and exercises

5.3General IBM Pure Application System information

My Notes

1Lab requirements and objectives...... 2

1.1What you should be able to do...... 3

1.2Prerequisite knowledge...... 3

1.3About the sample application...... 3

1.4Lab requirements...... 3

2Lab Instructions...... 4

2.1Exercise instructions: hostnames, userIDs and passwords...... 4

2.2End to end story...... 5

3Activities...... Error! Bookmark not defined.

3.1Demo: Infrastructure Setup...... 7

3.2Demo: Project Initialization...... 8

3.3Activity: Deploying an Application...... 8

3.3.1Login to IBM Urbancode Deploy and view JKE Application Error! Bookmark not defined.

3.4Activity: Creating Virtualized Test Service...... 18

3.4.1Connect to your Rational Test Workbench instance...... 18

3.4.2Open Rational Integration Tester...... 20

3.4.3Explore the Logical View model...... 21

3.4.4Create a Stub...... 23

3.4.5Deploy the Stub to Rational Test Control Panel...... 25

3.5Demo: Continuous Integration and Deployment...... 27

4What you did in this exercise...... 28

4.1Content reviewed...... 28

4.2Activities Completed...... 28

5Resources...... 29

5.1Lab Material...... 29

5.2Related Demos and exercises...... 29

5.3General IBM Pure Application System information...... 29

5.4Generally recommended Articles...... Error! Bookmark not defined.

6My Notes...... 30

1Lab requirements and objectives

Time needed to complete this exercise: 1 hour

The scenario in this lab looks into the development, test and deployment of an application. The application used in this scenario is the JKE Banking Application. This application is available as a sample Application with Rational Collaborative Lifecycle Management.

1.1What you should be able to do

At the end of this lab you should be able to:

  • Understand components, relationships and roadmap for setting up a DevOps Pipeline
  • Understand how to provision infrastructure using IBM Pure Application System
  • How to deploy an application using IBM Urbancode Deploy
  • How to create a ‘stub’ in order to develop and test an application that is dependent upon external services
  • Where to get additional information and demonstrations

1.2Prerequisite knowledge

This lab assumes you’re familiar with:

  • IBM WebSphere Application Server features and functionality
  • Application development and deployment basics
  • Basic knowledge of IBM Pure Application System features and purpose

1.3About the sample application

The sample application used in this lab will leverage two components. The client side application is dependent upon an external WebService web service for stock quote information. In this scenario we will be looking at how to leverage IBM Pure Application System and IBM Urbancode Deploy to provision and test this application in an environment where the engineers do not have access to the external WebServiceweb service.

  1. JKE Stock Quote –Client side application ‘under development’
  2. External WebService – The client application will pull information from

1.4Lab requirements

These steps have been completed prior to the lab. More details are provided in the overall workflow section and wiki:

  • Access to PureApplication System, installed with the latest firmware and pattern types.
  • IBM Software Delivery and Lifecycle Patterns installed and Deploy deployed on IBM Pure Application System Pattern
  • Configured Project project for JKE Banking Application. Rational Team Concert Project, Build Definitions, linked to IBM UrbanCode Deploy Application, which has Cloud Connection to IBM Pure Application System and whose deployment process is configured to use Rational Test Virtualization Server to mock out WebService web service calls in Test Environments.

2Lab Instructions

2.1Hostnames, userIDs and passwords

Instructions and subsequent documentation use the following variables that are specific to each attendee:

Variable / Meaning
<USERID>
<IBM Urbancode Deploy URL /
IBM Urbancode Deploy UserID / <USERID>
IBM Urbancode Deploy Password / <USERID>
Rational Test Workbench UserID / virtuser
Rational Test Workbench Password / Impact2014
IBM Pure Application System URL /
IBM Pure Application System User ID / <USERID>
IBM Pure Application System User Password / <USERID>
<ENV_HOST>
<JKE_URL> / <ENV_HOST>:9080
RTW IP Address

2.2End to end story

This Lab is divided into two types of activities: Demos and Activities. The objective is to provide an overview of the setup and lifecycle of an application as well as providing hands on experience.

The following diagram provides the overall roadmap:

Demos and materials used throughout the lab will be available on a wiki:

2.2.1Actors

Admins Adam’s role is to provide shared infrastructure to the development communities. He is the Administrator for IBM Pure Application System and can configure Shared Services.

Ted leads up a development organization that is creating the JKE banking application. He understands the aApplication design and collaborates with Admin on his teams requirements for shared services.

Evan is a member of Ted’s team. His role as a test engineer requires that he can make changes to the JKE banking application, deploy and test those changes on a continuous basis.

2.2.2Overall workflow

3Activities

3.1Demo: Infrastructure Setup

3.2Demo: Project Initialization

3.3Activity: Deploying an Application

The following diagram provides an overview of both the provisioning and deployment steps. This activity will walk through the area highlighted in blue which involves deploying the application to a provisioned environment.

3.3.1Login to IBM Urbancode Deploy and view the JKE Application

Login to <IBM Urbancode Deploy URL>with user <USERID>,and password <USERID>:

Navigate to Applications:

Select the JKE Application:

3.3.2Locate the Environment which you will deploy the application into

IBM Urbancode Deploy provides an application centric view of the world. Looking at the Environments tab of the application, you can see where and what versions of the an application is deployed.

An Environment has been pre-provisioned for each user using blueprints. Blueprints provide the integration between IBM Urbancode Deploy and IBM Pure Application System. Each user has an isolated testing environment. In this lab we will be deploying a new version of the JKE application into your environment.

Locate the environment for your userID. The environment name will be labeled testenv-<USERID>.

3.3.3Review your Application EnvironementEnvironment

Click on your environment.

Note the resources that represent the deployed virtual machine, and application server that you will be deploying the JKE Application into.

3.3.4Review the deployed Virtual System Instance in IBM Pure Application System

Open a new browser window and login to <IBM Pure Application System URL>with <USERID>and<USERID>

Navigate to Workload Console

Navigate to Virtual System

Locate your Virtual System Instance that was deployed from IBM Urbancode Deploy.

Review the details of the Virtual System Instance

Optionally take a snapshot of the Instance in this state

Important: Write down the IP address of this machine as <ENV_HOST> and update <JKE_URL> in the Variable table in section 2.1

Switch back to the IBM Urbancode Deploy browser window.

3.3.5Deploy the JKE Application into your Environment in IBM Urbancode Deploy

Go back to the JKE Application view

Run the Deploy Process

Select versions of the Application Components to deploy

3.3.6Monitor the Deployment process

Expand the steps to see the details

When complete go back to the Application Environment and note the deployed application

3.3.7View the JKE Application

Open a browser to the <JKE_URL> that you previously wrote down when reviewing the environment.

3.4Activity: Creating Virtualized Test Service

In activity 3.3 you deployed and tested the JKE Application. This deployment process included a step that configured the JKE Application to leverage a proxy server for the external WebServiceweb service, which provided a generated response for the WebService web service call. This allows for the continuous development, integration and test of an application without requiring all the dependent services to be available within the environment.

In this section we will deep dig a little deeper and have a look at how this WebService web service stub can be created using Rational Test Workbench and Rational Test Virtualization Server.

3.4.1Connect to your Rational Test Workbench instance

Each participant in the workshop already has an instance of a Rational Test Workbench workstation running in the IPAS environment. You will use a Virtual Network Connection (VNC) client to access the workstation’s desktop from your laptop. Use the <RTW IP Address> from section 2.1 to access your instance.

Note. You can also view your RTW instance in IBM Pure Application System in a similar way that you located your deployed test environment.

  • From your workstation open the VNC Client
  • Enter the value for VNC Server in the following format: <RTW IP Address>:2 where RTW IP Address is the address assigned to you per the table, above.
  • Click Connect
  • In the VNC Viewer – Authentication dialog, enter the password “Impact2014” and click OK.
  • Use the Full Screen mode.

NOTE: To exit Full Screen mode use Ctl-Alt-Shift-F

3.4.2Open Rational Integration Tester

  • Double-click the IBM Rational Integration Tester launcher on the desktop to launch Rational Integration Tester.
  • In the project selection dialog, ensure the project JKERITVirtualizationTests is selected and click OK,

3.4.3Explore the Logical View model

The Logical View of the Architecture School perspective of Rational Integration Tester enables you to visually model the relevant aspects of the system architecture. The new Stock Quote feature of the JKE Banking application will leverage an API operation named info provided by Google Finance. This relationship has been defined in the model for you.

  • Right-click the GoogleFinance HTTP connection in the diagram and select Physical Resource. The settings of the physical web server model element define the host and port of the server hosting the info service.
  • Click the Test Transport button near the bottom of the Web Server dialog. Note that since our IPAS environment does not have access to the internet, we are unable to connect with the public server finance.google.com. This would normally stop our testing but in the following sections, we will use Rational Integration Tester to create a stub that will virtualize the Google service.
  • Dismiss the Transport Test and the Web Server dialogs by clicking OK twice.
  • Double-click the info operation in the Logical View model. The Message Exchange Pattern defines how the operation exchanges messages and the format of those messages. For instance, the info operation employs a Request/Reply pattern as is typical for web services. It uses the HTTP GET method over the GoogleFinance HTTP connection and is rooted at the resource path “fianancefinance/info”. The request will conform to the GoogleFinance REST schema that has been defined for you.
  • Click Cancel to dismiss the info operation dialog.

3.4.4Create a Stub

You will now create a virtualized service or “stub” using the model. The creation of artifacts such as stubs and tests is done in the Test Factory perspective.

  • Click the Test Factory perspective button on the toolbar.
  • In the Test Factory perspective, right-click the info operation in the hierarchy and select New > Stubs > Stub using MEP.
  • Name the stub <USERID>LabUserXX_stockQuote where <USERID>LabUserXX is the username assigned to you by the instructorin the table in section 2.1.

Rational Integration Tester stubs provide many powerful options that enable you to develop anything from very simple stubs that simply reply with a fixed response message to complex stubs that maintain state and respond dynamically based on the request data. Stubs can even respond to requests that meet a certain criteria while passing other requests on to a live service using a feature called “Sift and Pass-through”. Because of the very limited time available in this workshop, you will create a simple stub that replies with a static response.

  • Click on the Output tab in the middle of the Stub properties view. Since the model in the Logical View did not define a schema for the response, it defaults to a blank text string.
  • A simple way to define the response is to paste a sample of the response data into the text field and let Rational Integration Tester format it for you. Minimize IBM Rational Integration Tester so you can see the desktop.
  • Double-click the SampleResponse.txt text file to open it in KWrite – a text editor.
  • Select the entire contents of the file (Ctrl-A) and copy it to the clipboard (Ctrl-C). Close the KWrite editor.
  • Click Rational Integration Tester on the taskbar to maximize it.
  • Double-click on the text (String) node in the message area to open the field editor.
  • Right-click in the text area on the Valuetab and select Paste. Click OK to close the Field Editor.
  • Rational Integration Tester immediately recognizes the text content as JSON (JavaScript Object Notation) data and displays it in a name-value pair format. This makes the data much easier to read for a user and makes each field value accessible for substitution from variables, data files, database entries or even the results of custom code calculations.
  • Save the stub.

3.4.5Deploy the Stub to Rational Test Control Panel

Stubs can be executed directly from Rational Integration Tester. This is very useful when you are first developing and testing stubs, but once you are ready to share your stub with another tester, your entire team or even the entire enterprise, you can publish that stub to the Rational Test Virtualization Server.

  • Right-click the info operation in the navigator and select Publish Stubs. Accept the defaults in the Publish Stubs dialog and click Publish. When publishing is complete, click OK.
  • Minimize Rational Integration Tester so you can see the desktop.
  • Double-click the Link to Rational Test Control Panel launcher on the desktop to open the Rational Test Control Panel component of Rational Test Virtualization Server. The Rational Test Control Panel is the control interface for all of the components of Rational Test Virtualization Server.
  • Log in with username “admin” and password “admin”.
  • On the home page, click the VIE (Virtualized Integration Environment) image.
  • Select the default_domain domain and the DEV environment and click View Dashboard. On the dashboard you will see all of the operations in all the service components for the environment.
  • Click the green plus sign next to the info operation.
  • From this dialog, you are able to start any version of any stub of the info operation that has been published to the Rational Test Control Panel. The list of stubs you see will vary as other lab participants finish deploying their stubs.
  • Click Cancel to exit the dialog without starting a stub. We have already started a stub for the Google Finance service that we will use in the next activity.

3.5Demo: Continuous Integration and Deployment

4What you did in this exercise

4.1Content reviewed

You reviewed an overall scenario for Continuous Integration, Test and Deployment of JKE Application. You reviewed the relationship between IBM Urbancode Deploy and IBM Pure Application System for deployment, and how Test Virtualization can be used to test applications that are dependent upon external services.

4.2Activities Completed

Used IBM Urbancode Deploy to deploy an application to an environment that had been provisioned on IBM Pure Application System. Created a ‘stub’ to mock out a call to an external WebService to facilitate development of test of an application when those services may not be available or desirable to call directly.

5Resources

5.1Lab Material

  • - Demos and material used throughout this lab.

5.2Related Demos and exercises

  • - Demo of deploying Rational Products on IBM Pure Application System
  • - Workbook using Test Virtualization with IBM Pure Application System

5.3General IBM Pure Application System information

  • IBM PureApplication System – Marketing information about the product
  • IBM PureApplication System Version 1.0 Information Center – Technical information about the product
  • IBM PureSystems Centre – Patterns available to purchase and install in the product
  • IBM PureSystems resources on developerWorks – Technical articles about the product

My Notes

© 2014 Copyright IBM CorporationPage 1 of 33