containerize, paas, or go serverless!?
TRANSCRIPT
InterConnect2017
Containerize, PaaS or Go Serverless?
Phil Estes @estesp
Lin Sun @linsun_unc
A Case Study in Application Deployment Models
1
Application Deployment Models: A Brief Overview
2
Your compute options in the post VM world can be confusing.
PaaS (Cloud Foundry) <
Containers <
[Orchestration] <
FaaS/“Serverless” <3
4
Cloud Foundry Overview
5
IBM is leading 3 projects, has 2 in incubation & contributes to 10 overall
IBM has been the #2 contributor since the community was established, behind only Pivotal.
Clouds
Services
Bui
ldpa
cks
Bluemix PaaS Leverages Cloud Foundry
> Continuing IBM’s history of embracing Open Source
6
Bluemix Cloud Foundry Quick Start> A range of sophisticated programming language & quick start boilerplates:
7
Fast, lightweight, isolated application containers
“Docker containers spin up fast and provide a layer of isolation from other services running in containers.”
“The lightweight containers can spin up in a matter of seconds without consuming a lot of resources.”
Containers: Based on Docker
8
Read-only template used to create Docker containers
Build new images by modifying existing images
Find and share images on a registry (Docker Hub)
Containers: Images
9
Beta available March 20th.
Combining Docker and Kubernetes to deliver powerful tools, an intuitive user experience, and built-in security and isolation to enable rapid delivery of applications - all while leveraging IBM Cloud Services including cognitive capabilities from Watson.
www.ibm.com/cloud-computing/bluemix/containers
IBM Bluemix Container Service
10
Intelligent Scheduling Automated rollouts and rollbacks Container Security & PrivacyDesign Your Own Cluster
Self-healing Horizontal scaling Leverages IBM Cloud & Watson Integrated Operational Tools
S M L
Service discovery & load balancing Secret & configuration management Simplified Cluster Management Native Kubernetes Experience
IBM Bluemix Container Service
New Section
New Section
13
+ =
www.ibm.com/cloud-computing/bluemix/containers
IBM Bluemix Container Service
14
Commonly referred to as “serverless” computing, the function/event-oriented computing model takes focus away from deploying application components onto servers
Function-as-a-Service: Overview
„Event-action platform to execute code in
response to events“
15
Serverless deployment & operations model
We hide infrastructural and operational complexity allowing you to focus on coding: You provide code – we execute it!
Optimal utilization, fair pricing at any scale
We provide you exactly with the resources you need; and charge you when your for code is executed
Flexible programming model & powerful tooling
We support multiple languages (incl. Swift) and even the execution of custom logic via Docker containers plus SDK/tools to declaratively chain your code snippets
Open source & open ecosystem
Open to run anywhere (on-premises vs. Bluemix hosted), no vendor lock-in and a growing ecosystem of contributors and partners
OpenWhisk: Details
1
2
3
4
16
}1 Associated Services
OpenWhisk Bluemix Runtime
Cloudant
Data event occurs: - git commit - CloudantDB operation - etc.
Event triggers: - An associated
OpenWhisk action
2
Node.js Swift Docker
OpenWhisk: How does it work?
Registered Actions
Git
Weather API
…
OR direct execution: - Web Action endpoint
- `wsk` action execute - etc.
17
Consistent experience: Common service binding & consumption model
Common user ID & permissions model Common routing layer
Consistent experience• Common service binding & consumption model • Common user ID & permissions model • Common routing layer
Level of abstraction
Flexibility
OpenWhisk FaaS
flexibility vs ease of use/abstraction trade-off
Bluemix: Compute Models
Cloud Foundry PaaS
Docker/Containers CaaS
Kubernetes/Containers CaaS
18
Execute code on-demand in a highly scalable, managed environment through event
driven triggers. Functions can be written in Javascript, Apple Swift, or custom
Docker images. SDK with service binding and API gateway (beta) support available.
OpenWhisk
Build and deploy portable applications with significant flexibility and control over
content that run anywhere without having to reconfigure and deploy for different
environments. Orchestrate using available technologies, including Kubernetes.
Containers
Deploy and scale applications using a broad set of runtimes, binding to a rich set of
cloud services, without having to manually configure and manage servers.Cloud
Foundry
Infrastructure Control
Bluemix: Compute Model Comparison
Demo Application: FlightAssist A practical comparison of the three compute models discussed
19
Uses several APIs/services:
> TripIt API
> FlightStats API
> Weather Company API
> Cloudant NoSQL DB
A Node.js application; default deploys as a CloudFoundry
application. Easily decomposable into a set of service
queries after retrieving trip data.
https://github.com/estesp/flightassist/
20
FlightAssist: Overview
21
FlightAssist: Application Layout
FlightAssist
Language: Node.js Monolithic CF app
TripIt API
Bluemix Services
Weather Company Data
External API/Services
Cloudant
FlightStats API
http://localhost:3000/
http://localhost:3000/authenticate
http://localhost:3000/flights
view index.ejs
oAUTH w/TripIt
TripIt oAUTH callback > view trips.ejs
AJAX calls:
/i/tripdata /i/flightinfo /i/weather /i/conninfo
22
FlightAssist: Application Demonstration
FlightAssist
Language: Node.js Monolithic CF app
AJAX calls:
/i/tripdata /i/flightinfo /i/weather /i/conninfo
http://localhost:3000/
FlightAssist
Language: Node.js Monolithic
Containerized App
http://localhost:3000/
FlightAssist
Language: Node.js App Container
http://localhost:3000/
WeatherService
Language: Python Container
http://localhost:5000/
/i/weather
WeatherService
Language: Swift OpenWhisk Action
See: https://github.com/estesp/flightassist/
Demo Deploying FlightAssist with various application models
23
Understanding Your Compute Options Trade-offs for deployment methodologies
24
25
Deployment Model Comparison
Containers PaaS/Cloud Foundry FaaS/OpenWhisk• Full control over runtime
environment (minimal OS) • Lends itself towards reuse/
organizational control (e.g. common base image for application dev/test/prod)
• Portable runtime packaging (dev. laptop, production server, public cloud)
• Orchestration platforms and paradigms support micro service architectures well (service discovery, load balancing, etc.)
• No requirement to understand/manage OS layer; CF buildpacks
• Platform handles routing, scaling, logging, health check with little to no involvement from developer.
• Service catalog/service binding model highly beneficial for ease of consuming and configuring external capabilities (APIs, databases, platform capabilities)
• Infrastructure not even a discussion point with function developer. “PaaS on steroids”
• Highly granular “utility” model for pricing (100ms) means short-lived functions incur minimal cost. Very low latency + “infinite” scaling.
• Custom [Docker image] runtime support for non-standard use cases (bash script, compiled code) with same workflow
• Encourages good micro service architecture flows with action trigger and sequence capabilities• OS layer updates/patching
• More developer/operator concerns: build, service configuration, custom middleware/backends (instead of provided services)
• Little to no visibility into platform (OS image, library/runtime versions, etc.); mercy of build pack updates?
• Tends to guide developer towards monolithic app development
• App routing/interactions limited to HTTP/HTTPS
• Some limitations in runtime support (complexity in using libs/frameworks)
• Actions via HTTP still maturing; can be complex to configure.
• Visibility/debug can be difficult
26
Notices and disclaimersCopyright © 2017 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM.
U.S. Government Users Restricted Rights — use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. This document is distributed “as is” without any warranty, either express or implied. In no event shall IBM be liable for any damage arising from the use of this information, including but not limited to, loss of data, business interruption, loss of profit or loss of opportunity. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.
IBM products are manufactured from new parts or new and used parts. In some cases, a product may not be new and may have been previously installed. Regardless, our warranty terms apply.”
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law.
27
Notices and disclaimers continuedInformation concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM expressly disclaims all warranties, expressed or implied, including but not limited to, the implied warranties of merchantability and fitness for a particular, purpose.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services®,Global Technology Services®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli® Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
InterConnect2017
Thank You!
28
Phil Estes @estesp
Lin Sun @linsun_unc
Check out/enhance/contribute to our demo application:
https://github.com/estesp/flightassist https://github.com/estesp/flightassist-weather