SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
riffing on Knative
Scott Andrews
@scothis
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Safe Harbor Statement
The following is intended to outline the general direction of Pivotal's offerings. It is intended for
information purposes only and may not be incorporated into any contract. Any information
regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject
to ongoing evaluation by Pivotal and is subject to change. This information is provided without
warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's
offerings. These purchasing decisions should only be based on features currently available. The
development, release, and timing of any features or functionality described for Pivotal's offerings in
this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward
looking information in this presentation.
2
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Disclaimer
everything is alpha
Have fun(ctions), but not in production
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo driven talk
• Kubernetes primer
• Serverless Kubernetes with Knative
• Building and deploying a riff Function from source
• Java
• Node.js
• commands
• Invoking a riff Function
• command driven functions
• event driven functions
Overview
4
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Tools we’ll use
• riff - riff is for functions
https://github.com/projectriff/riff/releases
• kubectl - Kubernetes CLI
https://kubernetes.io/docs/tasks/tools/install-kubectl/
• kail - kubernetes tail
https://github.com/boz/kail
• watch - execute a program periodically, showing output fullscreen
https://gitlab.com/procps-ng/procps
5

Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: Using k8s
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
What is riff
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Knative
Kubernetes-based platform to build, deploy,
and manage modern serverless workloads
Three core components:
• Build - Source-to-container build orchestration
• Serving - Request-driven compute that can scale to zero
• Eventing - Management and delivery of events
100% open source. Created by Google with contributions from Pivotal and others
8

Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/ 9
BuildTemplate
Source
Channel
Build
Knative Custom Resource Definitions
Subscription
refers to
refers to
creates and
registers
instance of
Eventing
Serving
Build
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
riff is for functions
• event driven Function as a Service
• opinionated experience built atop Knative, Kubernetes and Istio
• functions practice Inversion of Control
• no servers, ports or messaging protocols, just your logic
• pick your language runtime:
• Java/Spring
• JavaScript/Node
• executable commands
• more from the community
1
0

Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
riff on Knative
Community-driven
ecosystem of
Sources,
Channels,
Functions,
Invokers,
BuildTemplates,
etc.
Kubernetes
BuildTemplates
Channels
CLI
Invokers
CLI
Invokers
Build
Topics
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Installing riff (and Knative)
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Creating a Kubernetes cluster
13
# https://projectriff.io/docs/getting-started/gke/
# create cluster
gcloud container clusters create $CLUSTER_NAME 
--cluster-version=latest --machine-type=n1-standard-4 
--enable-autoscaling --min-nodes=1 --max-nodes=3 --num-nodes=3 
--enable-autorepair 
--scopes=service-control,service-management,compute-rw,storage-ro,cloud-platform,logging-
write,monitoring-write,pubsub,datastore
# grant yourself cluster-admin
kubectl create clusterrolebinding cluster-admin-binding 
--clusterrole=cluster-admin 
--user=$(gcloud config get-value core/account)
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Install riff
14
# https://projectriff.io/docs/getting-started/gke/
# once per cluster
riff system install
# once per namespace
riff namespace init $NAMESPACE --gcr $PATH_TO_GCR_CREDENTIALS
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Install riff
...and dependencies including:
• Istio
• Knative Build
• Knative Serving
• Knative Eventing
• In Memory Channel Provisioner
• Kafka, Cloud Pub/Sub, NATSS are also available, but not installed
• riff BuildTemplate - convert source to riff Function container images
• credentials to push builds to an image registry
1
5

Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: Exploring Knative
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/ 17
BuildTemplate
Source
Channel
Build
Knative Custom Resource Definitions
Subscription
refers to
refers to
creates and
registers
instance of
Eventing
Serving
Build
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
riff Functions
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
a riff Java Function
19
// https://github.com/projectriff-samples/fats-uppercase-java
package functions;
import java.util.function.Function;
public class Upper implements Function<String, String> {
public String apply(String s) {
return s.toUpperCase();
}
}
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
a riff JavaScript Function
2
0
// https://github.com/projectriff-samples/fats-uppercase-node
module.exports = s => s.toUpperCase();
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
a riff Command Function
21
# https://github.com/projectriff-samples/fats-uppercase-command
#!/bin/sh
tr '[a-z]' '[A-Z]'
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: riff Functions
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Deploy a riff Function
2
3
riff function create square 
--git-repo https://github.com/projectriff-samples/node-square 
--artifact square.js 
--verbose
kail -l riff.projectriff.io/function=square -c user-container
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke a riff Function
2
4
riff service invoke square --json -- 
-w 'n' 
-d 7
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Let’s create another function
2
5
riff function create greet 
--git-repo https://github.com/projectriff-samples/command-hello 
--artifact greet.sh
riff service invoke greet --text -- 
-w 'n' 
-d "Washington"
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: Local Functions
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Iterating quickly (in development)
2
7
riff function local run 
--local-path ./uppercase
curl localhost:8080 
-H 'Content-Type: text/plain' 
-w 'n' 
-d 'shhh!'
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Run on cluster from local source
2
8
riff function create uppercase 
--local-path ./uppercase 
--verbose
riff service invoke uppercase --text -- 
-w 'n' 
-d 'shhh!'
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: Event Driven Functions
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke a riff Function with events
3
0
riff channel create numbers
riff channel create squares
riff subscription create 
--channel numbers 
--subscriber square 
--reply squares
riff service create correlator 
--image scothis/correlator:s1tour
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke a riff Function with events
31
correlator
numbers
squaressquare
riff invoke /numbers
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo: Function Chaining
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke a riff Function with events
3
3
riff service invoke correlator /s1tour/numbers --json -- 
-w 'n' 
-v 
-d 7
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
3
4
correlator
numbers
replies
squaressquaregreet
riff invoke /numbers
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Let’s chain our functions
3
5
riff channel create replies
riff subscription create 
--channel squares 
--subscriber greet 
--reply replies
riff subscription create 
--channel replies 
--subscriber correlator
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke a riff Function with events
3
6
riff service invoke correlator /s1tour/numbers --json -- 
-H "Knative-Blocking-Request: true" 
-w 'n' 
-d 7
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
3
7
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
3
8
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
3
9
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
4
0
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
41
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Invoke the riff Function with events
4
2
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Other patterns are possible
4
3
correlator
numbers
replies
squaressquaregreet
riff invoke /numbers
dead-beef-00
GET /dead-beef-00
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
There's more we didn't have time to show...
4
4
• alternate Eventing Channels
• Kafka
• NATSS
• Google Cloud PubSub
• Eventing Sources
• Cloud Events
• alternate BuildTemplates
• Buildah
• jib
• kaniko
• deploying Knative from source
• Istio
• public DNS
• Autoscaler tuning
• monitoring
• Grafana
• Prometheus
• Zipkin
You can learn more at
https://www.knative.dev
Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Free eBook
http://bit.ly/getting-started-with-knative
Hot off the press
> join us at projectriff.io
@projectriff

Weitere ähnliche Inhalte

Was ist angesagt?

Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014
nyolles
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
Hamed Hatami
 

Was ist angesagt? (20)

Reactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and SpringReactor 3.0, a reactive foundation for java 8 and Spring
Reactor 3.0, a reactive foundation for java 8 and Spring
 
Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014Adobe CQ at LinkedIn Meetup February 2014
Adobe CQ at LinkedIn Meetup February 2014
 
Spring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and BeyondSpring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and Beyond
 
Documenting RESTful APIs with Spring REST Docs
Documenting RESTful APIs with Spring REST Docs Documenting RESTful APIs with Spring REST Docs
Documenting RESTful APIs with Spring REST Docs
 
What's New in Spring for Apache Kafka 2.0
What's New in Spring for Apache Kafka 2.0What's New in Spring for Apache Kafka 2.0
What's New in Spring for Apache Kafka 2.0
 
Cloud Foundry Services on PKS with No Extra Code, "We Bosh So You Don’t Have ...
Cloud Foundry Services on PKS with No Extra Code, "We Bosh So You Don’t Have ...Cloud Foundry Services on PKS with No Extra Code, "We Bosh So You Don’t Have ...
Cloud Foundry Services on PKS with No Extra Code, "We Bosh So You Don’t Have ...
 
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
K8s at Scale in the Enterprise: Self-Service Through the View of PersonasK8s at Scale in the Enterprise: Self-Service Through the View of Personas
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
 
Do you think you're doing microservice architecture? What about infrastructur...
Do you think you're doing microservice architecture? What about infrastructur...Do you think you're doing microservice architecture? What about infrastructur...
Do you think you're doing microservice architecture? What about infrastructur...
 
Spring Integration 5.0: What's new?
Spring Integration 5.0: What's new?Spring Integration 5.0: What's new?
Spring Integration 5.0: What's new?
 
Spring one2gx 2014 erdemgunay
Spring one2gx 2014 erdemgunaySpring one2gx 2014 erdemgunay
Spring one2gx 2014 erdemgunay
 
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
Mobile Development with Ionic, React Native, and JHipster - AllTheTalks 2020
 
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive Programming
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
Crossing the CI/CD/DevOps Chasm
Crossing the CI/CD/DevOps ChasmCrossing the CI/CD/DevOps Chasm
Crossing the CI/CD/DevOps Chasm
 
Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...
 

Ähnlich wie riffing on Knative - Scott Andrews

Ähnlich wie riffing on Knative - Scott Andrews (20)

S1P: Spring Cloud on PKS
S1P: Spring Cloud on PKSS1P: Spring Cloud on PKS
S1P: Spring Cloud on PKS
 
Accelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud FoundryAccelerating the Consumption of APIs Built on Cloud Foundry
Accelerating the Consumption of APIs Built on Cloud Foundry
 
Developer Secure Containers for the Cyberspace Battlefield
Developer Secure Containers for the Cyberspace BattlefieldDeveloper Secure Containers for the Cyberspace Battlefield
Developer Secure Containers for the Cyberspace Battlefield
 
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
 
P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to Containers
 
Spring Cloud on Kubernetes
Spring Cloud on KubernetesSpring Cloud on Kubernetes
Spring Cloud on Kubernetes
 
Heavyweights: Tipping the Scales with Very Large Foundations
Heavyweights: Tipping the Scales with Very Large FoundationsHeavyweights: Tipping the Scales with Very Large Foundations
Heavyweights: Tipping the Scales with Very Large Foundations
 
Serverless Spring 오충현
Serverless Spring 오충현Serverless Spring 오충현
Serverless Spring 오충현
 
Policy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentPolicy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy Agent
 
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InSteeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
 
Fast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the CloudFast 5 Things You Can Do Now to Get Ready for the Cloud
Fast 5 Things You Can Do Now to Get Ready for the Cloud
 
Containerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesContainerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for Kubernetes
 
Square Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That FitsSquare Pegs, Square Holes: CI/CD That Fits
Square Pegs, Square Holes: CI/CD That Fits
 
What's new in Spring Boot 2.0
What's new in Spring Boot 2.0What's new in Spring Boot 2.0
What's new in Spring Boot 2.0
 
What's new in Reactor Californium
What's new in Reactor CaliforniumWhat's new in Reactor Californium
What's new in Reactor Californium
 
How to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and IstioHow to Manage Microservices and APIs with Apigee and Istio
How to Manage Microservices and APIs with Apigee and Istio
 
PCF 2.3: A First Look
PCF 2.3: A First LookPCF 2.3: A First Look
PCF 2.3: A First Look
 
It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?
 
Experience + Education = Empowerment
Experience + Education = EmpowermentExperience + Education = Empowerment
Experience + Education = Empowerment
 
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
Cloud-Native Streaming Platform: Running Apache Kafka on PKS (Pivotal Contain...
 

Mehr von VMware Tanzu

Mehr von VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Kürzlich hochgeladen (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

riffing on Knative - Scott Andrews

  • 1. riffing on Knative Scott Andrews @scothis
  • 2. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Safe Harbor Statement The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation. 2
  • 3. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Disclaimer everything is alpha Have fun(ctions), but not in production
  • 4. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo driven talk • Kubernetes primer • Serverless Kubernetes with Knative • Building and deploying a riff Function from source • Java • Node.js • commands • Invoking a riff Function • command driven functions • event driven functions Overview 4
  • 5. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Tools we’ll use • riff - riff is for functions https://github.com/projectriff/riff/releases • kubectl - Kubernetes CLI https://kubernetes.io/docs/tasks/tools/install-kubectl/ • kail - kubernetes tail https://github.com/boz/kail • watch - execute a program periodically, showing output fullscreen https://gitlab.com/procps-ng/procps 5 
  • 6. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Using k8s
  • 7. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is riff
  • 8. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Knative Kubernetes-based platform to build, deploy, and manage modern serverless workloads Three core components: • Build - Source-to-container build orchestration • Serving - Request-driven compute that can scale to zero • Eventing - Management and delivery of events 100% open source. Created by Google with contributions from Pivotal and others 8 
  • 9. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 9 BuildTemplate Source Channel Build Knative Custom Resource Definitions Subscription refers to refers to creates and registers instance of Eventing Serving Build
  • 10. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ riff is for functions • event driven Function as a Service • opinionated experience built atop Knative, Kubernetes and Istio • functions practice Inversion of Control • no servers, ports or messaging protocols, just your logic • pick your language runtime: • Java/Spring • JavaScript/Node • executable commands • more from the community 1 0 
  • 11. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ riff on Knative Community-driven ecosystem of Sources, Channels, Functions, Invokers, BuildTemplates, etc. Kubernetes BuildTemplates Channels CLI Invokers CLI Invokers Build Topics
  • 12. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Installing riff (and Knative)
  • 13. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Creating a Kubernetes cluster 13 # https://projectriff.io/docs/getting-started/gke/ # create cluster gcloud container clusters create $CLUSTER_NAME --cluster-version=latest --machine-type=n1-standard-4 --enable-autoscaling --min-nodes=1 --max-nodes=3 --num-nodes=3 --enable-autorepair --scopes=service-control,service-management,compute-rw,storage-ro,cloud-platform,logging- write,monitoring-write,pubsub,datastore # grant yourself cluster-admin kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value core/account)
  • 14. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Install riff 14 # https://projectriff.io/docs/getting-started/gke/ # once per cluster riff system install # once per namespace riff namespace init $NAMESPACE --gcr $PATH_TO_GCR_CREDENTIALS
  • 15. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Install riff ...and dependencies including: • Istio • Knative Build • Knative Serving • Knative Eventing • In Memory Channel Provisioner • Kafka, Cloud Pub/Sub, NATSS are also available, but not installed • riff BuildTemplate - convert source to riff Function container images • credentials to push builds to an image registry 1 5 
  • 16. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Exploring Knative
  • 17. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 17 BuildTemplate Source Channel Build Knative Custom Resource Definitions Subscription refers to refers to creates and registers instance of Eventing Serving Build
  • 18. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ riff Functions
  • 19. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ a riff Java Function 19 // https://github.com/projectriff-samples/fats-uppercase-java package functions; import java.util.function.Function; public class Upper implements Function<String, String> { public String apply(String s) { return s.toUpperCase(); } }
  • 20. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ a riff JavaScript Function 2 0 // https://github.com/projectriff-samples/fats-uppercase-node module.exports = s => s.toUpperCase();
  • 21. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ a riff Command Function 21 # https://github.com/projectriff-samples/fats-uppercase-command #!/bin/sh tr '[a-z]' '[A-Z]'
  • 22. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: riff Functions
  • 23. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Deploy a riff Function 2 3 riff function create square --git-repo https://github.com/projectriff-samples/node-square --artifact square.js --verbose kail -l riff.projectriff.io/function=square -c user-container
  • 24. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke a riff Function 2 4 riff service invoke square --json -- -w 'n' -d 7
  • 25. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Let’s create another function 2 5 riff function create greet --git-repo https://github.com/projectriff-samples/command-hello --artifact greet.sh riff service invoke greet --text -- -w 'n' -d "Washington"
  • 26. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Local Functions
  • 27. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Iterating quickly (in development) 2 7 riff function local run --local-path ./uppercase curl localhost:8080 -H 'Content-Type: text/plain' -w 'n' -d 'shhh!'
  • 28. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Run on cluster from local source 2 8 riff function create uppercase --local-path ./uppercase --verbose riff service invoke uppercase --text -- -w 'n' -d 'shhh!'
  • 29. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Event Driven Functions
  • 30. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke a riff Function with events 3 0 riff channel create numbers riff channel create squares riff subscription create --channel numbers --subscriber square --reply squares riff service create correlator --image scothis/correlator:s1tour
  • 31. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke a riff Function with events 31 correlator numbers squaressquare riff invoke /numbers
  • 32. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo: Function Chaining
  • 33. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke a riff Function with events 3 3 riff service invoke correlator /s1tour/numbers --json -- -w 'n' -v -d 7
  • 34. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 3 4 correlator numbers replies squaressquaregreet riff invoke /numbers
  • 35. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Let’s chain our functions 3 5 riff channel create replies riff subscription create --channel squares --subscriber greet --reply replies riff subscription create --channel replies --subscriber correlator
  • 36. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke a riff Function with events 3 6 riff service invoke correlator /s1tour/numbers --json -- -H "Knative-Blocking-Request: true" -w 'n' -d 7
  • 37. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 3 7
  • 38. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 3 8
  • 39. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 3 9
  • 40. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 4 0
  • 41. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 41
  • 42. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Invoke the riff Function with events 4 2
  • 43. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Other patterns are possible 4 3 correlator numbers replies squaressquaregreet riff invoke /numbers dead-beef-00 GET /dead-beef-00
  • 44. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ There's more we didn't have time to show... 4 4 • alternate Eventing Channels • Kafka • NATSS • Google Cloud PubSub • Eventing Sources • Cloud Events • alternate BuildTemplates • Buildah • jib • kaniko • deploying Knative from source • Istio • public DNS • Autoscaler tuning • monitoring • Grafana • Prometheus • Zipkin You can learn more at https://www.knative.dev
  • 45. Unless otherwise indicated, these slides are © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Free eBook http://bit.ly/getting-started-with-knative Hot off the press
  • 46. > join us at projectriff.io @projectriff