DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

61
DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group

Transcript of DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Page 1: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps Best Practices for Mobile Apps

Sanjeev Sharma, as played by John LanutiIBM Software Group

Page 2: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Him• 18 year in the software industry• 15+ years he has been a solution

architect with IBM• Areas of work:

o DevOpso Enterprise Architectureo Agile Transformationo Mobile Developmento Software Delivery Platformso Software Supply Chains.

• Blog @ bit.ly/sdarchitect• Twitter: @sd_architect

Sanjeev [email protected].

comIBM Software Group

Page 3: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Me• 15 years in the software industry• 14 years with IBM, developer, PM, IT

Specialist• Areas of work:

o Application Developmento Agile Transformationo Mobile Developmento Application Lifecycle Management

• Blog http://attaboyjohn.wordpress.com/• Twitter: @johnlanuti

John [email protected]

IBM Rational

Page 4: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Agenda• What is DevOps?

• DevOps for Mobile – Challenges

• DevOps for Mobile – Best Practices

• Implementing DevOps for Mobileo Continuous Integration and Test

o Continuous Delivery

o Service Virtualization

Page 5: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

What is DevOps?

Page 6: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Addressing delivery challenges

Addressed by...Addressed by...

Agile Dev

Customers

Desire for fast and continuous innovation

Line of Business

Requirements

Dev & Test Teams

Code & Tests

Operations Team

Business Services

Gap Gap

DevOps

Water-SCRUM-Fall?

http://ibm.co/PRQkWL

Page 7: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Key Concepts1. Continuous Integration

2. Continuous Delivery

3. Continuous Test

4. Continuous Monitoring

5. Infrastructure as Code

6. Build and Delivery Pipeline

Page 8: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

1. Continuous Integration

http://bit.ly/PRQ4a7

Page 9: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

2. Continuous Delivery

http://bit.ly/PRQ4a7

Page 10: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

3. Continuous Test

http://bit.ly/PRQ9dQ

Page 11: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

4. Continuous Monitoring

http://bit.ly/PRQ9dQ

Page 12: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

5. Infrastructure as Code

package "apache2" do  package_name node['apache']['package']endservice "apache2" do  case node['platform_family']  when "rhel", "fedora", "suse"    service_name "httpd"    # If restarted/reloaded too quickly httpd has a habit of failing.    # This may happen with multiple recipes notifying apache to restart - like    # during the initial bootstrap.    restart_command "/sbin/service httpd restart && sleep 1"    reload_command "/sbin/service httpd reload && sleep 1"  

Page 13: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

6. Build & Delivery Pipeline

Page 14: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps for Mobile - Challenges

Page 15: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps for Mobile - Challenges

• Mobile Apps are the front-end to a complex(enterprise) back-end systemo Mobile Apps are rapidly becoming a

critical user interface to enterprise systems

Page 16: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile Application Architecture: LinkedIn

http://engineering.linkedin.com/testing/continuous-integration-mobile

Page 17: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps for Mobile - Challenges

• Fragmented Platformso iOS forked when iPad came

out. Android forked multiple times with each vendor, Kindle Fire, Nook…

Page 18: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps for Mobile - Challenges

• HTML5, PhoneGap/ Cordova still cannot fully replace native

Apps in every situationo Mobile Web is not an acceptable

solution. Users want an Appo Hybrid Apps are the optimal solution

for Apps with non-native needs

Page 19: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps for Mobile - Challenges

• App stores add additional asynchronous deployment stepo Continuous Delivery become

‘deliver and wait’

Page 20: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Delivery Pipeline

Deploy

EnvironmentRunning System

Source Control Management

Source Artifacts

.jsp

.java

.html

chef recipes

.sh

Deployable Artifacts

Build, Package,& Unit TestApplication Binaries & Platform Configuration

Library

Page 21: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM’s Four DevOps Principles

1. Collaborate across

Disciplines

2. Develop and test against

a production-like system

3. Deploy frequently

4. Continuously validate

operational quality

characteristics

Page 22: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

DevOps Best Practices for Mobile Apps

Page 23: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Continuous Integration and Continuous Delivery

1.Ensure end-to-end traceability across all assets

2.Practice continuous integration

3.Maintain separate streams for each mobile OS,

SDK supported

4.Use automated build and deploy scripts

DevOps Best Practices for Mobile Apps

Page 24: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Continuous Testing and Continuous Monitoring

5. Test each build on simulated and physical

devices

6. Virtualize and simulate back end services

7. Monitor the deployed mobile app and back end

services’ performance

DevOps Best Practices for Mobile Apps

Page 25: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile App Delivery

8. Governance of provisioning profiles, certificates

and API keys

9. Use a Private Development App Store to test

device deployment

10. Convert user feedback into user stories

DevOps Best Practices for Mobile Apps

Page 26: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

1. End-to-end Traceability, across all

Components

Build

Deliver Back-end

Services

Deliver App Code

Deliver App Code

Automate

Library

Deployable

Artifacts

SourceArtifacts

Fetch

Source Control

iOS Developer

AndroidDeveloper

Enterprise Services

Developer

Continuous Integration and Continuous Delivery

Page 27: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

2. Practice Continuous Integration

Continuous Integration and Continuous Delivery

Enterprise Services

Developent Teams

Mobile App Developent

Teams

Page 28: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

3. Maintain separate build areas for each

SDK version<manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" /> ...

</manifest>

Continuous Integration and Continuous Delivery

Page 29: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

4. Automated Build and Deploy scripts

Automated Scripts

Continuous Integration and Continuous Delivery

Page 30: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

5. Test each build on each supported

device

Continuous Testing and Continuous Monitoring

Page 31: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

6. Simulate Back-end Services

Heterogeneous Environments

Mobile App

Data Warehouse MainframeEnterprise Service

Bus

Directory Identity

App Under TestThird-partyServices

Portals

Third-partyServices

Test Environments to Production

Actual ServiceSimulated Service

Mobile App

Continuous Testing and Continuous Monitoring

Page 32: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

7. Monitor deployed apps and back end

services performance

Continuous Testing and Continuous Monitoring

Page 33: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

8. Governance of provisioning profiles, certificates and API

keys

Mobile App Delivery

Page 34: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

9. Use a ‘Private’ App store to test device

deployment

Mobile App Delivery

Page 35: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

10. Convert App Store feedback into user

stories

Mobile App Delivery

Page 36: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Implementing DevOps for Mobile

Apps

Page 37: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile Delivery Pipeline

Deploy

EnvironmentRunning SystemSource Control

Management

Source Artifacts

.jsp

.java

.html

chef recipes

.sh

Deployable Artifacts

Build, Package,& Unit TestApplication Binaries & Platform Configuration

Library

Mobile IDE

Enterprise

Services IDE

API keys, Provisioning Profiles…

Page 38: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Release Engineering

Environment Provisioning Automation

Configuration Automation

Change Manageme

nt

Continuous Delivery

Quality Management

Source Control

Management

Requirements Management

Continuous Integration

Test Automation

Deployment Library

OperationsDevelopment

Application Monitoring

Incident Managemen

t

Service Simulation

Release Manageme

nt

DevOps Reference Architecture

DataManageme

nt

Enterprise Services

IDE

Mobile App IDE

Page 39: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM’s DevOps for Mobile Solution –

Continuous Integration and Test

Page 40: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM Mobile Foundation

Enabling the development and delivery of mobile apps

Build, connect, manage and secure your mobile enterprise

Includes:• IBM Worklight • IBM WebSphere Cast Iron• IBM Endpoint Manager for

Mobile Devices

Plus New Services Offering

• IBM Software Services for Mobile Foundation

IBM Mobile Foundation

Page 41: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Compatible with prominent HTML5 libraries and tools:

App development using native and/or familiar web technologies:• HTML5• CSS3• JavaScript

App delivery in variety of forms:• Mobile Web app• Hybrid app• Native

IBM Worklight

Open, cost-effective, cross-platform app development

Page 42: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Worklight ServerMobile middleware offering unified push notifications, version management, security and integration

Worklight ConsoleA web-based console for real-time analytics and control of your mobile apps and infrastructure

Worklight StudioThe most complete, extensible development environment with maximum code reuse and per-device optimization

Worklight mobile platform overview

Worklight Runtime ComponentsExtensive libraries and client APIs that expose and interface with native device functionality and the Worklight Server

Page 43: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile simulator to simplify unit test

Page 44: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Worklight Server

Authentication

JSON Translation

Server-side Application Code

Adapter Library

Client-side App Resources

Direct Update

Mobile Web Apps

Unified Push Notifications

Sta

ts A

gg

reg

ati

on

Device Runtime

Ap

plica

tion

Cod

e

• Cross Platform Technology

• Security and Authentication

• Back-end Data Integration

• Post-deployment control and Diagnostics

Worklight runtime

architecture

Page 45: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Application distribution (for development and test)

A cross platform private mobile application store similar to public app stores but focused on the needs of an organization or a team

Key capabilities:• delivers distribution and

management of mobile applications within a company / teams

• easy distribution of iOS and Android apps within a team

• provides versioning and updates• centralizes rating and feedback

information• controls who can modify or

install an application• easy to install and simple to run

Page 46: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile Application Lifecycle Management

Mobile Application Platform

Application Lifecycle Management

IBM provides the only comprehensive mobile development solution currently in the market combining a mobile application platform, construction tools, and lifecycle management

Test

Development

Business

Open Lifecycle Integration Platform

Traceability acrossthe entire development lifecycle

Design

Code Test Deploy

Construct, debug, and test mobile UIs

IBM WorklightRational Solution for

Collaborative Lifecycle Management

Page 47: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Continuous Integration for Mobile

Page 48: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM’s DevOps for Mobile Solution –

Continuous Delivery

Page 49: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM SmartCloud Continuous Delivery

https://jazz.net/products/smartcloud-continuous-delivery/

50

Page 50: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM SmartCloud Continuous Delivery packaging

Build -> Publish -> Deploy -> Test

Extending Agile Development with Continuous Delivery

Mobile ALM (Rational Team Concert)

Agile Development

IBM SmartCloud Provisioning

Deployment to Virtual Systems

51

Page 51: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Design Management

IBM RationalSoftware Architect

Design Manager

Extending IBM SmartCloud Continuous Delivery

Performance Management

IBM SmartCloud Application.

Performance Management

Incident Management

IBM SmartCloud Control Desk..

IBM SmartCloud Provisioning

IBM PureSystems

IBM Workload Deployer

Mobile ALM (Rational

Team Concert)

Continuous Delivery

Deployment Automation

IBM Rational Automation Framework

Chef

Continuous Integration

IBM Rational Build Forge.

Hudson….

Jenkins….

Test Automation

IBM Rational... Quality Manager

IBM Green Hat

Extending CLM with Continuous delivery

Deployment to Cloud & Virtual Systems

52

Optional and alternative Integrations

Page 52: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM’s DevOps for Mobile Solution –

Service Virtualization

Page 53: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

55

What is Service Simulation and Test Virtualization?

Test Virtualization enables to create “virtual services”:oVirtual Services simulate the behavior of an entire application or system during testingoVirtual Services can run on commodity hardware, private cloud, public cloudoEach developer, tester can easily have their own test environmentoDeveloper and testers continue to use their testing tools (Manual, Web performance, UI test automation)

Cap

ture

& M

od

el

Cap

ture

& M

od

el

System dependencies are a key challenge in setting up test environments:Unavailable/inaccessible: Testing is constrained due to production schedules, security restrictions, contention between teams, or because they are still under development Costly 3rd party access fees: Developing or testing against Cloud-based or other shared services can result in costly usage feesImpractical hardware-based virtualization: Systems are either too difficult (mainframes) or remote (third-party services) to replicate via traditional hardware-based virtualization approaches

Heterogeneous Environments

Public CloudPrivate Cloud

Data Warehouse MainframeEnterprise

Service Bus

Directory Identity

File systems

Collaboration

Mobile App Under Test

Routing Service

Third-partyServices Portals

ContentProviders EJB

SharedServicesArchives

Business Partners

Messaging Services

Databases Mainframeapplications

Mobile App Under Test

Third-partyServices

Packaged apps, messaging services, etc.

Virtual Services

Page 54: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Incremental Integration Testing

Actual Service/App

Virtual Service/App

Test Virtualization is an enabler for continuous Integration Testing

Services, applications, systems are introduced into the continuous integration cycle in a prioritized, controlled fashion.

IBM Rational Test Virtualization

Solution

Mobile App under Test

Page 55: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

IBM Rational Test Virtualization Solution for continuous integration

and testing• Avoid time spent installing and configuring software just to discover

basic build issues• Smoke tests can be integrated as part of the continuous integration

process through deployment automation and test virtualization• Smoke test results are made available to the entire team to shorten

resolution

Assets ProductIncrement

Virtual Machines

App Server

Order Mgr

Virtual LabManager

Cloud Environment

CRM

VMCatalog

Build •Smoke Tests•Sandboxes•Self-provisionning

•Smoke Tests•Sandboxes•Self-provisionning

Page 56: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Wrap-up: DevOps Best Practices for

Mobile Apps

Page 57: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Continuous Integration and Continuous Delivery

1.Ensure end-to-end traceability across all assets

2.Practice continuous integration

3.Maintain separate streams for each mobile OS,

SDK supported

4.Use automated build and deploy scripts

DevOps Best Practices for Mobile Apps

Page 58: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Continuous Testing and Continuous Monitoring

5. Test each build on simulated and physical

devices

6. Virtualize and simulate back end services

7. Monitor the deployed mobile app and back end

services’ performance

DevOps Best Practices for Mobile Apps

Page 59: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Mobile App Delivery

8. Governance of provisioning profiles, certificates

and API keys

9. Use a Private Development App Store to test

device deployment

10. Convert user feedback into user stories

DevOps Best Practices for Mobile Apps

Page 60: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

Where to get more information?

• My Blog:o http://bit.ly/sdarchitect

• Leveraging DevOps in a water-SCRUM-fall Worldo http://ibm.co/PRQkWL

• IBM Enterprise DevOps blogo http://ibm.co/JrPVGR

Page 61: DevOps Best Practices for Mobile Apps Sanjeev Sharma, as played by John Lanuti IBM Software Group.

The IBM Technical Summit

Register by March 15 and save $300!

Top Five Reasons to AttendLearn how you can make the most of Agile, DevOps, Cloud, Mobile, Big Data, Social Business and other key trends to release products faster, improve processes, increase quality, and meet business objectives.

Get detailed Rational technical training trough hundreds of breakouts, hands-on technical workshops, open labs and a wide variety of certification testing

Explore Innovation Labs, observe interoperability in action and meet face to face with experts in a high-energy Exhibit Hall.

Network with over 4000 attendees from around the world and collaborate with your peers from a wide variety of roles, industries and locations.

Enjoy top-notch keynotes and entertainment, including strategic presentations, dynamic guest speakers and customer success stories.

Innovate 2013: The IBM Technical Summit is the event for software practitioners and product developers. Attendees will learn to

improve the practices, predictability and economics of software delivery through detailed Rational education and insights

into key technical trends!

ibm.com/innovate