Serverless orchestration and automation with Cloud Workflows

Márton Kodok
Márton KodokGoogle Developer Expert/Senior Software Engineer/Team-leader/Mentor at Reea
Serverless orchestration and automation
with GCPWorkflows
May 2021 - Devops Pro Europe, Vilnius
Márton Kodok / @martonkodok
Google Developer Expert at REEA.net
● Among the Top 3 romanians on Stackoverflow 190K reputation
● Google Developer Expert on Cloud technologies
● Crafting Web/Mobile backends at REEA.net
● BigQuery + Redis database engine expert
Slideshare: martonkodok
Articles: martonkodok.medium.com
Twitter: @martonkodok
StackOverflow: pentium10
GitHub: pentium10
Serverless orchestration and automation with GCP Workflows @martonkodok
About me
1. Challenges in connecting services
2. What is Workflows? - HTTP based service orchestration and automation
3. Introduction to Workflows - automate complex processes
4. Practical use cases
5. Automate, orchestrate and provide reliable line-of-business automation
6. Conclusions
Agenda
Serverless orchestration and automation with GCP Workflows @martonkodok
● Connectivity - should be easy, but in reality you need to figure out
● Parse the results
● Decisions and conditional step executions
● No built-in error handling, logging
● Struggling with polling, retries, exponential backoff
● Scaling up and down to zero
● Authentication
Challenges in connecting services
Serverless orchestration and automation with GCP Workflows @martonkodok
Meet Workflows
https://cloud.google.com/workflows
Serverless orchestration and automation with GCP Workflows @martonkodok
Workflows in Google Cloud portfolio
Introduction
Orchestrate any
1. Google Cloud API
2. SaaS API
3. External or private APIs.
Serverless
Compute
External
API’s
Google
API’s
etc...
Workflows - orchestrate & integrate
SaaS
API’s
Private
API’s
Other
Clouds
Step-Automation-as-a-Service - Serverless HTTP service automation
Declarative workflow language (YAML, JSON)
Decent pricing (internal: $1/100K steps, external: $2.5/100K) *Dec 2020
Built-in decision and conditional executions expression formulas, operation on var
Subworkflows similar to routine in a programming language with input/return var
Support for external API calls out of the box support outside of Google Cloud
Integrates with any Google Cloud product without worrying about authentication
What is GCP Workflows?
Serverless orchestration and automation with GCP Workflows @martonkodok
OAuth, OIDC, Secret Manager integration
Enterprise
Security
Keep your workflows secure
X
Authenticated
Invocations
Authenticated
calls to Google Cloud
services
Integration with
Secret Manager
Encryption at rest and
in transit
External API 1
External API 2 External API
Code example
@martonkodok
- callMyFunction:
call: http.get
args:
url: https://us-central1-project123.cloudfunctions.net/...
query:
metric: NoOfTrs
result: metricResult
- saveResult:
switch:
- condition: ${ metricResult.body.TrNo > 100 }
call: http.post
args:
url: https://mydeployment.notify....
body:
Metric: ${ metricResult.body.TrNo }
getMetric
TrNo>100?
End
Yes
No
{“metric”:”NoOfTrs”}
Notify
hello.yaml
Anatomy of a Cloud Workflow!
Serverless orchestration and automation with GCP Workflows @martonkodok
workflowRevisionId: 000001-de1
argument: 'null'
startTime: '2020-10-16T20:19:34.448323739Z'
name:
projects/985596417983/locations/us-central1/workflows/hello/executions/95c99744-c73c-
4065-a696-940bc7658c33
result: '"Hello, Cloud Workflows!"'
endTime: '2020-10-16T20:19:34.845536315Z'
state: SUCCEEDED
Deploying gcloud beta workflows deploy hello --source=hello.yaml
Executing gcloud beta workflows execute hello --data={“var”:”value”}
Describing gcloud beta workflows executions describe-last
Sample Workflows
Serverless orchestration and automation with GCP Workflows @martonkodok
IT management automation
Combine automation with
scheduler
Wait for service checks
Orchestrate work across
Compute Engine, PubSub,
Stackdriver and other Google
Cloud Products
9 AM trigger
Start a Compute
Engine VM
Log the event
App
Started?
No
Wait 60 seconds
Notify the team
E-commerce invoice generation with Workflows
Steps orchestration
Reliable execution, with error
handling and retries
Orchestration microservices
or other API’s
Create an invoice
Generate PDF
Send PDF via email
Receive Order
Cloud
Run
App
Engine
Cloud
Run
Sending reminders to accounts with overdue payments
Process array elements
Execute steps
conditionally
For each customer:
Get a list of customers
Send reminder
overdue
?
Yes
Code Examples
Serverless orchestration and automation with GCP Workflows @martonkodok
1. HTTP Post
2. Sequence two steps
3. HTTP Post combined with Secret Manager credentials
4. Switch block
5. Working with subworkflows
Code Examples
Serverless orchestration and automation with GCP Workflows @martonkodok
http_post.yaml
Making an external HTTP POST request
Serverless orchestration and automation with GCP Workflows @martonkodok
{
"archived":false,
"created_at":"2020-10-16T17:40:17+0000",
"id":"bit.ly/35452TM",
"link":"https://bit.ly/35452TM",
"long_url":"<truncated>",
}
wikipedia.yaml
Sequence two steps to get data from Wikipedia
Serverless orchestration and automation with GCP Workflows @martonkodok
subworkflow.yaml
Subworkflow
Serverless orchestration and automation with GCP Workflows @martonkodok
call
call
def
retries.yaml
Retries
Serverless orchestration and automation with GCP Workflows @martonkodok
Retries HTTP status codes [429, 502, 503, 504], connection error, or timeout
Orchestrate and automate the Cloud
Serverless orchestration and automation with GCP Workflows @martonkodok
Firestore Backups the easy way with Cloud Workflows
- Cloud Scheduler
- Cloud Workflows
- Cloud Firestore
- Cloud Storage
Full guide article on:
martonkodok.medium.com
Cloud
Workflows
Cloud
Storage
Cloud
Scheduler
Firebase
Cloud
Firestore
backup
Roles and
Permissions
Cloud IAM
authorize
Using Workflows to load Cloud Storage files into BigQuery
- Cloud Workflows
- Cloud Storage
- BigQuery
Full guide article on:
martonkodok.medium.com
Cloud
Storage
BigQuery
Cloud
Workflows
Authenticated
Invocations
foreach
Run shell commands and orchestrate Compute Engine VMs
- Cloud Workflows
- Cloud Build
- Compute Engine
- Identity-Aware Proxy
Full guide article on:
martonkodok.medium.com
Cloud Build
Shell command
Serverless Secure Connect Exec command
Firewall
Compute Engine
Cloud IAP Tunnel
Cloud
Workflows
Run shell commands and orchestrate Compute Engine VMs
- Cloud Workflows
- Cloud Build
- Compute Engine
- Identity-Aware Proxy
Full guide article on:
martonkodok.medium.com
Cloud Workflow Steps
Cloud
Workflows
Execution
Authorize
Cloud Build
Roles and
Permissions
Cloud IAM
Shell
Service Account
Start VM
Compute
Engine
Submit Stop VM
Compute
Engine
Firewall
Compute Engine
Cloud
IAP
Tunnel
wait wait
Conclusions
Serverless orchestration and automation with GCP Workflows @martonkodok
Reliable workflow execution - execute workflows for enterprise business apps
Low latency of execution - no cold starts
Built-in error handling out of the box error handling with configurable retry policies
Passing variable built-in JSON parsing and expression-based variable manipulation
Rich runtime iterating through an array, embedded steps for readability
Secret Manager integration out of the box
Cloud Logging out of the box integration with Cloud Logging
Reading from Firestore read/write an entry using Yaml syntax
Benefits of Cloud Workflows
Serverless orchestration and automation with GCP Workflows @martonkodok
Easy to build/operate
Scales out
Does not lose state
Handles errors/timeouts
Out-of-the-box support of Cloud APIs
Auditable
Developer friendly
Serverless orchestration and automation with GCP Workflows @martonkodok
The possibilities are endless
Marketing Retail IndustrialandIoT Developer
Event driven marketing
workflow execution
Relay conversions to
customer profiles in external
services
Workflow based emails,
discounts, promotions
Order management
Inventory chain operations
Data gathering and
processing
Synchronize systems
Generate state machines
Verify equipment lifecycle
Workflow based
maintenance needs
Digitalization of internal
policies
Automate the Cloud
Shell-script replacement
Orchestrate devops
workflows
@martonkodok
Thank you. Q&A.
Slides available on:
slideshare.net/martonkodok
Reea.net - Integrated web solutions driven by creativity
to deliver projects.
1 of 30

Recommended

Setup Kubernetes with flannel on ubuntu platform by
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformAjeet Singh
188 views7 slides
Introduction to Terraform and Google Cloud Platform by
Introduction to Terraform and Google Cloud PlatformIntroduction to Terraform and Google Cloud Platform
Introduction to Terraform and Google Cloud PlatformPradeep Bhadani
572 views17 slides
Firebase PPT by
Firebase PPTFirebase PPT
Firebase PPTJATIN GUPTA
19.1K views12 slides
Terraform on Azure by
Terraform on AzureTerraform on Azure
Terraform on AzureJulien Corioland
1.7K views14 slides
Cloud Migration: Moving to the Cloud by
Cloud Migration: Moving to the CloudCloud Migration: Moving to the Cloud
Cloud Migration: Moving to the CloudDr.-Ing. Michael Menzel
10.7K views26 slides
Selenium-4-and-appium-2 by
Selenium-4-and-appium-2Selenium-4-and-appium-2
Selenium-4-and-appium-2Manoj Kumar Kumar
370 views25 slides

More Related Content

What's hot

Docker Networking Overview by
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
21K views28 slides
Introduction to DevOps | Edureka by
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
1.5K views32 slides
COPADO - Plateforme de DEVOPS pour Salesforce by
COPADO - Plateforme de DEVOPS pour SalesforceCOPADO - Plateforme de DEVOPS pour Salesforce
COPADO - Plateforme de DEVOPS pour SalesforceThierry TROUIN ☁
329 views15 slides
Introduction to Docker Compose by
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
16.4K views29 slides
Cloud Computing by
Cloud ComputingCloud Computing
Cloud ComputingOmar Fathy
76 views40 slides
Mule Common Logging & Error Handling Framework by
Mule Common Logging & Error Handling FrameworkMule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling FrameworkVijay Reddy
2.3K views16 slides

What's hot(20)

Introduction to DevOps | Edureka by Edureka!
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!1.5K views
COPADO - Plateforme de DEVOPS pour Salesforce by Thierry TROUIN ☁
COPADO - Plateforme de DEVOPS pour SalesforceCOPADO - Plateforme de DEVOPS pour Salesforce
COPADO - Plateforme de DEVOPS pour Salesforce
Thierry TROUIN ☁329 views
Cloud Computing by Omar Fathy
Cloud ComputingCloud Computing
Cloud Computing
Omar Fathy76 views
Mule Common Logging & Error Handling Framework by Vijay Reddy
Mule Common Logging & Error Handling FrameworkMule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling Framework
Vijay Reddy2.3K views
Introducing firebase by Farouk Touzi
Introducing firebaseIntroducing firebase
Introducing firebase
Farouk Touzi198 views
Cloud Migration Strategy and Best Practices by QBurst
Cloud Migration Strategy and Best PracticesCloud Migration Strategy and Best Practices
Cloud Migration Strategy and Best Practices
QBurst11.1K views
Monitoring Kubernetes with Prometheus by Grafana Labs
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
Grafana Labs648 views
DevOps Powerpoint Presentation Slides by SlideTeam
DevOps Powerpoint Presentation SlidesDevOps Powerpoint Presentation Slides
DevOps Powerpoint Presentation Slides
SlideTeam5.6K views
Building Mobile Apps on Salesforce Platform with Mobile SDK by Salesforce Developers
Building Mobile Apps on Salesforce Platform with Mobile SDKBuilding Mobile Apps on Salesforce Platform with Mobile SDK
Building Mobile Apps on Salesforce Platform with Mobile SDK
Salesforce Developers13.6K views
Ivan Gubynskyy Salesforce CRM and Platform Overview by LogeekNightUkraine
Ivan Gubynskyy Salesforce CRM and Platform OverviewIvan Gubynskyy Salesforce CRM and Platform Overview
Ivan Gubynskyy Salesforce CRM and Platform Overview
LogeekNightUkraine432 views
ZMON: Monitoring Zalando's Engineering Platform by Zalando Technology
ZMON: Monitoring Zalando's Engineering PlatformZMON: Monitoring Zalando's Engineering Platform
ZMON: Monitoring Zalando's Engineering Platform
Zalando Technology5.8K views
Azure Migrate by Mustafa
Azure MigrateAzure Migrate
Azure Migrate
Mustafa 4.6K views
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft... by Amazon Web Services
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Amazon Web Services10.4K views
MuleSoft Surat Meetup#54 - MuleSoft Automation by Jitendra Bafna
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
Jitendra Bafna403 views
A comprehensive guide to Salesforce Org Strategy by Gaytri khandelwal
A comprehensive guide to Salesforce Org StrategyA comprehensive guide to Salesforce Org Strategy
A comprehensive guide to Salesforce Org Strategy
Gaytri khandelwal6.3K views

Similar to Serverless orchestration and automation with Cloud Workflows

Serverless orchestration and automation with Cloud Workflows by
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud WorkflowsMárton Kodok
370 views32 slides
Cloud Workflows What's new in serverless orchestration and automation by
Cloud Workflows What's new in serverless orchestration and automationCloud Workflows What's new in serverless orchestration and automation
Cloud Workflows What's new in serverless orchestration and automationMárton Kodok
190 views38 slides
Serverless orchestration and automation with Cloud Workflows by
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud WorkflowsMárton Kodok
762 views28 slides
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon by
6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud PlatformonMárton Kodok
133 views44 slides
GDG DevFest Romania - Architecting for the Google Cloud Platform by
GDG DevFest Romania - Architecting for the Google Cloud PlatformGDG DevFest Romania - Architecting for the Google Cloud Platform
GDG DevFest Romania - Architecting for the Google Cloud PlatformMárton Kodok
462 views55 slides
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp... by
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...Marco Obinu
231 views23 slides

Similar to Serverless orchestration and automation with Cloud Workflows(20)

Serverless orchestration and automation with Cloud Workflows by Márton Kodok
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud Workflows
Márton Kodok370 views
Cloud Workflows What's new in serverless orchestration and automation by Márton Kodok
Cloud Workflows What's new in serverless orchestration and automationCloud Workflows What's new in serverless orchestration and automation
Cloud Workflows What's new in serverless orchestration and automation
Márton Kodok190 views
Serverless orchestration and automation with Cloud Workflows by Márton Kodok
Serverless orchestration and automation with Cloud WorkflowsServerless orchestration and automation with Cloud Workflows
Serverless orchestration and automation with Cloud Workflows
Márton Kodok762 views
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon by Márton Kodok
6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon6. DISZ - Webalkalmazások skálázhatósága  a Google Cloud Platformon
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
Márton Kodok133 views
GDG DevFest Romania - Architecting for the Google Cloud Platform by Márton Kodok
GDG DevFest Romania - Architecting for the Google Cloud PlatformGDG DevFest Romania - Architecting for the Google Cloud Platform
GDG DevFest Romania - Architecting for the Google Cloud Platform
Márton Kodok462 views
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp... by Marco Obinu
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
Marco Obinu231 views
Google Cloud Next '22 Recap: Serverless & Data edition by Daniel Zivkovic
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
Daniel Zivkovic91 views
Cloud Run - the rise of serverless and containerization by Márton Kodok
Cloud Run - the rise of serverless and containerizationCloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerization
Márton Kodok61 views
GDG Heraklion - Architecting for the Google Cloud Platform by Márton Kodok
GDG Heraklion - Architecting for the Google Cloud PlatformGDG Heraklion - Architecting for the Google Cloud Platform
GDG Heraklion - Architecting for the Google Cloud Platform
Márton Kodok754 views
Google Cloud Platform (GCP) At a Glance by Cloud Analogy
Google Cloud Platform (GCP)  At a GlanceGoogle Cloud Platform (GCP)  At a Glance
Google Cloud Platform (GCP) At a Glance
Cloud Analogy1.2K views
Integrating Ansible Tower with security orchestration and cloud management by Joel W. King
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud management
Joel W. King1K views
End-to-end test automation with Endtest.dev by Konstantin Tarkus
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
Orchestraing the Blockchain Using Containers by Andrew Kennedy
Orchestraing the Blockchain Using ContainersOrchestraing the Blockchain Using Containers
Orchestraing the Blockchain Using Containers
Andrew Kennedy1.4K views
IglooConf 2020 - API management for microservices in a hybrid and multi-cloud... by Tom Kerkhove
IglooConf 2020 - API management for microservices in a hybrid and multi-cloud...IglooConf 2020 - API management for microservices in a hybrid and multi-cloud...
IglooConf 2020 - API management for microservices in a hybrid and multi-cloud...
Tom Kerkhove99 views
Microsoft Azure Traffic Manager by Ido Katz
Microsoft Azure Traffic ManagerMicrosoft Azure Traffic Manager
Microsoft Azure Traffic Manager
Ido Katz1.1K views
Sprint 17 by ManageIQ
Sprint 17Sprint 17
Sprint 17
ManageIQ181 views
Why NBC Universal Migrated to MongoDB Atlas by Datavail
Why NBC Universal Migrated to MongoDB AtlasWhy NBC Universal Migrated to MongoDB Atlas
Why NBC Universal Migrated to MongoDB Atlas
Datavail314 views
DCEU 18: Docker Container Networking by Docker, Inc.
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
Docker, Inc.821 views
Yannis Zarkadas. Enterprise data science workflows on kubeflow by MarynaHoldaieva
Yannis Zarkadas. Enterprise data science workflows on kubeflowYannis Zarkadas. Enterprise data science workflows on kubeflow
Yannis Zarkadas. Enterprise data science workflows on kubeflow
MarynaHoldaieva70 views

More from Márton Kodok

Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionMárton Kodok
4 views55 slides
DevBCN Vertex AI - Pipelines for your MLOps workflows by
DevBCN Vertex AI - Pipelines for your MLOps workflowsDevBCN Vertex AI - Pipelines for your MLOps workflows
DevBCN Vertex AI - Pipelines for your MLOps workflowsMárton Kodok
67 views57 slides
Discover BigQuery ML, build your own CREATE MODEL statement by
Discover BigQuery ML, build your own CREATE MODEL statementDiscover BigQuery ML, build your own CREATE MODEL statement
Discover BigQuery ML, build your own CREATE MODEL statementMárton Kodok
71 views61 slides
BigQuery best practices and recommendations to reduce costs with BI Engine, S... by
BigQuery best practices and recommendations to reduce costs with BI Engine, S...BigQuery best practices and recommendations to reduce costs with BI Engine, S...
BigQuery best practices and recommendations to reduce costs with BI Engine, S...Márton Kodok
342 views38 slides
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud by
Vertex AI - Unified ML Platform for the entire AI workflow on Google CloudVertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Vertex AI - Unified ML Platform for the entire AI workflow on Google CloudMárton Kodok
1.2K views50 slides
Vertex AI: Pipelines for your MLOps workflows by
Vertex AI: Pipelines for your MLOps workflowsVertex AI: Pipelines for your MLOps workflows
Vertex AI: Pipelines for your MLOps workflowsMárton Kodok
787 views31 slides

More from Márton Kodok(20)

Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok4 views
DevBCN Vertex AI - Pipelines for your MLOps workflows by Márton Kodok
DevBCN Vertex AI - Pipelines for your MLOps workflowsDevBCN Vertex AI - Pipelines for your MLOps workflows
DevBCN Vertex AI - Pipelines for your MLOps workflows
Márton Kodok67 views
Discover BigQuery ML, build your own CREATE MODEL statement by Márton Kodok
Discover BigQuery ML, build your own CREATE MODEL statementDiscover BigQuery ML, build your own CREATE MODEL statement
Discover BigQuery ML, build your own CREATE MODEL statement
Márton Kodok71 views
BigQuery best practices and recommendations to reduce costs with BI Engine, S... by Márton Kodok
BigQuery best practices and recommendations to reduce costs with BI Engine, S...BigQuery best practices and recommendations to reduce costs with BI Engine, S...
BigQuery best practices and recommendations to reduce costs with BI Engine, S...
Márton Kodok342 views
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud by Márton Kodok
Vertex AI - Unified ML Platform for the entire AI workflow on Google CloudVertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Márton Kodok1.2K views
Vertex AI: Pipelines for your MLOps workflows by Márton Kodok
Vertex AI: Pipelines for your MLOps workflowsVertex AI: Pipelines for your MLOps workflows
Vertex AI: Pipelines for your MLOps workflows
Márton Kodok787 views
BigdataConference Europe - BigQuery ML by Márton Kodok
BigdataConference Europe - BigQuery MLBigdataConference Europe - BigQuery ML
BigdataConference Europe - BigQuery ML
Márton Kodok147 views
DevFest Romania 2020 Keynote: Bringing the Cloud to you. by Márton Kodok
DevFest Romania 2020 Keynote: Bringing the Cloud to you.DevFest Romania 2020 Keynote: Bringing the Cloud to you.
DevFest Romania 2020 Keynote: Bringing the Cloud to you.
Márton Kodok66 views
BigQuery ML - Machine learning at scale using SQL by Márton Kodok
BigQuery ML - Machine learning at scale using SQLBigQuery ML - Machine learning at scale using SQL
BigQuery ML - Machine learning at scale using SQL
Márton Kodok303 views
Applying BigQuery ML on e-commerce data analytics by Márton Kodok
Applying BigQuery ML on e-commerce data analyticsApplying BigQuery ML on e-commerce data analytics
Applying BigQuery ML on e-commerce data analytics
Márton Kodok1.5K views
Supercharge your data analytics with BigQuery by Márton Kodok
Supercharge your data analytics with BigQuerySupercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuery
Márton Kodok189 views
Vibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer Expertig by Márton Kodok
Vibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer ExpertigVibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer Expertig
Vibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer Expertig
Márton Kodok150 views
BigQuery ML - Machine learning at scale using SQL by Márton Kodok
BigQuery ML - Machine learning at scale using SQLBigQuery ML - Machine learning at scale using SQL
BigQuery ML - Machine learning at scale using SQL
Márton Kodok1.1K views
Google Cloud Platform Solutions for DevOps Engineers by Márton Kodok
Google Cloud Platform Solutions  for DevOps EngineersGoogle Cloud Platform Solutions  for DevOps Engineers
Google Cloud Platform Solutions for DevOps Engineers
Márton Kodok1.1K views
Next18 Extended Targu Mures - Bringing the Cloud to you by Márton Kodok
Next18 Extended Targu Mures - Bringing the Cloud to youNext18 Extended Targu Mures - Bringing the Cloud to you
Next18 Extended Targu Mures - Bringing the Cloud to you
Márton Kodok81 views
GCP - A felhőalapú architektúrák és szolgáltatások by Márton Kodok
GCP - A felhőalapú architektúrák és szolgáltatásokGCP - A felhőalapú architektúrák és szolgáltatások
GCP - A felhőalapú architektúrák és szolgáltatások
Márton Kodok157 views
Efikot - Smart City, okos város - a jövőnk kulcsa by Márton Kodok
Efikot - Smart City, okos város - a jövőnk kulcsaEfikot - Smart City, okos város - a jövőnk kulcsa
Efikot - Smart City, okos város - a jövőnk kulcsa
Márton Kodok170 views
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery by Márton Kodok
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQueryCodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
Márton Kodok358 views
Voxxed Days Cluj - Powering interactive data analysis with Google BigQuery by Márton Kodok
Voxxed Days Cluj - Powering interactive data analysis with Google BigQueryVoxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Voxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Márton Kodok417 views
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery by Márton Kodok
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryGDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
Márton Kodok300 views

Recently uploaded

What Can Employee Monitoring Software Do?​ by
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​wAnywhere
21 views11 slides
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida by
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDeltares
18 views9 slides
DevsRank by
DevsRankDevsRank
DevsRankdevsrank786
11 views1 slide
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsRa'Fat Al-Msie'deen
5 views49 slides
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan... by
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...Deltares
11 views30 slides
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... by
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...Deltares
17 views17 slides

Recently uploaded(20)

What Can Employee Monitoring Software Do?​ by wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere21 views
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida by Deltares
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - PridaDSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
DSD-INT 2023 Dam break simulation in Derna (Libya) using HydroMT_SFINCS - Prida
Deltares18 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan... by Deltares
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
Deltares11 views
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... by Deltares
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
Deltares17 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller36 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 views
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 views
SUGCON ANZ Presentation V2.1 Final.pptx by Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor22 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares9 views
Citi TechTalk Session 2: Kafka Deep Dive by confluent
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent17 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares13 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
El Arte de lo Possible by Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j38 views
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... by Deltares
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
Deltares9 views
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023 by Icinga
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
Icinga38 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares11 views
Neo4j y GenAI by Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j42 views

Serverless orchestration and automation with Cloud Workflows

  • 1. Serverless orchestration and automation with GCPWorkflows May 2021 - Devops Pro Europe, Vilnius Márton Kodok / @martonkodok Google Developer Expert at REEA.net
  • 2. ● Among the Top 3 romanians on Stackoverflow 190K reputation ● Google Developer Expert on Cloud technologies ● Crafting Web/Mobile backends at REEA.net ● BigQuery + Redis database engine expert Slideshare: martonkodok Articles: martonkodok.medium.com Twitter: @martonkodok StackOverflow: pentium10 GitHub: pentium10 Serverless orchestration and automation with GCP Workflows @martonkodok About me
  • 3. 1. Challenges in connecting services 2. What is Workflows? - HTTP based service orchestration and automation 3. Introduction to Workflows - automate complex processes 4. Practical use cases 5. Automate, orchestrate and provide reliable line-of-business automation 6. Conclusions Agenda Serverless orchestration and automation with GCP Workflows @martonkodok
  • 4. ● Connectivity - should be easy, but in reality you need to figure out ● Parse the results ● Decisions and conditional step executions ● No built-in error handling, logging ● Struggling with polling, retries, exponential backoff ● Scaling up and down to zero ● Authentication Challenges in connecting services Serverless orchestration and automation with GCP Workflows @martonkodok
  • 6. Workflows in Google Cloud portfolio Introduction Orchestrate any 1. Google Cloud API 2. SaaS API 3. External or private APIs. Serverless Compute External API’s Google API’s etc... Workflows - orchestrate & integrate SaaS API’s Private API’s Other Clouds
  • 7. Step-Automation-as-a-Service - Serverless HTTP service automation Declarative workflow language (YAML, JSON) Decent pricing (internal: $1/100K steps, external: $2.5/100K) *Dec 2020 Built-in decision and conditional executions expression formulas, operation on var Subworkflows similar to routine in a programming language with input/return var Support for external API calls out of the box support outside of Google Cloud Integrates with any Google Cloud product without worrying about authentication What is GCP Workflows? Serverless orchestration and automation with GCP Workflows @martonkodok
  • 8. OAuth, OIDC, Secret Manager integration Enterprise Security Keep your workflows secure X Authenticated Invocations Authenticated calls to Google Cloud services Integration with Secret Manager Encryption at rest and in transit External API 1 External API 2 External API
  • 9. Code example @martonkodok - callMyFunction: call: http.get args: url: https://us-central1-project123.cloudfunctions.net/... query: metric: NoOfTrs result: metricResult - saveResult: switch: - condition: ${ metricResult.body.TrNo > 100 } call: http.post args: url: https://mydeployment.notify.... body: Metric: ${ metricResult.body.TrNo } getMetric TrNo>100? End Yes No {“metric”:”NoOfTrs”} Notify
  • 10. hello.yaml Anatomy of a Cloud Workflow! Serverless orchestration and automation with GCP Workflows @martonkodok workflowRevisionId: 000001-de1 argument: 'null' startTime: '2020-10-16T20:19:34.448323739Z' name: projects/985596417983/locations/us-central1/workflows/hello/executions/95c99744-c73c- 4065-a696-940bc7658c33 result: '"Hello, Cloud Workflows!"' endTime: '2020-10-16T20:19:34.845536315Z' state: SUCCEEDED Deploying gcloud beta workflows deploy hello --source=hello.yaml Executing gcloud beta workflows execute hello --data={“var”:”value”} Describing gcloud beta workflows executions describe-last
  • 11. Sample Workflows Serverless orchestration and automation with GCP Workflows @martonkodok
  • 12. IT management automation Combine automation with scheduler Wait for service checks Orchestrate work across Compute Engine, PubSub, Stackdriver and other Google Cloud Products 9 AM trigger Start a Compute Engine VM Log the event App Started? No Wait 60 seconds Notify the team
  • 13. E-commerce invoice generation with Workflows Steps orchestration Reliable execution, with error handling and retries Orchestration microservices or other API’s Create an invoice Generate PDF Send PDF via email Receive Order Cloud Run App Engine Cloud Run
  • 14. Sending reminders to accounts with overdue payments Process array elements Execute steps conditionally For each customer: Get a list of customers Send reminder overdue ? Yes
  • 15. Code Examples Serverless orchestration and automation with GCP Workflows @martonkodok
  • 16. 1. HTTP Post 2. Sequence two steps 3. HTTP Post combined with Secret Manager credentials 4. Switch block 5. Working with subworkflows Code Examples Serverless orchestration and automation with GCP Workflows @martonkodok
  • 17. http_post.yaml Making an external HTTP POST request Serverless orchestration and automation with GCP Workflows @martonkodok { "archived":false, "created_at":"2020-10-16T17:40:17+0000", "id":"bit.ly/35452TM", "link":"https://bit.ly/35452TM", "long_url":"<truncated>", }
  • 18. wikipedia.yaml Sequence two steps to get data from Wikipedia Serverless orchestration and automation with GCP Workflows @martonkodok
  • 19. subworkflow.yaml Subworkflow Serverless orchestration and automation with GCP Workflows @martonkodok call call def
  • 20. retries.yaml Retries Serverless orchestration and automation with GCP Workflows @martonkodok Retries HTTP status codes [429, 502, 503, 504], connection error, or timeout
  • 21. Orchestrate and automate the Cloud Serverless orchestration and automation with GCP Workflows @martonkodok
  • 22. Firestore Backups the easy way with Cloud Workflows - Cloud Scheduler - Cloud Workflows - Cloud Firestore - Cloud Storage Full guide article on: martonkodok.medium.com Cloud Workflows Cloud Storage Cloud Scheduler Firebase Cloud Firestore backup Roles and Permissions Cloud IAM authorize
  • 23. Using Workflows to load Cloud Storage files into BigQuery - Cloud Workflows - Cloud Storage - BigQuery Full guide article on: martonkodok.medium.com Cloud Storage BigQuery Cloud Workflows Authenticated Invocations foreach
  • 24. Run shell commands and orchestrate Compute Engine VMs - Cloud Workflows - Cloud Build - Compute Engine - Identity-Aware Proxy Full guide article on: martonkodok.medium.com Cloud Build Shell command Serverless Secure Connect Exec command Firewall Compute Engine Cloud IAP Tunnel Cloud Workflows
  • 25. Run shell commands and orchestrate Compute Engine VMs - Cloud Workflows - Cloud Build - Compute Engine - Identity-Aware Proxy Full guide article on: martonkodok.medium.com Cloud Workflow Steps Cloud Workflows Execution Authorize Cloud Build Roles and Permissions Cloud IAM Shell Service Account Start VM Compute Engine Submit Stop VM Compute Engine Firewall Compute Engine Cloud IAP Tunnel wait wait
  • 26. Conclusions Serverless orchestration and automation with GCP Workflows @martonkodok
  • 27. Reliable workflow execution - execute workflows for enterprise business apps Low latency of execution - no cold starts Built-in error handling out of the box error handling with configurable retry policies Passing variable built-in JSON parsing and expression-based variable manipulation Rich runtime iterating through an array, embedded steps for readability Secret Manager integration out of the box Cloud Logging out of the box integration with Cloud Logging Reading from Firestore read/write an entry using Yaml syntax Benefits of Cloud Workflows Serverless orchestration and automation with GCP Workflows @martonkodok
  • 28. Easy to build/operate Scales out Does not lose state Handles errors/timeouts Out-of-the-box support of Cloud APIs Auditable Developer friendly Serverless orchestration and automation with GCP Workflows @martonkodok
  • 29. The possibilities are endless Marketing Retail IndustrialandIoT Developer Event driven marketing workflow execution Relay conversions to customer profiles in external services Workflow based emails, discounts, promotions Order management Inventory chain operations Data gathering and processing Synchronize systems Generate state machines Verify equipment lifecycle Workflow based maintenance needs Digitalization of internal policies Automate the Cloud Shell-script replacement Orchestrate devops workflows @martonkodok
  • 30. Thank you. Q&A. Slides available on: slideshare.net/martonkodok Reea.net - Integrated web solutions driven by creativity to deliver projects.