Add diagrams test

This commit is contained in:
2024-08-13 01:43:53 +02:00
parent 88a26dae34
commit 84a2519f6c
11 changed files with 614 additions and 3 deletions

View File

@@ -0,0 +1,37 @@
#! /usr/bin/env python
from diagrams import Cluster, Diagram
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
from diagrams.gcp.compute import AppEngine, Functions
from diagrams.gcp.database import BigTable
from diagrams.gcp.iot import IotCore
from diagrams.gcp.storage import GCS
with Diagram("Message Collecting", show=False):
pubsub = PubSub("pubsub")
with Cluster("Source of Data"):
[
IotCore("core1"),
IotCore("core2"),
IotCore("core3")
] >> pubsub
with Cluster("Targets"):
with Cluster("Data Flow"):
flow = Dataflow("data flow")
with Cluster("Data Lake"):
flow >> [
BigQuery("bq"),
GCS("storage")
]
with Cluster("Event Driven"):
with Cluster("Processing"):
flow >> AppEngine("engine") >> BigTable("bigtable")
with Cluster("Serverless"):
flow >> Functions("func") >> AppEngine("appengine")
pubsub >> flow