-
Notifications
You must be signed in to change notification settings - Fork 0
/
sa_diagram.py
46 lines (38 loc) · 1.54 KB
/
sa_diagram.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from diagrams import Diagram, Cluster
from diagrams.onprem.queue import Kafka
from diagrams.onprem.analytics import Flink
from diagrams.elastic.elasticsearch import Kibana, Elasticsearch
from diagrams.onprem.database import PostgreSQL
from diagrams.onprem.network import Zookeeper
from diagrams.onprem.client import Client
from diagrams.onprem.container import Docker
from diagrams.c4 import Database
graph_attr = {
"splines": "splines"
}
with Diagram("System Architecture", show=False, graph_attr=graph_attr):
client = Client("Client Transaction")
controller = Client("Control Center")
with Cluster("Containerized applications", direction="TB"):
kafka = Kafka("Kafka streaming")
flink = Flink("Flink stream-processing")
# postgres = PostgreSQL("Data store")
el_search = Elasticsearch("Elastissearch")
kibana = Kibana("Data-Streaming Dashboard")
zookeeper = Zookeeper("ZooKeeper")
# docker = Docker("Docker")
with Cluster("Postgres Database"):
transactions = Database("transactions", description="Table")
sales_per_category = Database("sales_per_category", description="Table")
sales_per_day = Database("sales_per_day", description="Table")
sales_per_month = Database("sales_per_month", description="Table")
controller >> kafka
client >> kafka >> zookeeper
zookeeper>> kafka >> flink
flink >> [
transactions,
sales_per_category,
sales_per_day,
sales_per_month,
]
flink >> el_search >> kibana