Skip to content

[WIP] reqs: project requirements #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.pages
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
nav:
- index.md
- project
- design
- documentation
- appendices
7 changes: 7 additions & 0 deletions docs/design/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Design
nav:
- index.md
- stories
- requirements
- architecture
- specifications
163 changes: 163 additions & 0 deletions docs/design/architecture/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Architecture

Un schéma d'implémentation détaillé sera établi pour décrire l'architecture globale de l'infrastructure, y compris les différents composants, leur interaction et leur déploiement.


## Application


### Proxy: Traefik

* Application router
* High-availability by fault tolerance
* Load-balancing by requests distribution
ALB ?
* Helm chart
* Version


### Application: FastAPI

* Python
* Version:
* Packaging
* Project management? Poetry?


### Databases: PostgreSQL

* Application is using the well known and battle-tested OSS PostgreSQL database management system.

FIXME pg version

* Use a specialized Kubernetes operator to manage the PostgreSQL cluster

Zalando's **postgres-operator** is chosen because...
FIXME main reason(s) to choose it over alternatives

Alternative OSS solutions available are: ...
FIXME list alternative solution considered

* Helm chart
* Single read/write Master / Multi read-only slaves architectur

It provides both high availability and read load balancing, without the additional complexity of multi-master configuration, which the application doesn't require at the moment.

* Master failover


## Infrastructure


### Network


#### Application Load Balancer (ALB)


#### Virtual Private Cloud (VPC)

* VPC subnet


#### Internet Gateways (IGW)

* Global egress


#### Availability Zones (AZ)

* 3 availability zones for high availability


#### NAT Gateways (NGW)

* Per AZ egress
* In public subnet


#### Subnets


##### Public subnets

* Application access
* Bastion access
* NAT gateways ?


##### Private subnets

* Database
* Admin


### Compute

#### Nodes

* EC2 compute nodes
* Application nodes
* Database nodes
* Bastion node
* Auto-scaling groups


#### Orchestration: Kubernetes

#### Pods

##### ReplicaSets

* Traefik
* Application
* Database
* cert-manager
* Metrics server
* bastion

##### DaemonSets

* Any ?


### Storage

#### CSI

##### EBS

* For persistent storage needs (application data, logs, and monitoring metrics) AWS Elastic Block Storage (EBS) is used to provide persistent block devices to stateful pods
* To integrate EBS with Kubernetes, the Container Storage Interface is leveraged by using the `aws-ebs-csi-driver` cluster addon from EKS which registers EBS volumes as a backend for K8s Persistant Volumes.



## CI/CD

### GitHub Actions


#### Actions

#### Workflows

* Application
* Infrastructure


## Observability

### Log management (ELK/EFK)

### Metrics (Prometheus/Grafana)

### Event and alerting


## Business continuity & Disaster Recovery

### TODO Recap HA features

### Backup

### Disaster Recovery
Loading