DevOps Best Practices
for Mobile Apps
Me
• 18 year in the software industry • 15+ years he has been a solution
architect with IBM • Areas of work:
o DevOps
o Enterprise Architecture o Agile Transformation
o Mobile Development
o Software Delivery Platforms o Software Supply Chains.
• Blog @ bit.ly/sdarchitect • Twitter: @sd_architect
Sanjeev Sharma
Agenda
•
What is DevOps?
•
DevOps for Mobile – Challenges
•
DevOps for Mobile – Best Practices
•
Implementing DevOps for Mobile
o Continuous Integration and Test o Continuous Delivery
Addressing delivery challenges
Addressed by... Addressed by... Agile Dev CustomersDesire for fast and continuous innovation
Line of Business
Requirements
Dev & Test Teams
Code & Tests
Key Concepts
1. Continuous Integration
2. Continuous Delivery
3. Continuous Test
4. Continuous Monitoring
5. Infrastructure as Code
1. Continuous Integration
2. Continuous Delivery
3. Continuous Test
4. Continuous Monitoring
5. Infrastructure as Code
package "apache2" do package_name node['apache']['package'] end service "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.
DevOps for Mobile ‐ Challenges
•
Mobile Apps are the
front-end to a
complex(enterprise)
back-end system
DevOps for Mobile ‐ Challenges
•
Fragmented Platforms
o iOS forked when iPad came out. Android forked multiple times with each vendor,
DevOps for Mobile ‐ Challenges
•
HTML5, PhoneGap/
Cordova still cannot
fully replace native
Apps in every
situation
o Mobile Web is not an acceptable solution. Users want an App
DevOps for Mobile ‐ Challenges
•
App stores add
additional
asynchronous
deployment step
Mobile Application Architecture:
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
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
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
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
1. End-to-end
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>
5. Test each build on
each supported
device
6. Simulate Back-end
Services
Heterogeneous Environments Mobile App
Data Warehouse Mainframe Enterprise Service Bus Directory
Identity
App Under Test Third-party
Services
Portals
Third-party Services
Test Environments to Production Test Environments to Production
Actual Service Simulated Service Mobile App
7. Monitor deployed
apps and back end
services performance
8. Governance of
provisioning profiles,
certificates and API
keys
9. Use a ‘Private’ App
store to test device
deployment
10. Convert App Store
feedback into user
stories
Implementing
SCM Repository Automation Framework Provision pattern with build Provision system from pattern Get Packages, Profiles, Keys Apply configurations to system Virtual System Trigger build Cloud Provisioning System Mobile App IDE Post results to build Build Engine(s) Put configuration version Execute tests Application or Mobile Developer Media Library Publish packages Op Engineer Notify results Enterprise Services IDE Private Dev App Store Public App Store Execute tests Publish packages, Profiles, Keys Publish
Release Engineering Release Engineering Environment Provisioning Automation Configuration Automation Change Management Continuous Delivery Quality Management Source Control Management g Requirement s Management Continuous Integration Test Automation Deployment Library Operations Development Application Monitoring Incident Management Service
Simulation ManagementRelease
IBM’s DevOps for
Mobile Solution –
IBM Mobile Foundation
Enabling the development and delivery of mobile apps
Build, connect, manage and secure your mobile enterprise
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
Worklight Server Authentication JSON Translation Server‐side Application Code Adapter Library Client‐side App Resources Direct Update Mobile Web Apps Unified Push Notifications Stats Aggregation Device Runtime Application Code
• Cross Platform Technology
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 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
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 across the entire development lifecycleDesign Code Test Deploy
Construct, debug, and test mobile UIs
IBM’s DevOps for
Mobile Solution –
IBM SmartCloud Continuous Delivery
https://jazz.net/products/smartcloud‐continuous‐delivery/
IBM SmartCloud Continuous Delivery packaging
Build -> Publish -> Deploy -> Test
Extending Agile Development with Continuous Delivery
Design Management IBM Rational Software 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
51
Release Engineering Release Engineering Environment Provisioning Automation Configuration Automation Change Management Continuous Delivery Quality Management Source Control Management g Requirement s Management Continuous Integration Test Automation Deployment Library Operations Development Application Monitoring Incident Management Service
Simulation ManagementRelease
2012 Product Implementations
Data Management Rational
Build Forge Jenkins
IBM’s DevOps for
Mobile Solution –
54
What is Service Simulation and Test
Virtualization?
Test Virtualization enables to create “virtual
services”:
oVirtual Services simulate the behavior of an
entire application or systemduring testing
oVirtual Services can run on commodity
hardware, private cloud, public cloud
oEach developer, tester can easily have their
own test environment
oDeveloper and testers continue to use their
testing tools(Manual, Web performance, UI test automation) Capture & Model Capture & Model
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 fees Impractical 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 Cloud Private Cloud
Data Warehouse Mainframe Service BusEnterprise Directory
Identity
File systems Collaboration
Mobile App Under Test Routing Service Third-party Services Portals Content Providers EJB Shared Services Archives Business Partners Messaging Services Databases Mainframe applications Mobile App Under
Test
Third-party Services Packaged apps, messaging services, etc.
Incremental Integration Testing 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
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
Wrap‐up: DevOps
Best Practices for
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
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
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
Where to get more
information?
• My Blog:
o http://bit.ly/sdarchitect
• Leveraging DevOps in a water-SCRUM-fall World
o http://ibm.co/PRQkWL
• IBM Enterprise DevOps blog