Skip to content

Commit

Permalink
Save work
Browse files Browse the repository at this point in the history
  • Loading branch information
dpurge committed Dec 4, 2023
1 parent cef517a commit 6f5e861
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.hugo_build.lock
.venv
public/
resources/_gen
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,21 @@
To work locally: `hugo server -D`

To build: `hugo --minify`

## Diagrams

- [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/downloads/) are a prerequisite to install some packages
- [GraphViz](https://graphviz.org/download/) is required for diagrams

```sh
python -m venv .venv
source ./.venv/Scripts/activate
pip install -r requirements.txt
```

Compilation:

```sh
cd ./content/docs/devops/blueprints/
python aws-static-webapp.py
```
17 changes: 17 additions & 0 deletions content/docs/devops/blueprints/aws-static-webapp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# AWS static web application

![AWS static web application](https://raw.githubusercontent.com/dpurge/dpurge.github.io/gh-pages/docs/devops/blueprints/aws-static-webapp.png)

Components:

- *AWS Shield Standard* - free protection against common DDoS attacks,
applied automatically to CloudFront and Route 53.
- *Route 53* - Domain Name System web service, performs domain registration,
DNS routing and health checking.
- *Hosted Zone* - container for records specifying how to route traffic for a
specific domain.
- *CloudFront* - content delivery network for distributing static content from
edge locations.
- *S3 bucket* - cloud storage for web content
- *Argo Workflows* - pipelines producing web content and publishing it to the
cloud storage
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions content/docs/devops/blueprints/aws-static-webapp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from diagrams import Diagram, Cluster, Edge

from diagrams.aws.general import Users
from diagrams.aws.network import Route53
from diagrams.aws.network import Route53HostedZone
from diagrams.aws.security import Shield
from diagrams.aws.network import CloudFront
from diagrams.aws.storage import SimpleStorageServiceS3

from diagrams.onprem.gitops import ArgoCD

with Diagram("AWS static WebApp", filename="aws-static-webapp", show=False, direction="LR"):

users = Users("Users")

with Cluster("AWS Cloud"):
shield = Shield()
dns = Route53("DNS")
hosted_zone = Route53HostedZone("Hosted Zone")
cdn = CloudFront("CDN")
storage = SimpleStorageServiceS3("Storage")

with Cluster("On-prem"):
workflow = ArgoCD("Workflow")

users >> Edge(forward=True, reverse=True) >> dns
dns >> Edge(forward=True, reverse=True) >> hosted_zone

hosted_zone >> Edge(forward=True, reverse=True) >> cdn
cdn >> Edge(style="dashed", forward=True, reverse=True) >> storage

storage << workflow
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
diagrams

0 comments on commit 6f5e861

Please sign in to comment.