2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode...

33
IMPACT 2014 © 2014 Copyright IBM Corporation Page 1 of 33 April 27 - May 1 Las Vegas, NV 2692 : Accelerate Delivery with DevOps with IBM Urbancode Deploy and IBM Pure Application System Lab Instructions Authors: Anujay Bidla, 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

Transcript of 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode...

Page 1: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 1 of 33

April 27 - May 1 Las Vegas, NV

2692 : Accelerate Delivery with DevOps

with IBM Urbancode Deploy and IBM Pure Application System

Lab Instructions

Authors: Anujay Bidla, 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

Page 2: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 2 of 33

1 LAB REQUIREMENTS AND OBJECTIVES ................................................................................. 3 1.1 What you should be able to do .......................................................................... 3 1.2 Prerequisite knowledge .................................................................................... 3 1.3 About the sample application ............................................................................ 3 1.4 Lab requirements ............................................................................................ 3

2 LAB INSTRUCTIONS ............................................................................................................................ 5 2.1 Hostnames, userIDs and passwords .................................................................. 5 2.2 End to end story ............................................................................................. 6

2.2.1 Actors ...................................................................................................... 6 2.2.2 Overall workflow........................................................................................ 7

3 ACTIVITIES ........................................................................................................................................... 7 3.1 Demo: Infrastructure Setup.............................................................................. 8 3.2 Demo: Project Initialization .............................................................................. 9 3.3 Activity: Deploying an Application ................................................................... 10

3.3.1 Login to IBM Urbancode Deploy and view the JKE Application ........................ 11 3.3.2 Locate the Environment which you will deploy the application into ................. 11 3.3.3 Review your Application Environement ....................................................... 12 3.3.4 Review the deployed Virtual System Instance in IBM Pure Application System . 13 3.3.5 Deploy the JKE Application into your Environment in IBM Urbancode Deploy ... 15 3.3.6 Monitor the Deployment process ............................................................... 17 3.3.7 View the JKE Application ........................................................................... 19

3.4 Activity: Creating Virtualized Test Service ........................................................ 19 3.4.1 Connect to your Rational Test Workbench instance ...................................... 19 3.4.2 Open Rational Integration Tester ............................................................... 21 3.4.3 Explore the Logical View model ................................................................. 22 3.4.4 Create a Stub .......................................................................................... 24 3.4.5 Deploy the Stub to Rational Test Control Panel ............................................ 27

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

4 WHAT YOU DID IN THIS EXERCISE ....................................................................................... 30 4.1 Content reviewed .......................................................................................... 30 4.2 Activities Completed ...................................................................................... 30

5 RESOURCES ..................................................................................................................................... 31 5.1 Lab Material ................................................................................................. 31 5.2 Related Demos and exercises ......................................................................... 31 5.3 General IBM Pure Application System information ............................................. 31

MY NOTES ............................................................................................................................................... 32

Page 3: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 3 of 33

1 Lab 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.1 What 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.2 Prerequisite 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.3 About the sample application

The sample application used in this lab will leverage two components. The client side

application is dependent upon an external 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 web service.

1. JKE Stock Quote –Client side application „under development‟

2. External WebService – The client application will pull information from http://finance.google.com/finance/info?client=ig&q=NYSE:IBM

1.4 Lab 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 deployed on IBM Pure

Application System Pattern

Configured project for JKE Banking Application. Rational Team Concert Project, Build

Definitions, linked to IBM UrbanCode Deploy Application, which has Cloud Connection

Page 4: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 4 of 33

to IBM Pure Application System and whose deployment process is configured to use

Rational Test Virtualization Server to mock out web service calls in Test

Environments.

Page 5: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 5 of 33

2 Lab Instructions

2.1 Hostnames, userIDs and passwords

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

each attendee:

Variable Meaning

<USERID>

<IBM Urbancode Deploy

URL>

https://192.168.111.38:8443

<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>

https://192.168.102.16/dashboard/welcome/

<IBM Pure Application

System User ID>

<USERID>

<IBM Pure Application

System User Password>

<USERID>

<ENV_HOST>

<JKE_URL> http://<ENV_HOST>:9080

<RTW IP Address>

Page 6: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 6 of 33

2.2 End 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:

https://jazz.net/wiki/bin/view/Deployment/Impact2014Lab

2.2.1 Actors

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 application 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.

Page 7: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 7 of 33

2.2.2 Overall workflow

3 Activities

Page 8: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 8 of 33

3.1 Demo: Infrastructure Setup

Page 9: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 9 of 33

3.2 Demo: Project Initialization

Page 10: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 10 of 33

3.3 Activity: 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.

Page 11: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 11 of 33

3.3.1 Login 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.2 Locate 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 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.

Page 12: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 12 of 33

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

<USERID>.

3.3.3 Review your Application Environment

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.

Page 13: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 13 of 33

3.3.4 Review 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

Page 14: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 14 of 33

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

Page 15: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 15 of 33

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.5 Deploy the JKE Application into your Environment in IBM Urbancode Deploy

Go back to the JKE Application view

Page 16: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 16 of 33

Run the Deploy Process

Select versions of the Application Components to deploy

Page 17: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 17 of 33

3.3.6 Monitor the Deployment process

Expand the steps to see the details

Page 18: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 18 of 33

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

Page 19: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 19 of 33

3.3.7 View the JKE Application

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

environment.

3.4 Activity: 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 web service, which provided a generated response for the 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 dig a little deeper and have a look at how this web service stub can

be created using Rational Test Workbench and Rational Test Virtualization Server.

3.4.1 Connect 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.

Page 20: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 20 of 33

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.

Page 21: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 21 of 33

Use the Full Screen mode.

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

3.4.2 Open Rational Integration Tester

Double-click the IBM Rational Integration Tester launcher on the desktop to

launch Rational Integration Tester.

Page 22: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 22 of 33

In the project selection dialog, ensure the project JKERITVirtualizationTests is

selected and click OK,

3.4.3 Explore 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.

Page 23: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 23 of 33

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.

Page 24: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 24 of 33

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 “finance/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.4 Create 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.

Page 25: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 25 of 33

In the Test Factory perspective, right-click the info operation in the hierarchy

and select New > Stubs > Stub using MEP.

Name the stub <USERID>_stockQuote where <USERID>is the username

assigned to you in 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.

Page 26: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 26 of 33

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.

Page 27: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 27 of 33

Right-click in the text area on the Value tab 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.5 Deploy 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.

Page 28: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 28 of 33

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.

Page 29: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 29 of 33

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.5 Demo: Continuous Integration and Deployment

Page 30: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 30 of 33

4 What you did in this exercise

4.1 Content 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.2 Activities 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.

Page 31: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 31 of 33

5 Resources

5.1 Lab Material

https://jazz.net/wiki/bin/view/Deployment/Impact2014Lab - Demos and material

used throughout this lab.

5.2 Related Demos and exercises

https://jazz.net/wiki/bin/view/Deployment/SDLCDemos - Demo of deploying

Rational Products on IBM Pure Application System

https://jazz.net/wiki/bin/view/Deployment/GreenHatPatternWorkbook - Workbook

using Test Virtualization with IBM Pure Application System

5.3 General 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

Page 32: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 32 of 33

My Notes

Page 33: 2692 : Accelerate Delivery with DevOps with IBM Urbancode ... · 3.3.1 Login to IBM Urbancode Deploy and view the JKE Application Login to  with user

IMPACT 2014

© 2014 Copyright IBM Corporation Page 33 of 33