You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2023. It is now read-only.
Here is an overview of the project architecture, including the CI/CD pipeline and the AWS infrastructure that will be automatically provisioned through the AWS Cloud Development Kit:
11
+
12
+

13
+
14
+
(This diagram was created with [draw.io](https://draw.io). Here's the link to the a read-only version of the diagram on draw.io: [https://drive.google.com/file/d/1gU61zjoW80fCusUcswU1zhEE5VFB1Z5U/view?usp=sharing](https://drive.google.com/file/d/1gU61zjoW80fCusUcswU1zhEE5VFB1Z5U/view?usp=sharing)
15
+
16
+
### Legend
17
+
18
+
1 - GitLab is used to host the source code, test the source code and deploy the application to AWS.
19
+
20
+
2 - Unit testing (see `.gitlab-ci.yml`)
21
+
22
+
2a - Pytest
23
+
24
+
2b - Jest
25
+
26
+
2c - Cypress
27
+
28
+
3 - Deployment phase (see `/gitlab-ci/aws/cdk.yml`)
29
+
30
+
3a - Quasar PWA assets are built if there are changes in the `quasar` directory
31
+
32
+
3b - AWS Cloud Development Kit (CDK) defines all infrastructure in AWS (4a - 12)
33
+
34
+
3c - AWS CLI is used to run Fargate tasks through manual GitLab CI jobs
35
+
36
+
4 - CDK Assets (ECR and S3 buckets that CDK uses internally to manage build assets and artifacts)
37
+
38
+
4a - Elastic Container Repository is used to manage the Django docker image used in various parts of the application
39
+
40
+
4b - S3 bucket used to store files associated with CDK and CloudFormation
41
+
42
+
5 - Route53 is used to route traffic to the CloudFront distribution
43
+
44
+
6 - CloudFront distribution that serves as the "front desk" of the application. It routes requests to to the correct CloudFront Origin
7c - S3 bucket for Django assets (static files, public media and private media)
53
+
54
+
8 - Web server and websocket servers
55
+
56
+
8a - Fargate service running uvicorn process (REST, GraphQL, Django Channels)
57
+
58
+
8b - Autoscaling Group for Fargate Service that serves Django API
59
+
60
+
9 - Celery and celery worker autoscaling
61
+
62
+
9a - Fargate service that is autoscaled between 0 and `N` Fargate tasks for a given celery queue
63
+
64
+
9b - Scheduled Event that triggers a Lambda to make a request to Django backend which collects celery queue metrics and published metrics to CloudWatch using boto3
65
+
66
+
9c - Lambda event the makes a request to `/api/celery-metrics/`
67
+
68
+
9d - CloudWatch alarm that is used to scale the Fargate service for a celery queue
69
+
70
+
9e - Autoscaling group for celery Fargate service
71
+
72
+
10 - Fargate tasks that run Django management commands such as `migrate` and `collectstatic`. These are triggered from manual GitLab CI jobs using the AWS CLI (3c)
73
+
74
+
11 - ElastiCache for Redis, used for Caching, Celery Broker, Channels Layer, etc.
75
+
76
+
12 - Aurora Postgres Serverless
77
+
7
78
## Local Development
8
79
9
80
First, copy `.env.template` to a new file in the project's root directory called `.env`. This file will be read by `docker-compose` in the next step. Adjust any of the values in this file if needed, or add new variables for any secret information you need to pass to docker-compose (or to docker containers).
10
81
82
+
```sh
83
+
docker-compose up
84
+
```
85
+
86
+
Open `http://localhost` in your browser.
87
+
88
+
You can specify environment variables for docker-compose by adding an `.env` file to the root of the project based on `.env.template`.
89
+
11
90
### Social Authentication Keys
12
91
13
-
To use social sign on in development, you will need to create an application with the given provider.
92
+
To use social sign on in local development, you will need to create an application with the given provider such as GitHub, Google, Facebook, etc.
14
93
15
94
#### GitHub
16
95
@@ -23,14 +102,6 @@ Go to [https://github.com/settings/applications/new](https://github.com/settings
23
102
24
103
In the `.env` file, add the `Client ID` of your GitHub OAuth App as the `GITHUB_KEY` variable, and add the `Client Secret` as the `GITHUB_SECRET` variable.
25
104
26
-
```sh
27
-
docker-compose up
28
-
```
29
-
30
-
Open `http://localhost` in your browser.
31
-
32
-
You can specify environment variables for docker-compose by adding an `.env` file to the root of the project based on `.env.template`.
33
-
34
105
## VuePress Documentation
35
106
36
107
This project uses VuePress for documentation. To view the documentation site locally, run the following command:
Copy file name to clipboardExpand all lines: documentation/docs/start/overview/README.md
+69Lines changed: 69 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,75 @@ Here are some of the best practices that this project aims to use:
33
33
- KISS & DRY
34
34
- Initial AWS console interaction is strictly limited to what can _only_ be done through the AWS console, otherwise AWS CDK and AWS CLI (preferably in CI/CD pipelines) are the primary means of interacting with AWS resources and the AWS Console is treated as a "read-only" convenience.
This diagram was created with [draw.io](https://draw.io). Here's the link to the a read-only version of the diagram on draw.io: [https://drive.google.com/file/d/1gU61zjoW80fCusUcswU1zhEE5VFB1Z5U/view?usp=sharing](https://drive.google.com/file/d/1gU61zjoW80fCusUcswU1zhEE5VFB1Z5U/view?usp=sharing)
41
+
42
+
### Legend
43
+
44
+
1 - GitLab is used to host the source code, test the source code and deploy the application to AWS.
45
+
46
+
2 - Unit testing (see `.gitlab-ci.yml`)
47
+
48
+
2a - Pytest
49
+
50
+
2b - Jest
51
+
52
+
2c - Cypress
53
+
54
+
3 - Deployment phase (see `/gitlab-ci/aws/cdk.yml`)
55
+
56
+
3a - Quasar PWA assets are built if there are changes in the `quasar` directory
57
+
58
+
3b - AWS Cloud Development Kit (CDK) defines all infrastructure in AWS (4a - 12)
59
+
60
+
3c - AWS CLI is used to run Fargate tasks through manual GitLab CI jobs
61
+
62
+
4 - CDK Assets (ECR and S3 buckets that CDK uses internally to manage build assets and artifacts)
63
+
64
+
4a - Elastic Container Repository is used to manage the Django docker image used in various parts of the application
65
+
66
+
4b - S3 bucket used to store files associated with CDK and CloudFormation
67
+
68
+
5 - Route53 is used to route traffic to the CloudFront distribution
69
+
70
+
6 - CloudFront distribution that serves as the "front desk" of the application. It routes requests to to the correct CloudFront Origin
7c - S3 bucket for Django assets (static files, public media and private media)
79
+
80
+
8 - Web server and websocket servers
81
+
82
+
8a - Fargate service running uvicorn process (REST, GraphQL, Django Channels)
83
+
84
+
8b - Autoscaling Group for Fargate Service that serves Django API
85
+
86
+
9 - Celery and celery worker autoscaling
87
+
88
+
9a - Fargate service that is autoscaled between 0 and `N` Fargate tasks for a given celery queue
89
+
90
+
9b - Scheduled Event that triggers a Lambda to make a request to Django backend which collects celery queue metrics and published metrics to CloudWatch using boto3
91
+
92
+
9c - Lambda event the makes a request to `/api/celery-metrics/`
93
+
94
+
9d - CloudWatch alarm that is used to scale the Fargate service for a celery queue
95
+
96
+
9e - Autoscaling group for celery Fargate service
97
+
98
+
10 - Fargate tasks that run Django management commands such as `migrate` and `collectstatic`. These are triggered from manual GitLab CI jobs using the AWS CLI (3c)
99
+
100
+
11 - ElastiCache for Redis, used for Caching, Celery Broker, Channels Layer, etc.
101
+
102
+
12 - Aurora Postgres Serverless
103
+
104
+
36
105
## Topics
37
106
38
107
Here's a list of some of the major topics covered:
0 commit comments