[pycon] dia
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- from diagrams import Diagram, Cluster, Edge
- from diagrams.onprem.database import PostgreSQL
- from diagrams.onprem.inmemory import Redis
- from diagrams.aws.compute import EC2
- from diagrams.aws.network import ELB
- from diagrams.programming.framework import Django
- from diagrams.onprem.queue import Celery
- from diagrams.onprem.network import Nginx
- with Diagram("Dia") as diag:
- database = PostgreSQL("Postgres.\nDjango model and data")
- redis = Redis("Redis.\nCelery broker")
- nginx = Nginx("Nginx.\nProxy and static content")
- celery_workers = Celery('Celery workers')
- with Cluster("Django webservices"):
- gunicorn = ELB("Gunicorn webserver")
- django_workers = [Django('Worker_1'), Django('Worker_2'), Django('Worker_3')]
- celery_tasks = Celery('Celery tasks')
- gunicorn >> django_workers >> celery_tasks >> redis >> celery_workers >> database
- django_workers >> database
- supervisor = EC2('Supervisor')
- flower = Celery('Flower.\nWorker control')
- nginx >> gunicorn
- nginx >> supervisor >> gunicorn
- nginx >> flower
- supervisor >> Edge(color="firebrick") >> celery_workers
- supervisor >> Edge(color="firebrick") >> flower
- supervisor >> Edge(color="firebrick") >> gunicorn
- redis - flower
- diag
Editor
You can edit this paste and save as new: