From 42eec5b013585f20d8a9d7fd00c699549a608e0c Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Thu, 29 Aug 2024 20:35:18 +0200 Subject: [PATCH] fix: minify mermaid graph --- 11-architecture-guide.md | 116 ++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 56 deletions(-) diff --git a/11-architecture-guide.md b/11-architecture-guide.md index 91e1d40..1a59b63 100644 --- a/11-architecture-guide.md +++ b/11-architecture-guide.md @@ -7,6 +7,9 @@ Hashistack-Ansible offers flexibility in deploying various environments, whether If you're setting up a test environment, you can deploy each service on a single host. Here’s an example of a minimal inventory file: ```ini +[haproxy_servers] +test-server + [vault_servers] test-server @@ -34,13 +37,11 @@ The architecture for this test setup looks like this: ```mermaid graph LR; - client[Client] -->|http/s| server - subgraph server[Dev/Test Server] - direction LR - vault[] <--> consul - nomad[] <--> consul - consul[] - end + client[Client] -->|http| server{ + Vault Server + Consul Server + Nomad Server + }; ``` ## 🚀 Production Deployment @@ -73,9 +74,9 @@ nomadnode2 nomadnode3 [nomad_clients] -nmdcl1 -nmdcl2 -nmdcl3 +nomadclient1 +nomadclient2 +nomadclient3 [consul_agents] ... @@ -91,82 +92,85 @@ Here’s what the architecture for a production setup might look like: ```mermaid graph TD - subgraph cnslsrv[Consul Servers] + subgraph c[ ] direction LR - consul1[] <--> consul2 & consul3 & consul4 & consul5 - consul2[] <--> consul3 & consul4 & consul5 - consul3[] <--> consul4 & consul5 - consul4[] <--> consul5 - consul5[] + c1[] <--> c2 & c3 & c4 & c5 + c2[] <--> c3 & c4 & c5 + c3[] <--> c4 & c5 + c4[] <--> c5 + c5[] end - subgraph vaultservers[Vault Servers] + subgraph v[ ] direction LR - subgraph vaultnode1[ ] + subgraph vn1[ ] direction TB - vault1[] <--> consulvaultagent1 - consulvaultagent1([]) + v1[] <--> cva1 + cva1([]) end - subgraph vaultnode2[ ] + subgraph vn2[ ] direction TB - vault2[] <--> consulvaultagent2 - consulvaultagent2([]) + v2[] <--> cva2 + cva2([]) end - subgraph vaultnode3[ ] + subgraph vn3[ ] direction TB - vault3[] <--> consulvaultagent3 - consulvaultagent3([]) + v3[] <--> cva3 + cva3([]) end - vaultnode1 <--> vaultnode2 - vaultnode2 <--> vaultnode3 - vaultnode3 <--> vaultnode1 + vn1 <--> vn2 + vn2 <--> vn3 + vn3 <--> vn1 end - vaultservers -->|Service registration| cnslsrv + v -->|Service registration| c - subgraph nmdsrvs[Nomad Servers] + subgraph ns[ ] direction LR - subgraph nmdsrvnode1[ ] + subgraph ns1[ ] direction TB - nmdsrv1[] <--> consulnmdsrvagent1 - consulnmdsrvagent1([]) + n1[] <--> nca1 + nca1([]) end - subgraph nmdsrvnode2[ ] + subgraph nsn2[ ] direction TB - nmdsrv2[] <--> consulnmdsrvagent2 - consulnmdsrvagent2([]) + n2[] <--> nca2 + nca2([]) end - subgraph nmdsrvnode3[ ] + subgraph ns3[ ] direction TB - nmdsrv3[] <--> consulnmdsrvagent3 - consulnmdsrvagent3([]) + n3[] <--> nca3 + nca3([]) end - nmdsrv1 <--> nmdsrv2 - nmdsrv2 <--> nmdsrv3 - nmdsrv3 <--> nmdsrv1 + n1 <--> n2 + n2 <--> n3 + n3 <--> n1 end - nmdsrvs -->|Service registration| cnslsrv + ns -->|Service registration| c - subgraph nmdcls[Nomad Clients] + subgraph nc[ ] direction LR - subgraph nmdclnode1[ ] + subgraph ncn1[ ] direction LR - nmdcl1[] <--> consulnmdclagent1 - consulnmdclagent1([]) + nc1[] <--> ncca1 + ncca1([]) end - subgraph nmdclnode2[ ] + subgraph ncn2[ ] direction LR - nmdcl2[] <--> consulnmdclagent2 - consulnmdclagent2([]) + nc2[] <--> ncca2 + ncca2([]) end - subgraph nmdclnode3[ ] + subgraph ncn3[ ] direction LR - nmdcl3[] <--> consulnmdclagent3 - consulnmdclagent3([]) + nc3[] <--> ncca3 + ncca3([]) end end - nmdcls -->|Service registration| cnslsrv - nmdcls <--> nmdsrvs + nc -->|Service registration| c + nc <--> ns ``` + +> [!NOTE] +> You can skip the HAProxy part if you're using an external load-balancing solution like AWS ALB or any other LB technology to connect to your platform.