Skip to content

Commit fd100f3

Browse files
committed
add diag to ci/cd
1 parent de707ee commit fd100f3

File tree

2 files changed

+64
-3
lines changed

2 files changed

+64
-3
lines changed

docs/how_to_guides/continuous_integration_continuous_deployment.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ terraform apply -var="aws_region=us-east-1" -var="backend_memory=2048" -var="bac
255255
Once the deployment has succeeded you should see some output values (which will be required if you wish to set up CI).
256256

257257

258-
## Step4: Deploying Guardrails API
258+
## Step 4: Deploying Guardrails API
259259
### Manual
260260

261261
Firstly, create or use your existing guardrails token and export it to your current shell `export GUARDRAILS_TOKEN="..."`
@@ -444,7 +444,68 @@ By setting the above environment variable `GUARDRAILS_BASE_URL` the SDK will be
444444

445445
## Quick Start Repository Template
446446

447-
We've conveniently packaged all the artifacts from this document in a github repository that can be used as a template for your own verification and deployment [here](https://github.com/guardrails-ai/continuous_integration_and_deployment_aws_template).
447+
We've conveniently packaged all the artifacts from this document in a github repository that can be used as a template for your own verification and deployment [here](https://github.com/guardrails-ai/continuous_integration_and_deployment_aws_template).
448+
449+
## Diagram
450+
451+
```mermaid
452+
graph TD
453+
%% Internet and IGW
454+
Internet((Internet)) --> IGW[Internet Gateway]
455+
IGW --> RouteTable[Public Route Table]
456+
457+
%% VPC Container
458+
VPC[VPC<br/>10.0.0.0/16] --> IGW
459+
460+
%% IAM Permissions Group
461+
subgraph ECSIAMPermissions["ECS IAM Permissions"]
462+
ExecutionRole[ECS Execution Role]
463+
TaskRole[ECS Task Role]
464+
end
465+
466+
%% Public Subnet Group
467+
subgraph PublicSubnets["Public Subnets x3"]
468+
NATGateway[NAT Gateway x2]
469+
NLB[Network Load Balancer]
470+
TG[Target Group<br/>TCP:80]
471+
SG[Security Group<br/>Ingress: 8000<br/>Egress: All]
472+
ECSCluster[ECS Cluster]
473+
474+
%% ECS Components
475+
ECSService[ECS Service]
476+
TaskDef[Task Definition<br/>CPU: 1024<br/>Memory: 2048]
477+
Container[Container<br/>Port: 8000]
478+
479+
%% Internal Connections
480+
NLB --> |Port 80| TG
481+
TG --> ECSService
482+
ECSCluster --> ECSService
483+
SG --> ECSService
484+
ECSService --> TaskDef
485+
TaskDef --> Container
486+
end
487+
488+
%% IAM Connections
489+
ECSIAMPermissions --> TaskDef
490+
491+
%% Route Table Connection
492+
RouteTable --> PublicSubnets
493+
494+
%% External Service Connections
495+
CloudWatchLogs[CloudWatch Log Group] --> Container
496+
ECR[ECR Repository] --> |Image| Container
497+
498+
%% Internet Access
499+
Internet --> NLB
500+
501+
%% Styling
502+
classDef aws fill:#FF9900,stroke:#232F3E,stroke-width:2px,color:black
503+
classDef subnet fill:#FFD700,stroke:#232F3E,stroke-width:2px,color:black
504+
classDef iam fill:#FF6B6B,stroke:#232F3E,stroke-width:2px,color:black
505+
class VPC,IGW,NATGateway,RouteTable,NLB,TG,ECSCluster,ECSService,TaskDef,Container,SG,CloudWatchLogs,ECR aws
506+
class PublicSubnets subnet
507+
class ECSIAMPermissions,ExecutionRole,TaskRole iam
508+
```
448509

449510
## Terraform
450511

docusaurus/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = {
2929
markdown: {
3030
mermaid: true
3131
},
32-
// themes: ['@docusaurus/theme-mermaid', '@docusaurus/theme-classic'],
32+
themes: ['@docusaurus/theme-mermaid'],
3333
// Even if you don't use internalization, you can use this field to set useful
3434
// metadata like html lang. For example, if your site is Chinese, you may want
3535
// to replace "en" with "zh-Hans".

0 commit comments

Comments
 (0)