3 Quick Introduction to CloudBees and PaaS Building Apps in the Cloud Continuous Integration for iOS and Android Gesture-aware touch testing Multi-configuration mobile testing Beta test distribution Mobile + PaaS models AWS and the Token Vending Machine Todays Agenda
4 Free and complete for developers Get started with just a couple of clicks: all you need is a browser www.cloudbees.com/signup Step 1 - Sign Up with CloudBees
5 Whats a Platform? Something you can use to –Run your apps –Build your apps –Add services to your apps –Manage your apps Plaform-as-a-Service (PaaS) uses elastic, on-demand Cloud resources to do this
7 Cloud Terminology Infrastructure-as-a-Service (IaaS) –Think: Amazon Web Services –What: Server Instances, Storage Buckets etc Software-as-a-Service (SaaS) –Think: Salesforce.com –What: Packaged Applications (in the Cloud) Plaform-as-a-Service (PaaS) –What: Managed Service for Custom Apps
8 What is Platform-as-a-Service? We run your applications for you We provide and manage all the supporting infrastructure needed to run your apps We monitor and can scale out your apps We provide a full, enterprise-class build environment using Jenkins CI – the worlds #1 OSS continuous integration server You write the code and we do all the rest
9 Have You Met Jenkins? #1 OSS CI server Easy to install/use Extensible via 600+ plugins Very widely adopted –47K+ installations Very active community –Over 7 years of history, 440+ releases –600+ plugins, 300+ developers CloudBees adds plugins for cloud builds
11 What Platform-as-a-Service Is Not Commercial, packaged applications dont usually run on a PaaS You dont need to purchase any hardware or software licenses You wont have to install anything – you just deploy your Java apps to the platform If you need to run applications in your own data center, PaaS may be the wrong model
14 cloudbees.com Develop Locally, Build in the Cloud CloudBees Git Repo Database Build/Test App Partner Service Bind Trigger Deploy I want to make some changes! Local Git Repo git clone git commit git push Changes Wow! At your service
First Demo Complete Application with its full lifecycle, in a click ClickStart No resource other than a laptop, everything else is in the cloud No need to deal with IT either! You can create your own ClickStart-s if you want Templates, etc. Pay as you go (to production), scale as you need, full HA, etc. Not just a development workbench!
Second Demo: All Mobile! Complete Chess application for iOS & Android Covered: Where to store app, how to build, how to test, how to distribute, etc. NOT Covered: iOS/Android app coding itself WARNING: testing is especially important for mobile applications – most users wont give it a second chances!
#fail Typical flow/pipeline Code Build App Code BuildTest Deploy Test Beta Deplo y GA Deplo y Get started fast! Team Work Automatically push new code to test Get started fast! Team Work Automatically push new code to test #fail Build on several targets: iOS, Android, etc. If it fails, stop Build on several targets: iOS, Android, etc. If it fails, stop Test is costly! Easy-first, then increase! Basic test Multi-device Gesture Etc. If it fails, stop Test is costly! Easy-first, then increase! Basic test Multi-device Gesture Etc. If it fails, stop Deploy in the field on real users Gather input Retrieve dumps Etc. If it fails, stop Deploy in the field on real users Gather input Retrieve dumps Etc. If it fails, stop D-Day! Push apps to real-life users! If it fails, stop D-Day! Push apps to real-life users! If it fails, stop
Step 1 - CODE Typically using a mobile-specific environment/IDE Store code on Github or at CloudBees (SVN/Git) As soon as a code change occurs, validates! notification sent to Jenkins, initiate pipeline Idea! Use a ClickStart to templatify a typical mobile project License headers, splash screen, login, back-end REST API, etc.
Step 1 - CODE You can look at a mobile ClickStart: Android: https://github.com/mqprichard/stockfishchess- android https://github.com/mqprichard/stockfishchess- android iOS: https://github.com/mqprichard/stockfishchess-ios- app https://github.com/mqprichard/stockfishchess-ios- app
Step 2 - BUILD Android Easy! Android_[SDK | NDK] available in the cloud, build on linux machine on DEV@cloud iOS Requires Mac OS X guest to build Not available (yet) at CloudBees Impossible?
Step 2 – iOS BUILD Mac Build Attach your own Mac Jenkin s Master Jenkins Slave DEV@clo ud Jenkins Slave DEV@clo ud Jenkins Slave DEV@clo ud Jenkins Slave PRIVATE
Preparing a mobile build slave Install Android SDK and NDK, install git (if using it), wget, etc. Modify ~/.bash_profile Create ANDROID_SDK and ANDROID_NDK add A_S/tools and A_S/platform_tools to path Install Xcode Launch to accept license Go in preferences, install command line tools and emulator(s) Type android on command line Add SDK versions + System images (ARM EABI, etc.)
Step 2 - BUILD Good Reads Continuous Deployment for Mobile Apps with Jenkins: iOS Builds http://blog.cloudbees.com/2012/09/continuous- deployment-for-mobile-apps.html http://blog.cloudbees.com/2012/09/continuous- deployment-for-mobile-apps.html Continuous Integration for Mobile Apps with Jenkins: Android Builds http://blog.cloudbees.com/2012/09/continuous- integration-for-mobile-apps.html http://blog.cloudbees.com/2012/09/continuous- integration-for-mobile-apps.html http://www.youtube.com/user/CloudBeesTV
Step 2 - BUILD Next: Details of an iOS build Replay: http://youtu.be/DinMVVKHwTUhttp://youtu.be/DinMVVKHwTU Details of an Android Build Replay: http://youtu.be/EOogyOv79NEhttp://youtu.be/EOogyOv79NE
Step 3 - TEST Lots of different testing is possible Launching an emulator is level-0 of testing SOASTA TouchTest: http://youtu.be/ej21BHCxEaI http://blog.cloudbees.com/2012/11/continuous- integration-for-mobile-apps.html http://blog.cloudbees.com/2012/11/continuous- integration-for-mobile-apps.html
Build Matrix – Problem! Build matrix are very powerful! But testing can become costly! Fail-Fast Organize your testing as a pipeline Cheap first, fail-fast Expensive as late as possible
Jenkins Promoted Builds Build on several targets: iOS, Android, multiple versions, etc. If it fails stop If it succeeds, PROMOTE BUILD Build on several targets: iOS, Android, multiple versions, etc. If it fails stop If it succeeds, PROMOTE BUILD #fail Basic Tests Matrix Tests QA Approval Releas e Mgt #fail Git notif Perform basic testing Mono device Cheap testing Perform basic testing Mono device Cheap testing Deploy application onto Beta Testers devices Zubhium, TestFlight, Appaloosa Deploy application onto Beta Testers devices Zubhium, TestFlight, Appaloosa QA receives notification of promoted build Perform QA validation Code coverage, etc. If not OK stop If OK, MANUALLY APPROVE QA receives notification of promoted build Perform QA validation Code coverage, etc. If not OK stop If OK, MANUALLY APPROVE Real users testing Crash dumps User reports Kill switch Etc. Real users testing Crash dumps User reports Kill switch Etc. Zubhium Android Emulators http://blog.cloudbees.com/2012/11/another-look-at-jenkins-promoted-builds.html
Mobile + Server? Makes PaaS value even more obvious Use existing Java assets on the back-end Communicate through HTTP/etc. iOS CloudBees PaaS Java App DB On- Premise Java App DB HTTPSSSL/VPN/HTTPS/etc.
Private Datacenter App on PaaS To the Internet VPC App on PaaS To the Internet Legacy On-premises resources Data Copy ?
Private Datacenter App on PaaS To the Internet VPC App on PaaS To the Internet Legacy On-premises resources Data Copy 1 2 3
AWS! Amazon Web Services (AWS) provides plenty of high-quality services Can they be used by mobile phones applications? RDSDynamoDBSimpleDBElastiCache IAMData PipelineFlexible PaymentS3 GlacierSimple WorkflowSimple QueueSimple Notification Simple EmailEtc.
AWS – Not easy Not advised to let Mobile app directly access AWS AWS account key would need to be embedded and distributed to all users (!) Users stepping on each others, ouch! Solution?
Token Vending Machine Mobile app registers on a server app and… Anonymous OR Identity-based TVM available Requests a token to the server app Limited in SCOPE (S3, Notification, Email, etc.) Limited in TIME Mobile app uses token to use AWS in a constrained fashion Easy!
Token Vending Machine CloudBees PaaS TVM App AWS S3 1. Request Token AWS IAM 1.1 Request Token Using private AWS Key 2. Uses AWS Service using Token
Want your own TVM? Easy! Try our TVM ClickStart Just put your AWS Key in the TVM and get going! http://blog.cloudbees.com/2012/12/token-vending-machine- clickstarts-and.html
Conclusion Next.gen software development is all about TIME- TO-MARKET and FAST ITERATION Mobile applications make it even harder! No second chance, wide range of devices You cannot win by building your own FACTORY Use a PaaS – Focus on added-value Try it now! Onward!