Slide 1

Slide 1 text

Event-driven orchestration with Eventarc and Workflows Mete Atamel Developer Advocate at Google @meteatamel atamel.dev speakerdeck.com/meteatamel

Slide 2

Slide 2 text

github.com/priyankavergadia/GCPSketchnote

Slide 3

Slide 3 text

Event-driven orchestration Orchestrated services communicating via events Orchestrated Services Message Broker Orchestrated Services Orchestrated Services

Slide 4

Slide 4 text

Google Cloud GA Your own apps GA Cloud Run GA Cloud Functions Preview Workflows Preview Targets Sources Cloud Run for Anthos on GKE Preview Eventarc Triggers to filter events CloudEvents format

Slide 5

Slide 5 text

New message in a Pub/Sub topic → Cloud Run gcloud eventarc triggers create trigger-pubsub \ --destination-run-service=$SERVICE_NAME \ --destination-run-region=$REGION \ --event-filters="type=google.cloud.pubsub.topic.v1.messagePublished" --transport-topic=projects/$PROJECT_ID/topics/$TOPIC_ID Pub/Sub Trigger

Slide 6

Slide 6 text

New Compute Engine VM creation → Cloud Run gcloud eventarc triggers create trigger-auditlog \ --destination-run-service=$SERVICE_NAME \ --destination-run-region=$REGION --event-filters="type=google.cloud.audit.log.v1.written" \ --event-filters="serviceName=compute.googleapis.com" \ --event-filters="methodName=beta.compute.instances.insert" \ --service-account=$PROJECT_NO-compute@developer.gserviceaccount.com Audit Log Trigger

Slide 7

Slide 7 text

Create a trigger for new object creation in Cloud Storage → Cloud Run gcloud eventarc triggers create trigger-gcs \ --destination-run-service=$SERVICE_NAME \ --destination-run-region=$REGION --event-filters="type=google.cloud.storage.object.v1.finalized" \ --event-filters="bucket=$BUCKET_NAME" \ --service-account=$PROJECT_NO-compute@developer.gserviceaccount.com Cloud Storage Trigger

Slide 8

Slide 8 text

Serverless Compute External API’s Google API’s etc... Workflows - orchestrate & integrate SaaS API’s Private API’s Other Clouds Workflows

Slide 9

Slide 9 text

- processPayment: call: http.post args: url: https://payment-processor.run.app/... body: input: ${paymentDetails} result: processResult - shipItems: call: http.post args: url: https://.../cloudfunctions.net/ship body: input: ${processResult.body} result: shipResult - notifyUser: call: http.post ... Payment Processor Cloud Run Authorize & charge CC Notifier Cloud Run Notify user Shipper Cloud Functions Prepare & ship items YAML or JSON syntax

Slide 10

Slide 10 text

Deploy, execute, manage workflows # Deploy a workflow gcloud workflows deploy my-workflow --source=workflow.yaml # Execute a workflow gcloud workflows execute my-workflow # See the result gcloud workflows executions describe --workflow my-workflow

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Image processing pipeline v1 - Eventarc (AuditLog-Cloud Storage) + Cloud Run End Users Images Input Cloud Storage Images Output Cloud Storage Filter Cloud Run Resizer Cloud Run Labeler Cloud Run Watermarker Cloud Run File uploaded Cloud Pub/Sub File resized Cloud Pub/Sub AuditLog Trigger Eventarc Pub/Sub Trigger Eventarc Pub/Sub Trigger Eventarc

Slide 13

Slide 13 text

Image processing pipeline v2 - Eventarc (Cloud Storage) + Cloud Run +Workflows End Users Images Input Cloud Storage Images Output Cloud Storage Filter Cloud Run Cloud Storage Trigger Eventarc Image Processing Workflows Watermarker Cloud Functions Resizer Cloud Functions Labeler Cloud Functions

Slide 14

Slide 14 text

Image processing pipeline v3 - Eventarc (Cloud Storage) + Workflows End Users Images Input Cloud Storage Images Output Cloud Storage Cloud Storage Trigger Eventarc Image Processing Workflows Watermarker Cloud Functions Resizer Cloud Functions Labeler Cloud Functions Filter Cloud Functions

Slide 15

Slide 15 text

@meteatamel atamel.dev speakerdeck.com/meteatamel github.com/GoogleCloudPlatform/eventarc-samples Thank you!