You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.7 KiB
52 lines
1.7 KiB
from diagrams import Cluster, Diagram, Edge
|
|
from diagrams.onprem.compute import Server
|
|
from diagrams.onprem.monitoring import Grafana
|
|
from diagrams.aws.iot import IotMqtt
|
|
from diagrams.onprem.database import MongoDB
|
|
from diagrams.onprem.database import InfluxDB
|
|
from diagrams.onprem.network import HAProxy
|
|
from diagrams.onprem.inmemory import Redis
|
|
|
|
|
|
with Diagram(
|
|
name="Docker Flask MongoDB example",
|
|
show=True,
|
|
filename="../resources/autogenerated",
|
|
direction="LR",
|
|
):
|
|
with Cluster("Services"):
|
|
fulltext_search = Server("Fulltext search")
|
|
users = Server("Users")
|
|
book_collection = Server("Book collection")
|
|
geolocation_search = Server("Geolocation search")
|
|
photo_process = Server("Photo process")
|
|
random_demo = Server("Random demo")
|
|
tic_tac_toe = Server("Tic tac toe")
|
|
users_fastapi = Server("Users Fastapi")
|
|
webservers = [
|
|
fulltext_search,
|
|
book_collection,
|
|
geolocation_search,
|
|
random_demo,
|
|
users,
|
|
users_fastapi,
|
|
]
|
|
|
|
proxy = HAProxy("Krakend")
|
|
mqtt_service = Server("MQTT service")
|
|
mongo = MongoDB("MongoDb")
|
|
mosquitto = IotMqtt("Mosquitto")
|
|
grafana = Grafana("Grafana")
|
|
influxdb = InfluxDB("InfluxDB")
|
|
redis = Redis("Redis")
|
|
|
|
webservers >> Edge(color="brown") >> mongo
|
|
users >> Edge(color="brows") >> redis
|
|
book_collection >> Edge(color="black") >> users
|
|
mqtt_service >> Edge(color="brown") >> mosquitto
|
|
mqtt_service >> Edge(color="brown") >> mongo
|
|
mqtt_service >> Edge(color="brown") >> influxdb
|
|
grafana >> Edge(color="brown") >> influxdb
|
|
|
|
proxy >> Edge(color="black") >> random_demo
|
|
proxy >> Edge(color="black") >> users
|
|
|