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
Copy file name to clipboardExpand all lines: docs/explanation/deployment.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
# Deployment
2
2
3
-
The Benefits app is currently deployed into a Microsoft Azure account provided by [California Department of Technology (CDT)'s Office of Enterprise Technology (OET)][oet], a.k.a. the "DevSecOps" team. More specifically, it uses [custom containers][app-service-containers] on [Azure App Service][app-service]. [More about the infrastructure.](infrastructure.md)
3
+
The Benefits app is currently deployed into a Microsoft Azure account provided by [California Department of Technology (CDT)'s Office of Enterprise Technology (OET)][oet], a.k.a. the "DevSecOps" team. More specifically, it uses [Azure Container Apps][container-apps]. [More about the infrastructure.](infrastructure.md)
4
4
5
5
## Deployment process
6
6
7
7
The Django application gets built into a [Docker image][dockerfile] with [NGINX](https://www.nginx.com/) and
8
8
[Gunicorn](https://gunicorn.org/). SQLite is used within that same container to store configuration data; there is no external database.
9
9
10
-
The application is deployed to an [Azure Web App Container][az-webapp] using three separate environments for `dev`, `test`,
10
+
The application is deployed to an [Azure Container App][container-apps] using three separate environments for `dev`, `test`,
11
11
and `prod`.
12
12
13
13
The [Deploy][deploy-workflow] workflow is responsible for building that branch's image and pushing to [GitHub Container
14
-
Registry (GHCR)][ghcr]. It also deploys to the Azure Web App, telling Azure to restart the app and pull the latest image.
14
+
Registry (GHCR)][ghcr]. It also deploys to the Azure Container App, telling Azure to restart the app and pull the latest image.
15
15
16
16
You can view what Git commit is deployed for a given environment by visiting the URL path `/static/sha.txt`.
17
17
@@ -42,9 +42,9 @@ Build the root [`Dockerfile`][dockerfile], tagging with the SHA from the HEAD co
42
42
43
43
Push this image:tag into [GHCR][ghcr].
44
44
45
-
### 4. App Service deploy
45
+
### 4. Container App deploy
46
46
47
-
Push the new image:tag to the Azure App Service instance.
47
+
Push the new image:tag to the Azure Container App.
48
48
49
49
## Configuration
50
50
@@ -59,10 +59,8 @@ Docker images for each of the deploy branches are available from GitHub Containe
Copy file name to clipboardExpand all lines: docs/explanation/infrastructure.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,9 @@ flowchart LR
59
59
subgraph Azure
60
60
frontdoor --> NGINX
61
61
62
-
subgraph App Service
63
-
subgraph Custom container
64
-
direction TB
65
-
NGINX --> django
66
-
end
62
+
subgraph Container App
63
+
direction TB
64
+
NGINX --> django
67
65
end
68
66
end
69
67
```
@@ -123,23 +121,23 @@ The DevSecOps team sets the following naming convention for Resources:
123
121
### Sample Names
124
122
125
123
-`RG-CDT-PUB-VIP-BNSCN-E-D-001`
126
-
-`ASP-CDT-PUB-VIP-BNSCN-EL-P-001`
127
-
-`AS-CDT-PUB-VIP-BNSCN-EL-D-001`
124
+
-`CAE-CDT-PUB-VIP-BNSCN-EL-P-001`
125
+
-`CA-CDT-PUB-VIP-BNSCN-EL-D-001`
128
126
129
127
### Resource Types
130
128
131
129
Use the following shorthand for conveying the Resource Type as part of the Resource Name:
132
130
133
-
| Resource | Convention |
134
-
| ---------------- | ---------- |
135
-
|App Service |`AS`|
136
-
| App Service Plan |`ASP`|
137
-
| Virtual Network |`VNET`|
138
-
| Resource Group |`RG`|
139
-
| Virtual Machine |`VM`|
140
-
| Database |`DB`|
141
-
| Subnet |`SNET`|
142
-
| Front Door |`FD`|
131
+
| Resource | Convention |
132
+
| --------------------------| ---------- |
133
+
|Container Apps Environment |`CAE`|
134
+
|Container App |`CA`|
135
+
| Virtual Network |`VNET`|
136
+
| Resource Group |`RG`|
137
+
| Virtual Machine |`VM`|
138
+
| Database |`DB`|
139
+
| Subnet |`SNET`|
140
+
| Front Door |`FD`|
143
141
144
142
## Making changes
145
143
@@ -199,6 +197,6 @@ These steps were followed when setting up our Azure deployment for the first tim
199
197
- CDT team creates the [resources that they own](#ownership)
200
198
-`terraform apply`
201
199
- Set up Slack notifications by [creating a Slack email](https://slack.com/help/articles/206819278-Send-emails-to-Slack) for the [#notify-benefits](https://cal-itp.slack.com/archives/C022HHSEE3F) channel, then [setting it as a Secret in the Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/secrets/quick-create-portal#add-a-secret-to-key-vault) named `slack-benefits-notify-email`
202
-
- Set required [App Service configuration](../reference/environment-variables.md) and [configuration](../tutorials/load-sample-data.md) by setting values in Key Vault (the mapping is defined in [app_service.tf](https://github.com/cal-itp/benefits/blob/main/terraform/app_service.tf))
200
+
- Set required [Container App configuration](../reference/environment-variables.md) and [configuration](../tutorials/load-sample-data.md) by setting values in Key Vault (the mapping is defined in [app_service.tf](https://github.com/cal-itp/benefits/blob/main/terraform/app_service.tf))
203
201
204
202
This is not a complete step-by-step guide; more a list of things to remember. This may be useful as part of [incident response](https://docs.google.com/document/d/1qtev8qItPiTB4Tp9FQ87XsLtWZ4HlNXqoe9vF2VuGcY/edit#).
0 commit comments