Transcript Document
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 o o o o o DevOps Enterprise Architecture Agile Transformation Mobile Development Software Delivery Platforms Software Supply Chains. • Blog @ bit.ly/sdarchitect • Twitter: @sd_architect Sanjeev Sharma [email protected] IBM Software Group Me • 15 years in the software industry • 14 years with IBM, developer, PM, IT Specialist • Areas of work: o o o o Application Development Agile Transformation Mobile Development Application Lifecycle Management • Blog http://attaboyjohn.wordpress.com/ • Twitter: @johnlanuti John Lanuti [email protected] IBM Rational 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 o Service Virtualization What is DevOps? Addressing delivery challenges Water-SCRUM-Fall? Customers Dev & Test Teams Line of Business Gap Desire for fast and continuous innovation Requirements Addressed by... Agile Dev Operations Team Gap Business Services Code & Tests Addressed by... Dev Ops http://ibm.co/PRQkWL Key Concepts 1. Continuous Integration 2. Continuous Delivery 3. Continuous Test 4. Continuous Monitoring 5. Infrastructure as Code 6. Build and Delivery Pipeline 1. Continuous Integration http://bit.ly/PRQ4a7 2. Continuous Delivery http://bit.ly/PRQ4a7 3. Continuous Test http://bit.ly/PRQ9dQ 4. Continuous Monitoring http://bit.ly/PRQ9dQ 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. restart_command "/sbin/service httpd restart && sleep 1" reload_command "/sbin/service httpd reload && sleep 1" 6. Build & Delivery Pipeline DevOps for Mobile Challenges DevOps for Mobile - Challenges • Mobile Apps are the front-end to a complex(enterprise) back-end system o Mobile Apps are rapidly becoming a critical user interface to enterprise systems Mobile Application Architecture: LinkedIn http://engineering.linkedin.com/testing/co ntinuous-integration-mobile DevOps for Mobile - Challenges • Fragmented Platforms o iOS forked when iPad came out. Android forked multiple times with each vendor, Kindle Fire, Nook… 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 o Hybrid Apps are the optimal solution for Apps with non-native needs DevOps for Mobile - Challenges • App stores add additional asynchronous deployment step o Continuous Delivery become ‘deliver and wait’ Delivery Pipeline .jsp .html .java .sh Build, Package, & Unit Test Application Binaries & Platform Configuration Deploy chef recipes Source Artifacts Source Control Management Deployable Artifacts Library Environment Running System 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 DevOps Best Practices for Mobile Apps DevOps Best Practices for Mobile Apps 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 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 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 Continuous Integration and Continuous Delivery iOS Developer 1. End-to-end Traceability, across all Components Library Source Control Android Developer Deliver App Code Build Source Artifacts Enterprise Services Developer Fetch Deployable Artifacts Automate Continuous Integration and Continuous Delivery 2. Practice Continuous Integration Mobile App Developent Teams Enterprise Services Developent Teams Continuous Integration and Continuous Delivery 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 4. Automated Build and Deploy scripts Automated Scripts Continuous Testing and Continuous Monitoring 5. Test each build on each supported device Continuous Testing and Continuous Monitoring 6. Simulate Back-end Services Mobile App Third-party Services App Under Test Third-party Services Test Environments to Production Actual Service Simulated Service Mobile App Directory Identity Data Warehouse Portals Mainframe Enterprise Service Bus Heterogeneous Environments Continuous Testing and Continuous Monitoring 7. Monitor deployed apps and back end services performance Mobile App Delivery 8. Governance of provisioning profiles, certificates and API keys Mobile App Delivery 9. Use a ‘Private’ App store to test device deployment Mobile App Delivery 10. Convert App Store feedback into user stories Implementing DevOps for Mobile Apps Mobile Delivery Pipeline Mobile IDE API keys, Provisioning Profiles… .jsp .htm l .java .sh Build, Package, & Unit Test Application Binaries & Platform Configuration chef recipe s Deployable Artifacts Source Artifacts Source Control Management Deploy Library Enterprise Services IDE Environment Running System DevOps Reference Architecture Release Engineering Continuous Integration Deployment Library Continuous Delivery Development Change Management Requirements Management Enterprise Services IDE Operations Source Control Management Service Simulation Configuration Automation Incident Management Release Management Quality Management Test Automation Environment Provisioning Automation Application Monitoring Data Management Mobile App IDE IBM’s DevOps for Mobile Solution – Continuous Integration and Test IBM Mobile Foundation Enabling the development and delivery of mobile apps IBM Mobile Foundation Includes: • IBM Worklight • IBM WebSphere Cast Iron • IBM Endpoint Manager for Mobile Devices Plus New Services Offering • IBM Software Services for Mobile Foundation Build, connect, manage and secure your mobile enterprise IBM Worklight Open, cost-effective, cross-platform app development App development using native and/or familiar web technologies: • HTML5 • CSS3 • JavaScript App delivery in variety of forms: • Mobile Web app • Hybrid app • Native Compatible with prominent HTML5 libraries and tools: Worklight mobile platform overview Worklight Studio The most complete, extensible development environment with maximum code reuse and per-device optimization Worklight Server Mobile middleware offering unified push notifications, version management, security and integration Worklight Runtime Components ← Extensive libraries and client APIs that expose and interface with native device functionality and the Worklight Server Worklight Console A web-based console for real-time analytics and control of your mobile apps and infrastructure Mobile simulator to simplify unit test Worklight runtime architecture Worklight Server Authentication Adapter Library Client-side App Resources • Cross Platform Technology Direct Update Mobile Web Apps Unified Push Notifications • Security and Authentication • Back-end Data Integration • Post-deployment control and Diagnostics Application Code JSON Translation Stats Aggregation Server-side Application Code Device Runtime 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 Mobile Application Lifecycle Management IBM Worklight Rational Solution for Collaborative Lifecycle Management Development Business Design Test Code Test Deploy Traceability across the entire development lifecycle Construct, debug, and test mobile UIs Mobile Application Platform Open Lifecycle Integration 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 Continuous Integration for Mobile IBM’s DevOps for Mobile Solution – Continuous Delivery IBM SmartCloud Continuous Delivery https://jazz.net/products/smartcloud-continuous-delivery/ 50 IBM SmartCloud Continuous Delivery packaging Extending Agile Development with Continuous Delivery Build -> Publish -> Deploy -> Test Mobile ALM (Rational Team Concert) Agile Development IBM SmartCloud Provisioning Deployment to Virtual Systems 51 Extending IBM SmartCloud Continuous Delivery Optional and alternative Integrations Extending CLM with Continuous delivery Deployment to Cloud & Virtual Systems IBM SmartCloud Provisioning Continuous Delivery Mobile ALM (Rational Team Concert) Design Management IBM Rational Software Architect Design Manager IBM PureSystems IBM Workload Deployer Continuous Integration IBM Rational Build Forge. Hudson…. Test Automation IBM Rational... Quality Manager IBM Green Hat Deployment Automation IBM Rational Automation Framework Performance Management IBM SmartCloud Application. Performance Management Incident Management IBM SmartCloud Control Desk.. Chef Jenkins…. 52 IBM’s DevOps for Mobile Solution – Service Virtualization What is Service Simulation and Test Virtualization? Public Cloud Private Cloud Third-party Services Archives Portals Directory Identity Data Warehouse File systems Mainframe Mobile App Under Test EJB Business Partners Shared Services Messaging Services Enterprise Service Bus Capture & Model Mobile App Under Routing Content Service Collaboration Test Providers Databases Mainframe applications Third-party Services Packaged apps, messaging services, etc. Virtual Services Heterogeneous Environments System dependencies are a key challenge in setting up test environments: Test Virtualization enables to create “virtual services”: Unavailable/inaccessible: Testing is constrained due to production schedules, security restrictions, contention between teams, or because they are still under development oVirtual Services simulate the behavior of an entire application or system during 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) 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 (thirdparty services) to replicate via traditional hardwarebased virtualization approaches 55 IBM Rational Test Virtualization Solution Test Virtualization is an enabler for continuous Integration Testing Services, applications, systems are introduced into the continuous integration cycle in a prioritized, controlled fashion. Incremental Integration Testing Actual Service/App Virtual Service/App Mobile App under Test 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 Cloud Environment CRM Order Mgr Virtual Lab VM Catalog Manager Build Assets App Server Virtual Machines •Smoke Tests •Sandboxes •Self-provisionning Product Increment Wrap-up: DevOps Best Practices for Mobile Apps DevOps Best Practices for Mobile Apps 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 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 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 o http://ibm.co/JrPVGR The IBM Technical Summit Top Five Reasons to Attend Learn 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 highenergy 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! Register by March 15 and save $300! ibm.com/innovate