Open mmcloughlin opened 4 years ago
from diagrams import Cluster, Diagram
from diagrams.gcp.analytics import PubSub
from diagrams.gcp.compute import GCE, Functions
from diagrams.gcp.database import Firestore
from diagrams.gcp.storage import GCS
from diagrams.gcp.devtools import SourceRepositories
with Diagram("Continuous Benchmarking"):
# Go repository commits watched by Cloud Function and stored in Firestore.
commits = Firestore("commits")
SourceRepositories("go") >> Functions("watch") >> commits
# Cloud Function watches new commits and enqueues work to a pubsub topic.
jobs = PubSub("jobs")
commits >> Functions("enqueue") >> jobs
# Workers service the pubsub topic.
workers = [GCE("worker") for i in range(3)]
jobs >> workers
Make a nice diagram 😄
https://diagrams.mingrammer.com/