Skip to content

Commit 4174fd3

Browse files
committed
Share env vars in bicep and update docs
1 parent 4ec32f7 commit 4174fd3

File tree

6 files changed

+231
-231
lines changed

6 files changed

+231
-231
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ contact [[email protected]](mailto:[email protected]) with any additio
2222
- [Running unit tests](#running-unit-tests)
2323
- [Running E2E tests](#running-e2e-tests)
2424
- [Code Style](#code-style)
25+
- [Adding new azd environment variables](#add-new-azd-environment-variables)
2526

2627
## Code of Conduct
2728

@@ -160,3 +161,11 @@ python -m black <path-to-file>
160161
```
161162

162163
If you followed the steps above to install the pre-commit hooks, then you can just wait for those hooks to run `ruff` and `black` for you.
164+
165+
## Adding new azd environment variables
166+
167+
When adding new azd environment variables, please remember to update:
168+
1. App Service's [azure.yaml](./azure.yaml)
169+
2. Azure Container Apps' [azure.yaml](./containerapps/azure.yaml)
170+
3. [ADO pipeline](.azdo/pipelines/azure-dev.yml).
171+
4. [Github workflows](.github/workflows/azure-dev.yml)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Pricing varies per region and usage, so it isn't possible to predict exact costs
6666
However, you can try the [Azure pricing calculator](https://azure.com/e/a87a169b256e43c089015fda8182ca87) for the resources below.
6767

6868
- Azure App Service: Basic Tier with 1 CPU core, 1.75 GB RAM. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/app-service/linux/)
69-
- Azure Container Apps: Consumption plan with 1 CPU core, 2.0 GB RAM. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
69+
- Azure Container Apps: Only provisioned if you deploy to Azure Container Apps following instructions [here](docs/azure_container_apps.md). Consumption plan with 1 CPU core, 2.0 GB RAM. Pricing with Pay-as-You-Go. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
7070
- Azure OpenAI: Standard tier, GPT and Ada models. Pricing per 1K tokens used, and at least 1K tokens are used per question. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/)
7171
- Azure AI Document Intelligence: SO (Standard) tier using pre-built layout. Pricing per document page, sample documents have 261 pages total. [Pricing](https://azure.microsoft.com/pricing/details/form-recognizer/)
7272
- Azure AI Search: Basic tier, 1 replica, free level of semantic search. Pricing per hour. [Pricing](https://azure.microsoft.com/pricing/details/search/)
@@ -127,7 +127,7 @@ A related option is VS Code Dev Containers, which will open the project in your
127127

128128
## Deploying
129129

130-
Follow these steps to provision Azure resources and deploy the application code:
130+
The steps below will provision Azure resources and deploy the application code to Azure App Service. To deploy to Azure Container Apps instead, follow [the container apps deployment guide](docs/azure_container_apps.md).
131131

132132
1. Login to your Azure account:
133133

containerapps/README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
# Deploying on Azure Container Apps
1+
# Deploying to Azure Container Apps
22

3-
Due to [a limitation](https://github.com/Azure/azure-dev/issues/2736) of azd, the azure.yaml file for deploying to Azure Container Apps lives here.
4-
To deploy to azure container apps, please run from project root folder:
5-
6-
```bash
7-
cd containerapps
8-
azd env new
9-
azd env set DEPLOYMENT_TARGET containerapps
10-
azd up
11-
```
12-
13-
## Customizing Workload Profile
14-
15-
The default workload profile is Consumption. If you want to use a dedicated workload profile like D4, please run:
16-
17-
```bash
18-
azd env AZURE_CONTAINER_APPS_WORKLOAD_PROFILE D4
19-
```
20-
21-
For a full list of workload profiles, please check [here](https://learn.microsoft.com/azure/container-apps/workload-profiles-overview#profile-types).
22-
Please note dedicated workload profiles have a different billing model than Consumption plan. Please check [here](https://learn.microsoft.com/azure/container-apps/billing) for details.
3+
Please see the [guide](../docs/azure_container_apps.md) for deploying to Azure Container Apps.

containerapps/azure.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ pipeline:
8989
- AZURE_ADLS_GEN2_STORAGE_ACCOUNT
9090
- AZURE_ADLS_GEN2_FILESYSTEM_PATH
9191
- AZURE_ADLS_GEN2_FILESYSTEM
92+
- DEPLOYMENT_TARGET
93+
- AZURE_CONTAINER_APPS_WORKLOAD_PROFILE
9294
secrets:
9395
- AZURE_SERVER_APP_SECRET
9496
- AZURE_CLIENT_APP_SECRET

docs/azure_container_apps.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,22 @@
11
# Deploying on Azure Container Apps
22

3-
Due to [a limitation](https://github.com/Azure/azure-dev/issues/2736) of azd, the azure.yaml file for deploying to Azure Container Apps lives in folder `aca-host` along with symbolic links to `app`,`data` and `scripts` folder.
4-
5-
## For Linux/MacOS users
6-
7-
If you are on Linux/MacOS, it should work without any extra settings to deploy on Azure Container Apps. Please use:
3+
Due to [a limitation](https://github.com/Azure/azure-dev/issues/2736) of azd, the azure.yaml file for deploying to Azure Container Apps lives here.
4+
To deploy to azure container apps, please run from project root folder:
85

96
```bash
10-
cd aca-host
7+
cd containerapps
8+
azd env new
9+
azd env set DEPLOYMENT_TARGET containerapps
1110
azd up
1211
```
1312

14-
## For Windows users
13+
## Customizing Workload Profile
1514

16-
Because Windows [doesn't enable symbolic links by default](https://stackoverflow.com/questions/5917249/git-symbolic-links-in-windows), you may need to enable [Developer Mode](https://learn.microsoft.com/windows/apps/get-started/enable-your-device-for-development) and symlinks for git before cloning this repo.
17-
To enable symlinks for git, please use
15+
The default workload profile is Consumption. If you want to use a dedicated workload profile like D4, please run:
1816

1917
```bash
20-
# local setting
21-
git config core.symlinks true
22-
# Alternatively, enable symlinks globally
23-
git config --global core.symlinks true
18+
azd env AZURE_CONTAINER_APPS_WORKLOAD_PROFILE D4
2419
```
2520

26-
Please check whether the symlink works correctly and then run:
27-
28-
```bash
29-
cd aca-host
30-
azd up
31-
```
21+
For a full list of workload profiles, please check [here](https://learn.microsoft.com/azure/container-apps/workload-profiles-overview#profile-types).
22+
Please note dedicated workload profiles have a different billing model than Consumption plan. Please check [here](https://learn.microsoft.com/azure/container-apps/billing) for details.

0 commit comments

Comments
 (0)