SlideShare a Scribd company logo
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.

More Related Content

What's hot (20)

PDF
ドメイン駆動設計サンプルコードの徹底解説
増田 亨
 
PDF
Windows 展開の自動化ツール - Microsoft Deployment Toolkit
shigeya
 
PDF
クラウド&Azure入門 セッション at Microsoft Ignite the Tour Tokyo 2019
Madoka Chiyoda
 
PPTX
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Akira Shimosako
 
PDF
Hexagonal architecture - message-oriented software design
Matthias Noback
 
PDF
Intro to Terraform
Josh Michielsen
 
PDF
まずやっとくPostgreSQLチューニング
Kosuke Kida
 
PDF
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
PDF
【de:code 2020】 Azure Red hat OpenShift (ARO) によるシステムアーキテクチャ構築の実践
日本マイクロソフト株式会社
 
PPTX
Clean Pragmatic Architecture - Avoiding a Monolith
Victor Rentea
 
PPTX
Istioサービスメッシュ入門
Yoichi Kawasaki
 
DOCX
Git github
Anurag Deb
 
PDF
Clean code
Alvaro García Loaisa
 
PPTX
WiredTigerを詳しく説明
Tetsutaro Watanabe
 
PDF
今こそ知りたい!Microsoft Azureの基礎
Trainocate Japan, Ltd.
 
PDF
Qlik Tips 20210817 コンテナ
QlikPresalesJapan
 
PPTX
MongoDBの監視
Tetsutaro Watanabe
 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
PPTX
Angular Data Binding
Duy Khanh
 
PDF
Real Life Clean Architecture
Mattia Battiston
 
ドメイン駆動設計サンプルコードの徹底解説
増田 亨
 
Windows 展開の自動化ツール - Microsoft Deployment Toolkit
shigeya
 
クラウド&Azure入門 セッション at Microsoft Ignite the Tour Tokyo 2019
Madoka Chiyoda
 
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Akira Shimosako
 
Hexagonal architecture - message-oriented software design
Matthias Noback
 
Intro to Terraform
Josh Michielsen
 
まずやっとくPostgreSQLチューニング
Kosuke Kida
 
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
【de:code 2020】 Azure Red hat OpenShift (ARO) によるシステムアーキテクチャ構築の実践
日本マイクロソフト株式会社
 
Clean Pragmatic Architecture - Avoiding a Monolith
Victor Rentea
 
Istioサービスメッシュ入門
Yoichi Kawasaki
 
Git github
Anurag Deb
 
WiredTigerを詳しく説明
Tetsutaro Watanabe
 
今こそ知りたい!Microsoft Azureの基礎
Trainocate Japan, Ltd.
 
Qlik Tips 20210817 コンテナ
QlikPresalesJapan
 
MongoDBの監視
Tetsutaro Watanabe
 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular Data Binding
Duy Khanh
 
Real Life Clean Architecture
Mattia Battiston
 

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

PDF
Serverless orchestration and automation with Cloud Workflows
Márton Kodok
 
PDF
Serverless orchestration and automation with Cloud Workflows
Márton Kodok
 
PDF
Google Cloud Platform Solutions for DevOps Engineers
Márton Kodok
 
PPTX
Session 4 GCCP.pptx
DSCIITPatna
 
PDF
Serverless computing with Google Cloud
wesley chun
 
PDF
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
 
PDF
Run your code serverlessly on Google's open cloud
wesley chun
 
PDF
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
Márton Kodok
 
PDF
Serverless Computing with Google Cloud
wesley chun
 
PDF
Cloud Orchestration with RightScale Cloud Workflow
RightScale
 
PDF
Google's serverless journey: past to present
wesley chun
 
PPTX
GCCP Session 2.pptx
DSCIITPatna
 
PDF
How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
Daniel Zivkovic
 
PDF
Google Cloud Functions & Firebase Crash Course
Daniel Zivkovic
 
PDF
Serverless Computing with Python
wesley chun
 
PDF
PuppetConf 2017: Puppet & Google Cloud: From Nothing to Production in 10 minu...
Puppet
 
PDF
Exploring Google APIs with Python
wesley chun
 
PPTX
GCCP-Session 2
GDSCIIITDHARWAD
 
PDF
Introduction to serverless computing on Google Cloud
wesley chun
 
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
Serverless orchestration and automation with Cloud Workflows
Márton Kodok
 
Serverless orchestration and automation with Cloud Workflows
Márton Kodok
 
Google Cloud Platform Solutions for DevOps Engineers
Márton Kodok
 
Session 4 GCCP.pptx
DSCIITPatna
 
Serverless computing with Google Cloud
wesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
 
Run your code serverlessly on Google's open cloud
wesley chun
 
6. DISZ - Webalkalmazások skálázhatósága a Google Cloud Platformon
Márton Kodok
 
Serverless Computing with Google Cloud
wesley chun
 
Cloud Orchestration with RightScale Cloud Workflow
RightScale
 
Google's serverless journey: past to present
wesley chun
 
GCCP Session 2.pptx
DSCIITPatna
 
How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
Daniel Zivkovic
 
Google Cloud Functions & Firebase Crash Course
Daniel Zivkovic
 
Serverless Computing with Python
wesley chun
 
PuppetConf 2017: Puppet & Google Cloud: From Nothing to Production in 10 minu...
Puppet
 
Exploring Google APIs with Python
wesley chun
 
GCCP-Session 2
GDSCIIITDHARWAD
 
Introduction to serverless computing on Google Cloud
wesley chun
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
Ad

More from Márton Kodok (20)

PDF
AI Agents with Gemini 2.0 - Beyond the Chatbot
Márton Kodok
 
PDF
Gemini 2.0 and Vertex AI for Innovation Workshop
Márton Kodok
 
PDF
Function Calling with the Vertex AI Gemini API
Márton Kodok
 
PDF
Vector search and multimodal embeddings in BigQuery
Márton Kodok
 
PDF
BigQuery Remote Functions for Dynamic Mapping of E-mobility Charging Networks
Márton Kodok
 
PDF
Build applications with generative AI on Google Cloud
Márton Kodok
 
PDF
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok
 
PDF
DevBCN Vertex AI - Pipelines for your MLOps workflows
Márton Kodok
 
PDF
Discover BigQuery ML, build your own CREATE MODEL statement
Márton Kodok
 
PDF
Cloud Run - the rise of serverless and containerization
Márton Kodok
 
PDF
BigQuery best practices and recommendations to reduce costs with BI Engine, S...
Márton Kodok
 
PDF
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Márton Kodok
 
PDF
Vertex AI: Pipelines for your MLOps workflows
Márton Kodok
 
PDF
BigdataConference Europe - BigQuery ML
Márton Kodok
 
PDF
DevFest Romania 2020 Keynote: Bringing the Cloud to you.
Márton Kodok
 
PDF
BigQuery ML - Machine learning at scale using SQL
Márton Kodok
 
PDF
Applying BigQuery ML on e-commerce data analytics
Márton Kodok
 
PDF
Supercharge your data analytics with BigQuery
Márton Kodok
 
PDF
Vibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer Expertig
Márton Kodok
 
PDF
BigQuery ML - Machine learning at scale using SQL
Márton Kodok
 
AI Agents with Gemini 2.0 - Beyond the Chatbot
Márton Kodok
 
Gemini 2.0 and Vertex AI for Innovation Workshop
Márton Kodok
 
Function Calling with the Vertex AI Gemini API
Márton Kodok
 
Vector search and multimodal embeddings in BigQuery
Márton Kodok
 
BigQuery Remote Functions for Dynamic Mapping of E-mobility Charging Networks
Márton Kodok
 
Build applications with generative AI on Google Cloud
Márton Kodok
 
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok
 
DevBCN Vertex AI - Pipelines for your MLOps workflows
Márton Kodok
 
Discover BigQuery ML, build your own CREATE MODEL statement
Márton Kodok
 
Cloud Run - the rise of serverless and containerization
Márton Kodok
 
BigQuery best practices and recommendations to reduce costs with BI Engine, S...
Márton Kodok
 
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Márton Kodok
 
Vertex AI: Pipelines for your MLOps workflows
Márton Kodok
 
BigdataConference Europe - BigQuery ML
Márton Kodok
 
DevFest Romania 2020 Keynote: Bringing the Cloud to you.
Márton Kodok
 
BigQuery ML - Machine learning at scale using SQL
Márton Kodok
 
Applying BigQuery ML on e-commerce data analytics
Márton Kodok
 
Supercharge your data analytics with BigQuery
Márton Kodok
 
Vibe Koli 2019 - Utazás az egyetem padjaitól a Google Developer Expertig
Márton Kodok
 
BigQuery ML - Machine learning at scale using SQL
Márton Kodok
 
Ad

Recently uploaded (20)

PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 

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.