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,28 @@
#! /usr/bin/env python
from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.database import ElastiCache, RDS
from diagrams.aws.network import ELB
from diagrams.aws.network import Route53
with Diagram("Clustered Web Services", show=False):
dns = Route53("dns")
lb = ELB("lb")
with Cluster("Services"):
svc_group = [
ECS("web1"),
ECS("web2"),
ECS("web3")
]
with Cluster("DB Cluster"):
db_primary = RDS("userdb")
db_primary - [RDS("userdb ro")]
memcached = ElastiCache("memcached")
dns >> lb >> svc_group
svc_group >> db_primary
svc_group >> memcached