Accelerate your PaaS to the Mobile World
Ryan Campbell
@CloudBees @recampbell
3
Resources
http://bit.ly/17Km8QC
4
What we’ll cover
• What is a PaaS?• What is CloudBees?–What is WEAVE?
• Demo – Mobile Push for Android• Demo – iOS build in the cloud
©2013 CloudBees, Inc. All Rights Reserved
5
Warm up Jenkins1. Sign up at cloudbees.com/signup
2. Subscribe to Jenkins
6
What’s 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
CloudBees Is a Platform Delivered As A Service
cloudbees.com
JenkinsMaster
Test
Stage
Build
Code
JenkinsExecutor
Forg
e R
ep
osit
ori
es
Git
SVN
mvn
Development Services
(DEV@cloud)
Developer and OperationsInteraction
End User Interaction
Runtime Services
(RUN@cloud)
CloudBees API
Grand Central Web
Console
SDK
SessionClustering
MySQL
Router
Application
PartnerEcosystem
7
©CloudBees, Inc. All Rights Reserved
8
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
9
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 world’s #1 OSS continuous integration server
• You write the code and we do all the rest
10
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
CloudBees Step-by-Stepcloudbees.com
JenkinsMaster
Test
Stage
Build
Code
JenkinsExecutor
Forg
e R
ep
osit
ori
es
Git
SVN
mvn
Development Services
(DEV@cloud)
Developer and OperationsInteraction
End User Interaction
Runtime Services
(RUN@cloud)
CloudBees API
Grand Central Web
Console
SDK
SessionClustering
MySQL
Router
Application
PartnerEcosystem
Multi-Tenanted
Dedicated
Amazon Web Services
11
©CloudBees, Inc. All Rights Reserved
12
What Platform-as-a-Service Is Not
• Commercial, packaged applications don’t usually run on a PaaS
• You don’t need to purchase any hardware or software licenses
• You won’t have to install anything – you just deploy your Java apps to the platform
• If you need to run your applications in your own data center, PaaS is the wrong model
13
How Do You Use CloudBees?
13
CLI/SDK GrandCentral Web Console IDE
©CloudBees, Inc. All Rights Reserved
14
What Does It Cost?
• Your app always runs in secure, isolated containers to which only you have access
• We can run those containers for you using shared resources or dedicated resources
• You pay only for what you need: a fixed subscription or “pay as you go” pricing
• FREE and COMPLETE for developers: no credit card required
15
• Lose it!– Mobile application– Millions of users– More than 30,000 transactions per minute, at peak
time
• And… only 4 employees and …2 developers!– No IT, no servers, no DevOps– Complete focus on SOFTWARE DEVELOPMENT– Anything else is handled by CloudBees
• Unmatched productivity level!– This is possible TODAY– Will you wait for your competitors to shoot first?
Example: Lose it!
16
Getting Started: CloudBees ClickStarts
©2012 CloudBees, Inc. All Rights Reserved
The easiest way to get started – and learn new technologies
17
cloudbees.com
What’s up with this new framework!
What Did I Just Do?
17
CloudBeesGit
Repo
Database
Build/Test
db:create
App
PartnerServicePartner
Service
CloudBees API
Grand Centra
l Web
Console
app:creategit clone
Jenkins job create
Bind
Bind
Trigger
Deploy
Wow! At yourservice
©2013 CloudBees, Inc. All rights reserved
18
cloudbees.com
Develop Locally, Build in the Cloud
CloudBeesGit
Repo
Database
Build/Test
App
PartnerServicePartner
Service
Bind
Bind
TriggerDeployI want to make
some changes!
Local GitRepo
git clonegi
t com
mit git push
Chan
ges
Wow! At yourservice
©2013 Cloud Bees, Inc. All Rights Reserved
Gasp! Demo
Mobile Data Sync and Notification Services with PaaS
20©2013 CloudBees, Inc. All Rights Reserved
What is WEAVE@cloud?
On-Premise
A Cloud-Based Data Integration Service
In-Cloud
20
(formerly « FoxWeave »)
21
AppCentric Integration
21©2013 CloudBees, Inc. All rights
reserved
AppLogic
Find Location and Places/Events
ReviewRestaurant
ApplicationRunning on CloudBees
Update Gasp! Database
Update Mobile Device Databases
Create New Prospect in
Salesforce.com
Tweet
Update Marketing
©2013 CloudBees, Inc. All Rights Reserved
22
What am I doing?
Am I interested?
Who am I?
Where am I?
23
Application Architecture
gasp!JPA/JDBC
Database
polls
WEAVE@cloud
Sync Service(gasp-gcm-server)
REST
Google CloudMessaging
notifications
registers
notifications
reviews
©2013 CloudBees, Inc. All Rights Reserved
24
Push Notification: The Details
Send push notifications
DB update triggers async notification
PaaS maps relevant updates to interested users
Push APIs
Register device and user
Register mobile endpoint Push APIs
PaaS manages user-to-device mapping and registration
25©2013 CloudBees, Inc. All Rights Reserved
• One API to handle– Google Cloud Messaging: Android– Apple Push Notification: iOS– Amazon Device Messaging: Kindle
• Gasp SNS Mobile Push example:https://github.com/CloudBees-community/gasp-push-server
• Compare GCM and APNS native versions:https://github.com/CloudBees-community/gasp-gcm-serverhttps://github.com/CloudBees-community/gasp-apns-server
Amazon SNS Mobile Push
26©2013 CloudBees, Inc. All Rights Reserved
Gasp! - Google Cloud Messaging (GCM)
• GCM Push Server (partnerdemo/gasp-gcm-server)– Android devices register for updates– REST API for FoxWeave update via
WebHook– GCM notifications sent to all registered
devices– Async notifications; device pulls the actual
data• Data sync (WEAVE@cloud)
– Updates triggered using ‘where id > ##id’
– Calls gasp-gcm-server REST API– Updates are pushed out to registered
devices and trigger refresh of on-device SQLite database via async REST calls
©2013 CloudBees, Inc. All Rights Reserved
27
GCM Server: Registration and Push
• App/Device automatically registers with OTA service (e.g. GCM) to get device token
• Sends device token to Gasp Push Server (REST API), running on CloudBees PaaS
• Gasp Push Server controls notifications – who gets what
28©2013 CloudBees, Inc. All Rights Reserved
• Event model: cloudbees-app-model.json
• WEAVE filter: web.xml
Weave@cloud Integration
29©2013 CloudBees, Inc. All Rights Reserved
• End-to-end integration from any WEAVE service direct to the app/device via push notification:
• Android client: com/cloudbees/gasp/gcm
Weave@cloud Integration
30©2013 CloudBees, Inc. All Rights Reserved
Gasp! - Android Clients and CI Builds
• Android client application (gasp-gcm-client)– Runs on AVD (Google APIs:18 platform)– Async Intent Services handle
sync/update– GCM notifications handled
asynchronously– Gasp! data stored in Android SQLite
database– Separate demo has Maps activity (needs
device)
31
Application Architecture
gasp!JPA/JDBC
Database
polls
WEAVE@cloud
Sync Service(gasp-gcm-server)
REST
Google CloudMessaging
notifications
registers
notifications
reviews
32
♥
33
cloudbees.com/mobile-paas
34
Vessel.io plugin
35
BlazeMeter plugin
36
App.io plugin
37
SOASTA CloudTest plugin
38
39
Demo
40
41
Fully Elastic
42
XCode plugin improvement
x.developerprofile
43
44
cloudbees.com/osx
45
http://www.flickr.com/photos/66598477@N07/6065295630/
46
Mansion
Slave Slave
Slave Slave
47
Maven
Git
Ant
Mercurial
Gradle
Subversion
Linux Kernel
Hardware
Linux Container = zero cost virtualization
48
For OSX
Maven
Git
XCode
Git
XCode
Subversion
OS X OS X OS X
QEMU QEMU QEMU
Linux Kernel
Apple Hardware
49
Kernel Same-page Merging
OS X OS X OS X
50
51
Mansion
Slave
Slave
Slave
Workspace 1
Workspace 2
Workspace 3
Workspace 4
52
Slave
Slave
Workspace
Workspace’’
Workspace’
53
Slave
Slave
~/.m2/repository
~/.m2/repository
~/.m2/repository
54
Questions?
Top Related