These slides online at https://mjbright.github.io/Talks/2018-Mar-25_FOSSAsia_Serverless
About Myself
-
British - living in Grenoble, in the French Alps
-
Developer Advocate @containous creators of @traefikproxy
-
Docker Community Lead
-
Python User Group Creator
-
Kubernetes CKA
-
Crazy about Open Source and Cloud Technologies
About Traefik
is hiring !
-
Reverse-proxy/load-balancer
-
Hot configuration reloads
-
Many backends
-
Let's Encrypt Support + automated cert. renewal
-
Widely deployed
-
Can act as a Kubernetes Ingress Controller
-
... more on this later, in the demo ...
Serverless Computing
-
What Is Serverless?
-
Review of Cloud Provider Offerings
+CNCF Serverless WG -
Open Source Tools
-
Open Source Platforms
-
Demo of OpenFaaS/Traefik
What Is Serverless?
- No more servers ?!
- The ultimate
"Cloud Native" ? - FaaS + BaaS
- Functions as a Service
- Back-ends as a Service
- Functions glue together API-based back-end services
- Serverless: a paradigm
& a company
& a tool
Serverless - What Is it?
At the peak of the Hype Cycle!!
-
Not caring about servers
- Developers focus on apps
- Platform provider
- - Provisions
- - Auto-scales
- - Maintains
-
Pay as you go
- (*)Pay for real (fn) usage
- (*)No initial investment
- (*)High availability for free
- Great for startups -
Agile
- Short time to market
- Enables innovation
- (*)Massive scale on demand
* - These are the promises of Serverless
Serverless - an Event Driven Architecture
Serverless - What is it? ... Use Cases
Where it doesn't make sense to pay for always-on services - it's a business choice!
-
Event driven
Scheduled (peak) events
- monthly payroll
- daily accounting - check processing
(with image recognition)
Unpredictable external events
- web requests
- web hooks
- file uploads
- messages -
Domains
CI / CD
Banking
IoT
Glue-logic (of BaaS)
-
Characteristics
Ideal Serverless applications are
latency tolerant,
event-driven,
short-lived
Serverless - Cloud Providers
Serverless - Main Cloud Provider Offerings
AWS Lambda
Introduced βeta in Nov 2014
Leader in developer uptake, back-end services and eco-system.
Language choices:
Node.js (JS), Python, Java 8, C#, VB/F#
NEW Features - Announced at Reinvent 2017
- Go (static binaries) and .Net(C#)
- SAM for off-line debugging
Cost: Free tier: 1 mn req/mth, then $0.00001667/GBy-sec details
Strengths: Created the space, enormous ecosystem, Cloud9 IDE?
Weaknesses: A little slow, limited languages, lock-in
Potentially huge cost savings for your business, or not ...
Source: "The hidden costs of serverless"
The CNCF Created a Serverless WG
We need open standards for Serverless
-
The working group defines/identifies
- * common terminology
- * common use cases and patterns
- * relation to PaaS and container orchestration
- Resources
Serverless - Open-Source Tooling
- Hundreds of Open-Source tools facilitate development, testing and deployment
- See awesome-serverless
-
Some tools seek to support multi-language,
some multi-platform or a combination ...
Some Important Frameworks
Serverless(.com)
apex(.com)
Chalice (AWS Lambda/Python)
Serverless - Open Source Platforms
-
Kubeless
-
Fission
-
Apache OpenWhisk
-
OpenFaaS
-
Fn Project
-
Nuclio
-
Spring Cloud Functions
Demo Time !
<-- SLIDE 5.1 -->Demo - Traefik Architecture
<-- SLIDE 5.2 -->Demo - OpenFaaS + Traefik
<-- SLIDE 5.3 -->Demo - Adding Traefik Service into Docker-Compose file - 1
services: traefik: image: traefik:v1.5 command: --docker --docker.swarmmode --docker.domain=traefik --docker.watch --api --api.dashboard --debug --defaultEntryPoints='http,https' --entryPoints='Name:http Address::80 Redirect.EntryPoint:https' --entryPoints='Name:https Address::443 TLS:/ssl/wildcard.crt,/ssl/wildcard.key'<-- SLIDE 5.4 -->
Demo - Adding Traefik Service into Docker-Compose file - 2
# colorize images: colorise: image: alexellis2/openfaas-colorization:0.4.0 labels: function: "true" networks: - functions environment: fprocess: "python -u index.py" no_proxy: "gateway" https_proxy: $https_proxy url_mode: "true" deploy: placement: constraints: - 'node.platform.os == linux' labels: - "traefik.port=8080" - "traefik.enable=true" - "traefik.frontend.rule=Host:colorise.fn.faas"<-- SLIDE 6.1 -->
Resources - 1
Resource | Description | URL |
---|---|---|
awesome-serverless | Curated list of awesome services, solutions and resources for serverless / nobackend applications. | [github] anaibol/awesome-serverless |
awesome-Serverless(.com) | Curated list of resources related to serverless architectures and the Serverless Framework | [github] JustServerless/awesome-serverless |
Serverless | Tools for deploying to several Cloud Providers | [github] serverless/serverless |
Apex | Tools for deploying to AWS Lambda | [github] apex/apex |
Resources - 2
Resource | Description | URL |
---|---|---|
AWS Lambda | Amazon's Serverless Platform | https://aws.amazon.com/fr/lambda/ |
Azure Functions | Microsoft's Serverless Platform | https://azure.microsoft.com/en-us/services/functions/ |
Google Cloud Functions | Google's Serverless Platform | https://cloud.google.com/functions/ |
IBM Cloud Functions | IBM's Serverless Platform | https://www.ibm.com/cloud-computing/bluemix/openwhisk |
Resources - 3
Resource | Description | URL |
---|---|---|
Kubeless | Serverless platform from Bitnami | url |
Fission.io | Serverless platform from Platform9 | url |
Apache OpenWhisk | Serverless platform from IBM | url |
OpenFaaS | Serverless platform from Alex Ellis, Docker Captain | url |
Apex | Serverless framework supporting Python and other languages | url |
Chalice | Serverless framework supporting Python / Flask | url |
Lambdify | Serverless framework supporting Python | url |
Zappa | Serverless framework supporting Python / WSGi | url |