Skip to content

Commit 3355c3e

Browse files
committed
Cleaned up diagrams script and extra folders
1 parent 30f10d0 commit 3355c3e

3 files changed

Lines changed: 15 additions & 61 deletions

File tree

_images/horizons_diagram.png

-130 KB
Binary file not shown.

docs/_images/py_sources/horizons.py

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
11
from diagrams import Diagram, Cluster, Edge
22
from diagrams.aws.general import Client
33
from diagrams.onprem.compute import Server
4-
from diagrams.aws.network import VPCRouter
5-
from diagrams.generic.network import Firewall
4+
from diagrams.aws.network import NLB
65
from diagrams.aws.general import GenericDatabase
76

87
with Diagram("Horizons workflow", show=False, filename="mongodb_horizons_diagram"):
98
# External World
109
external_client = Client("MongoDB Client")
1110

12-
with Cluster("Cloud Provider / On-premise"):
13-
with Cluster("Virtual Private Cloud (VPC)"):
14-
with Cluster("Public subnet"):
15-
dns = Firewall("DNS\nmongo.external.mycompany.com")
16-
vpc = VPCRouter("VPC Router\n52.45.100.200")
11+
with Cluster("Virtual Private Cloud (VPC)"):
12+
nlb = NLB("Load Balancer\nmongo.external.mycompany.com")
13+
with Cluster("MongoDB Replica Set"):
14+
# Create nodes in horizontal alignment
15+
primary = GenericDatabase("Primary\npsmdb1.internal.net")
16+
secondary1 = GenericDatabase("Secondary\npsmdb2.internal.net")
17+
secondary2 = GenericDatabase("Secondary\npsmdb3.internal.net")
1718

18-
with Cluster("Private subnet"):
19-
# MongoDB Replica Set cluster - aligned horizontally
20-
with Cluster("MongoDB Replica Set"):
21-
# Create nodes in horizontal alignment
22-
primary = GenericDatabase("Primary\npsmdb1.internal.net")
23-
secondary1 = GenericDatabase("Secondary\npsmdb2.internal.net")
24-
secondary2 = GenericDatabase("Secondary\npsmdb3.internal.net")
25-
26-
app_server = Server("Internal app\n10.0.1.100")
19+
app_server = Server("Internal app\n10.0.1.100")
2720

2821
# External client flow
29-
external_client >> Edge(label="1 - SNI: mongo.external.mycompany.com") >> dns
30-
dns >> vpc
31-
vpc >> Edge(label="3 - Horizons Reply") >> primary
32-
primary >> Edge(label="2 - Forwards to Primary" ) >> vpc
33-
vpc >> Edge(label="4 - Routes Reply") >> external_client
22+
external_client >> Edge(label="4. Routes Reply") >> nlb
23+
nlb >> Edge(label="1. SNI: mongo.external.mycompany.com") >> external_client
24+
25+
nlb >> Edge(label="2. Forwards to Primary") >> primary
26+
primary >> Edge(label="3. Horizons reply: external hostnames" ) >> nlb
27+
3428

3529
# Internal app flow - positioned to avoid overlap with cluster label
3630
app_server >> Edge(label="1 - Internal DNS (SNI: psmdb1.internal.net)") >> primary

docs/_images/py_sources/horizons_simple.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)