Skip to content

Commit 80ededd

Browse files
committed
chore(docs): list manual infrastructure setup steps
1 parent d9d256b commit 80ededd

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

docs/configuration/environment-variables.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
The first steps of the Getting Started guide mention [creating an `.env` file][getting-started_create-env].
44

5-
The sections below outline in more detail the application environment variables that you may want to override, and their purpose.
5+
The sections below outline in more detail the application environment variables that you may want to override, and their purpose. In App Service, this is more generally called the ["configuration"][app-service-config].
66

7-
See other topic pages in this section for more specific environment variable configurations.
7+
See other topic pages in this section for more specific environment variable configurations. See [benefits-secrets][benefits-secrets] for values.
88

99
## Docker
1010

@@ -147,9 +147,6 @@ The base URL for the (running) application, against which all Cypress `.visit()`
147147
When Cypress is running inside the devcontainer, this should be `http://localhost:8000`. When Cypress is running outside the
148148
devcontainer, check the [`DJANGO_LOCAL_PORT`](#django_local_port).
149149

150-
[deployment]: ../deployment/README.md
151-
[getting-started_create-env]: ../getting-started/README.md#create-an-environment-file
152-
153150
## Azure
154151

155152
### `APPLICATIONINSIGHTS_CONNECTION_STRING`
@@ -159,3 +156,8 @@ devcontainer, check the [`DJANGO_LOCAL_PORT`](#django_local_port).
159156
[Azure Monitor connection strings](https://docs.microsoft.com/en-us/azure/azure-monitor/app/sdk-connection-string)
160157

161158
Enables [log collection](../../deployment/infrastructure/#logs). Set the value in quotes, e.g. `APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=…"`.
159+
160+
[app-service-config]: https://docs.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal
161+
[benefits-secrets]: https://github.com/cal-itp/benefits-secrets
162+
[deployment]: ../deployment/README.md
163+
[getting-started_create-env]: ../getting-started/README.md#create-an-environment-file

docs/deployment/infrastructure.md

+10
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,13 @@ lifecycle {
159159
ignore_changes = [tags]
160160
}
161161
```
162+
163+
## Azure environment setup
164+
165+
The following steps are required to set up the environment, with linked issues to automate them:
166+
167+
- `terraform apply`
168+
- Set required [App Service configuration](../configuration/environment-variables.md)
169+
- Bind the certificates to the slots - [#704](https://github.com/cal-itp/benefits/issues/704)
170+
171+
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.

terraform/app_service.tf

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
resource "azurerm_service_plan" "main" {
2-
name = "ASP-CDT-PUB-VIP-CALITP-P-001"
3-
location = data.azurerm_resource_group.prod.location
4-
resource_group_name = data.azurerm_resource_group.prod.name
5-
os_type = "Linux"
6-
sku_name = "P2v2"
2+
name = "ASP-CDT-PUB-VIP-CALITP-P-001"
3+
location = data.azurerm_resource_group.prod.location
4+
resource_group_name = data.azurerm_resource_group.prod.name
5+
os_type = "Linux"
6+
sku_name = "P2v2"
77

88
lifecycle {
99
ignore_changes = [tags]
@@ -115,6 +115,7 @@ resource "azurerm_linux_web_app_slot" "dev" {
115115
ignore_changes = [app_settings, tags]
116116
}
117117

118+
# setup files
118119
storage_account {
119120
access_key = azurerm_storage_account.main.primary_access_key
120121
account_name = azurerm_storage_account.main.name
@@ -167,6 +168,7 @@ resource "azurerm_linux_web_app_slot" "test" {
167168
ignore_changes = [app_settings, tags]
168169
}
169170

171+
# setup files
170172
storage_account {
171173
access_key = azurerm_storage_account.main.primary_access_key
172174
account_name = azurerm_storage_account.main.name

0 commit comments

Comments
 (0)