SlideShare a Scribd company logo
1 of 37
Download to read offline
GitOps meets Serverless
With Flux and OpenFaaS
Alex Ellis (@alexellisuk)
CNCF Ambassador & Founder @ OpenFaaS Ltd
Agenda ⚡
• Serverless 1.0 vs 2.0
• OpenFaaS
• Template store ⌨
• Vs. Kubernetes
• Continuous deployment 🤓
• OpenFaaS Cloud
• Flux
@openfaas / @alexellisuk
Serverless & FaaS
• Easy to manage:
• Stateless
• Isomorphic
• Event-driven or REST
• Smaller
• Focus on code
Serverless 1.0 (Cloud Functions/FaaS)
Serverless 2.0
OpenFaaS - Simple, Secure, Serverless
• Founded in 2016 to “make
Serverless portable” 🎂

• Three values:
• Developer-focused
• Easy to operate
• Community-centric
> 21k stars
> 250 contributors
> 2.5k Slack
PLONK Stack
• Prometheus
• Linux/Linkerd
• OpenFaaS
• NATS
• Kubernetes
🤓

“But, I have a CKA/D, so why should I care?”
• A Node.js microservice for
Kubernetes
Adding a new service (the hard way)
Did we miss anything?
OpenFaaS: Template Store
handler.js (“node12”) stack.yml
• Memory / CPU limits
• Labels / Annotations
• Environment variables
• Secrets
Slide Title
SUBTITLE
• List

• List

• List

• List

◦ List

◦ List

▪ List

▪ List 

▪ List

▪ List

Install PLONK stack
curl https://dl.get-arkade.dev | sh
arkade install openfaas
ark
ade
Synchronous invocations
https://gw.example.com/function/generate-statement/
https://api.example.com/v1/generate-statement/
https://generate.example.com/
Asynchronous with NATS
GitOps for functions
1) CI -> checkout, build, push
2) CD -> test, deploy, canary
GitOps tooling (push)
• Push - event-driven
• Jenkins / Tekton
• GitLab
• OpenFaaS Cloud


Drift
More efficient - no lag
Incoming network access*
Push
Code &
Config
OpenFaaS Cloud 3) Checkout
Build & test
Push & deploy1) Authorize
2) Commit
OpenFaaS Cloud Demo
https://github.com/alexellis/gitops-webinar
OpenFaaS Cloud
• GitHub & GitLab integration
• Multi-user access OAuth2
• CI/CD
• Dashboards
• Builds, logs, metrics, health
• SealedSecret support
• Governance & teams
https://www.youtube.com/
watch?v=sD7hCwq3Gw0
GitOps tooling (pull)
• Pull - polling
• ArgoCD
• FluxCD
Pull
Code
Config
Builds
Higher complexity
Code + config repos
Flux install per repo
Easier to recover from disaster*
FluxCD & HelmOperator
https://github.com/stefanprodan/openfaas-flux
Install FluxCD & HelmOperator
GH_USER=${1:-alexellis}
GH_REPO=${2:-openfaas-flux}
GH_BRANCH=${3:-master}
GH_URL="git@github.com:${GH_USER}/${GH_REPO}"
helm upgrade -i flux fluxcd/flux --wait 
--namespace fluxcd 
--set git.url=${GH_URL} 
--set git.branch=${GH_BRANCH}
helm upgrade -i helm-operator fluxcd/helm-operator --wait 
--namespace fluxcd 
--set git.ssh.secretName=flux-git-deploy 
--set helm.versions=v3
FluxCD & HelmOperator
Deploy the OpenFaaS chart
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: openfaas
namespace: openfaas
spec:
releaseName: openfaas
chart:
repository: https://openfaas.github.io/faas-netes/
name: openfaas
version: 5.4.0
values:
generateBasicAuth: true
serviceType: LoadBalancer
operator:
create: true
Create a new function in Go
$ faas-cli new --lang go generate-pdf
.
|—- generate-pdf/
|—- generate-pdf/handler.go
└—- generate-pdf.yml
package function
func Handle(req []byte) string {
return "Enjoy your PDF”
}
version: 1.0
provider:
name: openfaas
gateway: http://127.0.0.1:8080

functions:
generate-pdf:
lang: go
handler: ./generate-pdf
image: generate-pdf:latest
$ faas-cli build/push/deploy



# Or:
$ faas-cli up
Function CRD - from stack.yml
$ faas-cli generate -f generate-pdf apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: generate-pdf
spec:
name: generate-pdf
image: generate-pdf:latest
Function CRD - from store
$ faas-cli generate --from-store 
colorise
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: colorise
spec:
name: colorise
image: alexellis2/openfaas-colorization:0.4.1
environment:
read_timeout: 60s
url_mode: "true"
write_debug: "false"
write_timeout: 60s
labels:
com.openfaas.ui.ext: jpg
Function CRD
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: generate-pdf
spec:
name: generate-pdf
image: alexellis2/generate-pdf:latest
environment:
write_timeout: "10s"
# Create a new Function
$ faas-cli new --lang go 
generate-pdf

$ faas-cli generate 
-f generate-pdf.yml
# Or from Function Store
$ faas-cli generate 
--from-store colorise
GitOps to deploy functions
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: functions
namespace: openfaas-fn
annotations:
fluxcd.io/ignore: "false"
fluxcd.io/automated: "false"
filter.fluxcd.io/certinfo: semver:~1.0
filter.fluxcd.io/podinfo: semver:~3.1
spec:
releaseName: functions
chart:
git: git@github.com:alexellis/openfaas-flux
ref: master
path: functions
values:
certinfo:
image: stefanprodan/certinfo:1.0.0
podinfo:
image: stefanprodan/podinfo:3.1.0
Function CRD
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: podinfo
labels:
{{ include "functions.labels" . | indent 4 }}
spec:
name: podinfo
image: {{ .Values.podinfo.image }}
readOnlyRootFilesystem: true
annotations:
com.openfaas.health.http.initialDelay: 2s
com.openfaas.health.http.path: /healthz
labels:
com.openfaas.scale.min: "1"
com.openfaas.scale.max: "5"
environment:
PODINFO_PORT: "8080"
PODINFO_UI_COLOR: “#34577c"
Flux demo
GitOps conclusion ⚖
• FluxCD
• Pull-based (polling)
• Repo for config/code
• Flux per repo
• Limited GitHub/
GitLab integration (no
statuses)
• No ARM support
• Alternative
• Push-based (webhooks)
• Harder to recover
• 1 repo for config/code
• Tools can be shared
• Statuses and checks
• ARM support
In summary 💻
• Serverless 2.0 (w/Kubernetes)
• anything, anywhere, any scale
• Template Store
• reduce duplication, maintenance

• OpenFaaS Cloud (push)
• Serverless PaaS with GitOps
• FluxCD & HelmOperator (pull)
• CD for OpenFaaS & Functions with CRD
Connect & Learn 👋
• Docs & workshop
• Blog posts & tutorials
• Join the community on
Slack
https://openfaas.com/
Thank You!
@alexellisuk / @openfaas

More Related Content

What's hot

OpenFaaS JeffConf 2017 - Milan
OpenFaaS JeffConf 2017 - MilanOpenFaaS JeffConf 2017 - Milan
OpenFaaS JeffConf 2017 - MilanAlex Ellis
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereAlex Ellis
 
Still waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operatorStill waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operatorAlex Ellis
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Henning Jacobs
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...CodeOps Technologies LLP
 
Immutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine ImagesImmutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine ImagesC4Media
 
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaSTechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaSAlex Ellis
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna KumarCodeOps Technologies LLP
 
Cloud native applications
Cloud native applicationsCloud native applications
Cloud native applicationsreallavalamp
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Virtual JBoss User Group
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaRichard Gee
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018Mario Romano
 
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Running tests for every commit: Gerrit, Jenkins, Docker, AWSRunning tests for every commit: Gerrit, Jenkins, Docker, AWS
Running tests for every commit: Gerrit, Jenkins, Docker, AWSAlexander Akbashev
 
Splunk user group - automating Splunk with Ansible
Splunk user group - automating Splunk with AnsibleSplunk user group - automating Splunk with Ansible
Splunk user group - automating Splunk with AnsibleMark Phillips
 
Partir à la découverte du serverless avec openfaas
Partir à la découverte du serverless avec openfaasPartir à la découverte du serverless avec openfaas
Partir à la découverte du serverless avec openfaasEmmanuel LEBEAUPIN
 
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devKonstantin Tarkus
 
Scaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with DockerScaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with DockerAtlassian
 

What's hot (20)

OpenFaaS JeffConf 2017 - Milan
OpenFaaS JeffConf 2017 - MilanOpenFaaS JeffConf 2017 - Milan
OpenFaaS JeffConf 2017 - Milan
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhere
 
Still waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operatorStill waiting for IPv6? Try the inlets-operator
Still waiting for IPv6? Try the inlets-operator
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
 
FaaS-and-Furious
FaaS-and-FuriousFaaS-and-Furious
FaaS-and-Furious
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
 
OpenWhisk
OpenWhiskOpenWhisk
OpenWhisk
 
Immutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine ImagesImmutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine Images
 
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaSTechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
 
Cloud native applications
Cloud native applicationsCloud native applications
Cloud native applications
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018
 
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Running tests for every commit: Gerrit, Jenkins, Docker, AWSRunning tests for every commit: Gerrit, Jenkins, Docker, AWS
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
 
Splunk user group - automating Splunk with Ansible
Splunk user group - automating Splunk with AnsibleSplunk user group - automating Splunk with Ansible
Splunk user group - automating Splunk with Ansible
 
Partir à la découverte du serverless avec openfaas
Partir à la découverte du serverless avec openfaasPartir à la découverte du serverless avec openfaas
Partir à la découverte du serverless avec openfaas
 
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
Scaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with DockerScaling Your First 1000 Containers with Docker
Scaling Your First 1000 Containers with Docker
 

Similar to GitOps meets Serverless

(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...Amazon Web Services
 
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...Edward Wilde
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Julien SIMON
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesSamuel Terburg
 
Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Julien SIMON
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.jsJulien SIMON
 
Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Harshal Shah
 
Effective Platform Building with Kubernetes. Is K8S new Linux?
Effective Platform Building with Kubernetes. Is K8S new Linux?Effective Platform Building with Kubernetes. Is K8S new Linux?
Effective Platform Building with Kubernetes. Is K8S new Linux?Wojciech Barczyński
 
High-Performance FAAS with Nuclio
High-Performance FAAS with NuclioHigh-Performance FAAS with Nuclio
High-Performance FAAS with NuclioQAware GmbH
 
Manila, an update from Liberty, OpenStack Summit - Tokyo
Manila, an update from Liberty, OpenStack Summit - TokyoManila, an update from Liberty, OpenStack Summit - Tokyo
Manila, an update from Liberty, OpenStack Summit - TokyoSean Cohen
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWSJulien SIMON
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 WorkshopVishal Biyani
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski QAware GmbH
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsChris Munns
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...DevDay.org
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhiskAlex Glikson
 
Serverless Pune meetup 3
Serverless Pune meetup 3Serverless Pune meetup 3
Serverless Pune meetup 3Vishal Biyani
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWSJulien SIMON
 
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...Rich Lee
 

Similar to GitOps meets Serverless (20)

(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
(DVO308) Docker & ECS in Production: How We Migrated Our Infrastructure from ...
 
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)
 
Building serverless apps with Node.js
Building serverless apps with Node.jsBuilding serverless apps with Node.js
Building serverless apps with Node.js
 
Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6Kubernetes101 - Pune Kubernetes Meetup 6
Kubernetes101 - Pune Kubernetes Meetup 6
 
Effective Platform Building with Kubernetes. Is K8S new Linux?
Effective Platform Building with Kubernetes. Is K8S new Linux?Effective Platform Building with Kubernetes. Is K8S new Linux?
Effective Platform Building with Kubernetes. Is K8S new Linux?
 
High-Performance FAAS with Nuclio
High-Performance FAAS with NuclioHigh-Performance FAAS with Nuclio
High-Performance FAAS with Nuclio
 
Manila, an update from Liberty, OpenStack Summit - Tokyo
Manila, an update from Liberty, OpenStack Summit - TokyoManila, an update from Liberty, OpenStack Summit - Tokyo
Manila, an update from Liberty, OpenStack Summit - Tokyo
 
Building Serverless APIs on AWS
Building Serverless APIs on AWSBuilding Serverless APIs on AWS
Building Serverless APIs on AWS
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski
 
muCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless ApplicationsmuCon 2017 - 12 Factor Serverless Applications
muCon 2017 - 12 Factor Serverless Applications
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Serverless Pune meetup 3
Serverless Pune meetup 3Serverless Pune meetup 3
Serverless Pune meetup 3
 
locize tech talk
locize tech talklocize tech talk
locize tech talk
 
Serverless Frameworks on AWS
Serverless Frameworks on AWSServerless Frameworks on AWS
Serverless Frameworks on AWS
 
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
GDG Taipei 2020 - Cloud and On-premises Applications Integration Using Event-...
 

More from Alex Ellis

The Need For A Cloud Native Tunnel
The Need For A Cloud Native TunnelThe Need For A Cloud Native Tunnel
The Need For A Cloud Native TunnelAlex Ellis
 
IoT + Docker - securing the datacenter, Peterborough
IoT + Docker - securing the datacenter, PeterboroughIoT + Docker - securing the datacenter, Peterborough
IoT + Docker - securing the datacenter, PeterboroughAlex Ellis
 
IoT: Docker and Raspberry Pi for CamJam
IoT: Docker and Raspberry Pi for CamJamIoT: Docker and Raspberry Pi for CamJam
IoT: Docker and Raspberry Pi for CamJamAlex Ellis
 
IoT in the DataCenter @ Container Camp, London
IoT in the DataCenter @ Container Camp, LondonIoT in the DataCenter @ Container Camp, London
IoT in the DataCenter @ Container Camp, LondonAlex Ellis
 
Docker Overview
Docker OverviewDocker Overview
Docker OverviewAlex Ellis
 
Docker & IoT: protecting the Datacenter
Docker & IoT: protecting the DatacenterDocker & IoT: protecting the Datacenter
Docker & IoT: protecting the DatacenterAlex Ellis
 

More from Alex Ellis (6)

The Need For A Cloud Native Tunnel
The Need For A Cloud Native TunnelThe Need For A Cloud Native Tunnel
The Need For A Cloud Native Tunnel
 
IoT + Docker - securing the datacenter, Peterborough
IoT + Docker - securing the datacenter, PeterboroughIoT + Docker - securing the datacenter, Peterborough
IoT + Docker - securing the datacenter, Peterborough
 
IoT: Docker and Raspberry Pi for CamJam
IoT: Docker and Raspberry Pi for CamJamIoT: Docker and Raspberry Pi for CamJam
IoT: Docker and Raspberry Pi for CamJam
 
IoT in the DataCenter @ Container Camp, London
IoT in the DataCenter @ Container Camp, LondonIoT in the DataCenter @ Container Camp, London
IoT in the DataCenter @ Container Camp, London
 
Docker Overview
Docker OverviewDocker Overview
Docker Overview
 
Docker & IoT: protecting the Datacenter
Docker & IoT: protecting the DatacenterDocker & IoT: protecting the Datacenter
Docker & IoT: protecting the Datacenter
 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
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 🔝✔️✔️Delhi Call girls
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
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-...Steffen Staab
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
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 🔝✔️✔️
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
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-...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

GitOps meets Serverless

  • 1. GitOps meets Serverless With Flux and OpenFaaS Alex Ellis (@alexellisuk) CNCF Ambassador & Founder @ OpenFaaS Ltd
  • 2. Agenda ⚡ • Serverless 1.0 vs 2.0 • OpenFaaS • Template store ⌨ • Vs. Kubernetes • Continuous deployment 🤓 • OpenFaaS Cloud • Flux @openfaas / @alexellisuk
  • 3. Serverless & FaaS • Easy to manage: • Stateless • Isomorphic • Event-driven or REST • Smaller • Focus on code
  • 4. Serverless 1.0 (Cloud Functions/FaaS)
  • 6.
  • 7. OpenFaaS - Simple, Secure, Serverless • Founded in 2016 to “make Serverless portable” 🎂
 • Three values: • Developer-focused • Easy to operate • Community-centric > 21k stars > 250 contributors > 2.5k Slack
  • 8. PLONK Stack • Prometheus • Linux/Linkerd • OpenFaaS • NATS • Kubernetes
  • 9. 🤓
 “But, I have a CKA/D, so why should I care?”
  • 10. • A Node.js microservice for Kubernetes Adding a new service (the hard way) Did we miss anything?
  • 11. OpenFaaS: Template Store handler.js (“node12”) stack.yml • Memory / CPU limits • Labels / Annotations • Environment variables • Secrets
  • 12.
  • 13. Slide Title SUBTITLE • List
 • List
 • List
 • List
 ◦ List
 ◦ List
 ▪ List
 ▪ List 
 ▪ List
 ▪ List

  • 14. Install PLONK stack curl https://dl.get-arkade.dev | sh arkade install openfaas ark ade
  • 17. GitOps for functions 1) CI -> checkout, build, push 2) CD -> test, deploy, canary
  • 18. GitOps tooling (push) • Push - event-driven • Jenkins / Tekton • GitLab • OpenFaaS Cloud 
 Drift More efficient - no lag Incoming network access* Push Code & Config
  • 19. OpenFaaS Cloud 3) Checkout Build & test Push & deploy1) Authorize 2) Commit
  • 21. OpenFaaS Cloud • GitHub & GitLab integration • Multi-user access OAuth2 • CI/CD • Dashboards • Builds, logs, metrics, health • SealedSecret support • Governance & teams https://www.youtube.com/ watch?v=sD7hCwq3Gw0
  • 22. GitOps tooling (pull) • Pull - polling • ArgoCD • FluxCD Pull Code Config Builds Higher complexity Code + config repos Flux install per repo Easier to recover from disaster*
  • 24. Install FluxCD & HelmOperator GH_USER=${1:-alexellis} GH_REPO=${2:-openfaas-flux} GH_BRANCH=${3:-master} GH_URL="git@github.com:${GH_USER}/${GH_REPO}" helm upgrade -i flux fluxcd/flux --wait --namespace fluxcd --set git.url=${GH_URL} --set git.branch=${GH_BRANCH} helm upgrade -i helm-operator fluxcd/helm-operator --wait --namespace fluxcd --set git.ssh.secretName=flux-git-deploy --set helm.versions=v3
  • 26. Deploy the OpenFaaS chart apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: name: openfaas namespace: openfaas spec: releaseName: openfaas chart: repository: https://openfaas.github.io/faas-netes/ name: openfaas version: 5.4.0 values: generateBasicAuth: true serviceType: LoadBalancer operator: create: true
  • 27. Create a new function in Go $ faas-cli new --lang go generate-pdf . |—- generate-pdf/ |—- generate-pdf/handler.go └—- generate-pdf.yml package function func Handle(req []byte) string { return "Enjoy your PDF” } version: 1.0 provider: name: openfaas gateway: http://127.0.0.1:8080
 functions: generate-pdf: lang: go handler: ./generate-pdf image: generate-pdf:latest $ faas-cli build/push/deploy
 
 # Or: $ faas-cli up
  • 28. Function CRD - from stack.yml $ faas-cli generate -f generate-pdf apiVersion: openfaas.com/v1alpha2 kind: Function metadata: name: generate-pdf spec: name: generate-pdf image: generate-pdf:latest
  • 29. Function CRD - from store $ faas-cli generate --from-store colorise apiVersion: openfaas.com/v1alpha2 kind: Function metadata: name: colorise spec: name: colorise image: alexellis2/openfaas-colorization:0.4.1 environment: read_timeout: 60s url_mode: "true" write_debug: "false" write_timeout: 60s labels: com.openfaas.ui.ext: jpg
  • 30. Function CRD apiVersion: openfaas.com/v1alpha2 kind: Function metadata: name: generate-pdf spec: name: generate-pdf image: alexellis2/generate-pdf:latest environment: write_timeout: "10s" # Create a new Function $ faas-cli new --lang go generate-pdf
 $ faas-cli generate -f generate-pdf.yml # Or from Function Store $ faas-cli generate --from-store colorise
  • 31. GitOps to deploy functions apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: name: functions namespace: openfaas-fn annotations: fluxcd.io/ignore: "false" fluxcd.io/automated: "false" filter.fluxcd.io/certinfo: semver:~1.0 filter.fluxcd.io/podinfo: semver:~3.1 spec: releaseName: functions chart: git: git@github.com:alexellis/openfaas-flux ref: master path: functions values: certinfo: image: stefanprodan/certinfo:1.0.0 podinfo: image: stefanprodan/podinfo:3.1.0
  • 32. Function CRD apiVersion: openfaas.com/v1alpha2 kind: Function metadata: name: podinfo labels: {{ include "functions.labels" . | indent 4 }} spec: name: podinfo image: {{ .Values.podinfo.image }} readOnlyRootFilesystem: true annotations: com.openfaas.health.http.initialDelay: 2s com.openfaas.health.http.path: /healthz labels: com.openfaas.scale.min: "1" com.openfaas.scale.max: "5" environment: PODINFO_PORT: "8080" PODINFO_UI_COLOR: “#34577c"
  • 34. GitOps conclusion ⚖ • FluxCD • Pull-based (polling) • Repo for config/code • Flux per repo • Limited GitHub/ GitLab integration (no statuses) • No ARM support • Alternative • Push-based (webhooks) • Harder to recover • 1 repo for config/code • Tools can be shared • Statuses and checks • ARM support
  • 35. In summary 💻 • Serverless 2.0 (w/Kubernetes) • anything, anywhere, any scale • Template Store • reduce duplication, maintenance
 • OpenFaaS Cloud (push) • Serverless PaaS with GitOps • FluxCD & HelmOperator (pull) • CD for OpenFaaS & Functions with CRD
  • 36. Connect & Learn 👋 • Docs & workshop • Blog posts & tutorials • Join the community on Slack https://openfaas.com/