Skip to content

Commit ec7b0cb

Browse files
authored
Merge pull request #689 from microsoft/dayland/cleanup-bicep-refs-in-docs
Update BICEP references to Terraform in README and documentation files
2 parents bf12999 + f540633 commit ec7b0cb

File tree

8 files changed

+48
-56
lines changed

8 files changed

+48
-56
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build-containers: extract-env
2424
infrastructure: check-subscription ## Deploy infrastructure
2525
@./scripts/inf-create.sh
2626

27-
extract-env: extract-env-debug-webapp extract-env-debug-functions ## Extract infrastructure.env file from BICEP output
27+
extract-env: extract-env-debug-webapp extract-env-debug-functions ## Extract infrastructure.env file from Terraform output
2828
@./scripts/json-to-env.sh < inf_output.json > ./scripts/environments/infrastructure.env
2929

3030
deploy-webapp: extract-env ## Deploys the web app code to Azure App Service
@@ -39,10 +39,10 @@ deploy-enrichments: extract-env ## Deploys the web app code to Azure App Service
3939
deploy-search-indexes: extract-env ## Deploy search indexes
4040
@./scripts/deploy-search-indexes.sh
4141

42-
extract-env-debug-webapp: ## Extract infrastructure.debug.env file from BICEP output
42+
extract-env-debug-webapp: ## Extract infrastructure.debug.env file from Terraform output
4343
@./scripts/json-to-env.webapp.debug.sh < inf_output.json > ./scripts/environments/infrastructure.debug.env
4444

45-
extract-env-debug-functions: ## Extract local.settings.json to debug functions from BICEP output
45+
extract-env-debug-functions: ## Extract local.settings.json to debug functions from Terraform output
4646
@./scripts/json-to-env.function.debug.sh < inf_output.json > ./functions/local.settings.json
4747

4848
# Utils (used by other Makefile rules)
@@ -64,5 +64,5 @@ destroy-inf: check-subscription
6464
functional-tests: extract-env ## Run functional tests to check the processing pipeline is working
6565
@./scripts/functional-tests.sh
6666

67-
run-migration: ## Migrate from bicep to terraform
67+
run-migration: ## Migrate from BICEP to Terraform
6868
python ./scripts/merge-databases.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ docs/deployment/ | Detailed documentation on how to deploy and start using Infor
168168
docs/features/ | Detailed documentation of specific features and development level configuration for Information Assistant.
169169
docs/ | Other supporting documentation that is primarily linked to from the other markdown files.
170170
functions/ | The pipeline of Azure Functions that handle the document extraction and chunking as well as the custom CosmosDB logging.
171-
infra/ | The BICEP scripts that deploy the entire IA Accelerator. The overall accelerator is orchestrated via the `main.bicep` file but most of the resource deployments are modularized under the **core** folder.
171+
infra/ | The Terraform scripts that deploy the entire IA Accelerator. The overall accelerator is orchestrated via the `main.tf` file but most of the resource deployments are modularized under the **core** folder.
172172
pipelines/ | Azure DevOps pipelines that can be used to enable CI/CD deployments of the accelerator.
173173
scripts/environments/ | Deployment configuration files. This is where all external configuration values will be set.
174174
scripts/ | Supporting scripts that perform the various deployment tasks such as infrastructure deployment, Azure WebApp and Function deployments, building of the webapp and functions source code, etc. These scripts align to the available commands in the `Makefile`.

docs/deployment/autoscale_sku.md

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ You may find better settings to fit your needs. This document explains how this
77

88
### Overview
99

10-
The Azure Functions Service Plan Autoscale settings are defined in the file located at `/infra/core/host/funcserviceplan.bicep`. These settings enable automatic scaling of the Azure Functions Service Plan based on CPU usage metrics.
10+
The Azure Functions Service Plan Autoscale settings are defined in the file located at `/infra/core/host/functions/functions.tf`. These settings enable automatic scaling of the Azure Functions Service Plan based on CPU usage metrics.
1111

12-
13-
14-
**File Location:** `/infra/core/host/funcserviceplan.bicep`
12+
**File Location:** `/infra/core/host/functions/functions.tf`
1513

1614
#### Scaling Rules
1715

@@ -29,16 +27,15 @@ The Azure Functions Service Plan Autoscale settings are defined in the file loca
2927
- **Time Window:** `5 minutes`
3028
- **Scaling Action:** Decrease capacity by `2` with a cooldown of `2 minutes`.
3129

32-
3330
## App Service Plan Autoscale for Enrichment App
3431

3532
### Overview
3633

37-
The App Service Plan Autoscale settings for the enrichment app are defined in the file located at `/infra/core/host.enrichmentappserviceplan.bicep`. These settings enable automatic scaling of the App Service Plan based on CPU usage metrics.
34+
The App Service Plan Autoscale settings for the enrichment app are defined in the file located at `/infra/core/host/enrichmentapp/enrichmentapp.tf`. These settings enable automatic scaling of the App Service Plan based on CPU usage metrics.
3835

3936
### Key Parameters
4037

41-
**File Location:** `/infra/core/host.enrichmentappserviceplan.bicep`
38+
**File Location:** `/infra/core/host/enrichmentapp/enrichmentapp.tf`
4239

4340
#### Scaling Rules
4441

@@ -58,86 +55,82 @@ The App Service Plan Autoscale settings for the enrichment app are defined in th
5855

5956
### Customization
6057

61-
To customize the App Service Plan Autoscale settings, modify the parameters mentioned above in the specified Bicep file. And Run the `make infrastructure` command.
62-
63-
58+
To customize the App Service Plan Autoscale settings, modify the parameters mentioned above in the specified terraform files. And Run the `make infrastructure` command.
6459

6560
# SKU Settings Documentation
6661

6762
### Overview
6863

69-
The SKU settings for all Service Plans are defined in the file located at `/infra/main.bicep`. The SKU (Stock Keeping Unit) represents the pricing tier or plan for your App Service. It defines the performance, features, and capacity of the App Service.
64+
The SKU settings for all Service Plans are defined in the file located at `/infra/variables.tf`. The SKU (Stock Keeping Unit) represents the pricing tier or plan for your App Service. It defines the performance, features, and capacity of the App Service.
7065
More information can be found [here.](https://azure.microsoft.com/en-us/pricing/details/app-service/windows/#purchase-options)
7166

7267
## Web App Service Plan SKU
7368

69+
**File Location:** `/infra/variables.tf`
7470

75-
**File Location:** `/infra/main.bicep`
76-
77-
#### SKU Settings
78-
79-
- **Name:** `S1`
80-
- **Capacity:** `3`
71+
### SKU Settings
8172

73+
- **appServiceSkuSize** `S1`
74+
- **appServiceSkuTier** `Standard`
8275

8376
## Functions Service Plan SKU
8477

78+
**File Location:** `/infra/variables.tf`
8579

86-
**File Location:** `/infra/main.bicep`
80+
### SKU Settings
8781

88-
#### SKU Settings
89-
90-
- **Name:** `S2`
91-
- **Capacity:** `2`
82+
- **functionsAppSkuSize** `S2`
83+
- **functionsAppSkuTie:** `Standard`
9284

9385
## Enrichment App Service Plan SKU
9486

87+
**File Location:** `/infra/variables.tf`
9588

96-
**File Location:** `/infra/main.bicep`
97-
98-
#### SKU Settings
89+
### SKU Settings
9990

100-
- **Name:** `P1v3`
101-
- **Tier:** `PremiumV3`
102-
- **Size:** `P1v3`
103-
- **Family:** `Pv3`
104-
- **Capacity:** `1`
91+
- **enrichmentAppServiceSkuSize** `P1v3`
92+
- **enrichmentAppServiceSkuTier** `PremiumV3`
10593

10694
### Enrichment Message Dequeue Parameter
107-
There exist a property that can be set in the local.env file called `DEQUEUE_MESSAGE_BATCH_SIZE` and is defaulted in the `infra/main.bicep` and `app/enrichment/app.py` to the value of **3**. This means the app will process 3 messages from the queue at a time. This is found to be the most optimal with the existing configuration but can be increased if you also increase the enrichment app service SKU. It is important to note that there will be issues if it is increased more than the app service SKU can handle.
95+
96+
There exist a property called `DEQUEUE_MESSAGE_BATCH_SIZE` and is defaulted in the `infra/main.tf` to the value of **1**. This means the app will process 1 messages from the queue at a time. This is found to be the most optimal with the existing configuration but can be increased if you also increase the enrichment app service SKU. It is important to note that there will be issues if it is increased more than the app service SKU can handle.
10897

10998
### Customization
11099

111-
To customize the App Service Plans SKU settings, modify the `sku` parameters in the specified Bicep file and run the `make deploy` or `make infrastructure`command.
100+
To customize the App Service Plans SKU settings, modify the terraform parameters by adding the following values to your `local.env` and run the `make deploy` or `make infrastructure`command.
101+
102+
```bash
103+
export TF_VAR_functionsAppSkuSize="S2"
104+
export TF_VAR_functionsAppSkuTier="Standard"
105+
export TF_VAR_appServiceSkuSize="S1"
106+
export TF_VAR_appServiceSkuTier="Standard"
107+
export TF_VAR_enrichmentAppServiceSkuSize="P1V3"
108+
export TF_VAR_enrichmentAppServiceSkuTier="PremiumV3"
109+
```
112110

113111
This can also be adjusted in the Azure Portal.
114112

115113
**Note:** Adjusting the scale or Tier can cause outages until the redeployment occurs.
116114

117-
118-
### Steps to Scale Up:
115+
### Steps to Scale Up
119116

120117
>1. **Sign in to the Azure Portal:**
121118
> - Open a web browser and navigate to the [Azure Portal](https://portal.azure.com/).
122119
> - Log in with your Azure account credentials.
123-
124120
>2. **Navigate to the App Service:**
125121
> - In the left navigation pane, select "App Services."
126122
> - Click on the specific App Service you want to scale.
127-
128123
>3. **Access the Scale Up Blade:**
129124
> - In the App Service menu, find and click on "Scale up (App Service plan)" in the left sidebar.
130-
131125
>4. **Choose a New Pricing Tier:**
132126
> - On the "Scale Up" blade, you'll see different pricing tiers representing various levels of resources.
133127
> - Select the desired pricing tier that corresponds to the scale you need.
134-
135128
>5. **Review and Apply Changes:**
136129
> - Review the information about the selected pricing tier, including its features and costs.
137130
> - Click the "Apply" or "Save" button to apply the changes.
138131
132+
### Considerations
139133

140-
### Considerations:
141134
- **Cost Implications:**
142135
- Be aware of the cost implications associated with higher pricing tiers. Review the Azure Pricing documentation for details on costs.
143136

@@ -146,4 +139,3 @@ This can also be adjusted in the Azure Portal.
146139

147140
- **Performance Impact:**
148141
- Scaling up provides additional resources, potentially improving performance. However, it's essential to assess whether your application benefits from the increased resources.
149-

docs/deployment/client_credentials_flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ If you want to call the backend API directly or want to use a custom User Interf
44

55
> :warning: **Important Note**: Executing the instructions in this document will modify the authentication mechanism of the API to expect a token. This change will cause the out-of-the-box UI, included in the app service, to receive a 401 Unauthorized error on page load as it does not include the required token in its requests. Please ensure you have a strategy to handle this change in your UI before proceeding.
66
7-
The below directions are showing how to accomplish via portal but most of which could be implemented in existing IaC through Bicep.
7+
The below directions are showing how to accomplish via portal but most of which could be implemented in existing IaC through Terraform.
88

99
## Update App Registration
1010

docs/deployment/deployment.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Once you have the completed setting up a GitHub Codespaces, please move on to th
2929

3030
The IA Accelerator needs to be sized appropriately based on your use case. Please review our [Sizing Estimator](/docs/costestimator.md) to help find the configuration that fits your needs.
3131

32-
To change the size of components deployed, make changes in the [Main Bicep](/infra/main.bicep) file.
32+
To change the size of components deployed, make changes in the [Terraform Variables](/infra/variables.tf) file.
3333

3434
Once you have completed the Sizing Estimator and sized your deployment appropriately, please move on to the Configuring your Environment step.
3535

@@ -44,7 +44,7 @@ Inside your Development environment (GitHub Codespaces or Container), do the fol
4444
4545
Variable | Required | Description
4646
--- | --- | ---
47-
LOCATION | Yes | The location (West Europe is the default). The BICEP templates use this value. To get a list of all the current Azure regions you can run `az account list-locations -o table`. The value here needs to be the *Name* value and not *Display Name*.
47+
LOCATION | Yes | The location (West Europe is the default). The Terraform templates use this value. To get a list of all the current Azure regions you can run `az account list-locations -o table`. The value here needs to be the *Name* value and not *Display Name*.
4848
WORKSPACE | Yes | The workspace name (use something simple and unique to you). This will appended to infoasst-????? as the name of the resource group created in your subscription.
4949
SUBSCRIPTION_ID | Yes | The GUID that represents the Azure Subscription you want the Accelerator to be deployed into. This can be obtained from the *Subscription* blade in the Azure Portal.
5050
TENANT_ID | Yes | The GUID that represents the Azure Active Directory Tenant for the Subscription you want the accelerator to be deployed into. This can be obtained from the *Tenant Info* blade in the Azure Portal.
@@ -59,8 +59,8 @@ ENABLE_SHAREPOINT_CONNECTOR | Yes | Defaults to `false`. This feature flag enabl
5959
SHAREPOINT_TO_SYNC | No | This is a JSON Array of Objects for SharePoint Sites and their entry folders. The app will crawl down from the folder specified for each site. Specifying "/Shared Documents" will crawl all the documents in your SharePoint. `[{"url": "https://SharePoint.com/", "folder": "/Shared Documents"}]` This will **overwrite** any prior changes you've made to config.json. Information on setting up SharePoint Ingestion can be found here [SharePoint Connector](/docs/features/sharepoint.md)
6060
ENABLE_MULTIMEDIA | Yes | Defaults to `false`. This feature flag should not be changed at this time. The multimedia feature is still in development. Enabling this feature will deploy an Azure Video Indexer instance in your resource group only.
6161
REQUIRE_WEBSITE_SECURITY_MEMBERSHIP | Yes | Use this setting to determine whether a user needs to be granted explicit access to the website via an Azure AD Enterprise Application membership (true) or allow the website to be available to anyone in the Azure tenant (false). Defaults to false. If set to true, A tenant level administrator will be required to grant the implicit grant workflow for the Azure AD App Registration manually.
62-
SKIP_PLAN_CHECK | No | If this value is set to 1, then the BICEP deployment will not stop to allow you to review the planned changes. The default value is 0 in the scripts, which will allow the deployment to stop and confirm you accept the proposed changes before continuing.
63-
USE_EXISTING_AOAI | Yes | Defaults to false. Set this value to "true" if you want to use an existing Azure Open AI service instance in your subscription. This can be useful when there are limits to the number of AOAI instances you can have in one subscription. When the value is set to "false" and BICEP will create a new Azure Open AI service instance in your resource group.
62+
SKIP_PLAN_CHECK | No | If this value is set to 1, then the Terraform deployment will not stop to allow you to review the planned changes. The default value is 0 in the scripts, which will allow the deployment to stop and confirm you accept the proposed changes before continuing.
63+
USE_EXISTING_AOAI | Yes | Defaults to false. Set this value to "true" if you want to use an existing Azure Open AI service instance in your subscription. This can be useful when there are limits to the number of AOAI instances you can have in one subscription. When the value is set to "false" and Terraform will create a new Azure Open AI service instance in your resource group.
6464
AZURE_OPENAI_RESOURCE_GROUP | No | If you have set **USE_EXISTING_AOAI** to "true" then use this parameter to provide the name of the resource group that hosts the Azure Open AI service instance in your subscription.
6565
AZURE_OPENAI_SERVICE_NAME | No | If you have set **USE_EXISTING_AOAI** to "true" then use this parameter to provide the name of the Azure Open AI service instance in your subscription.
6666
AZURE_OPENAI_SERVICE_KEY | No | If you have set **USE_EXISTING_AOAI** to "true" then use this parameter to provide the Key for the Azure Open AI service instance in your subscription.
@@ -142,13 +142,13 @@ help Show this help
142142
deploy Deploy infrastructure and application code
143143
build Build application code
144144
infrastructure Deploy infrastructure
145-
extract-env Extract infrastructure.env file from BICEP output
145+
extract-env Extract infrastructure.env file from Terraform output
146146
deploy-webapp Deploys the web app code to Azure App Service
147147
deploy-functions Deploys the function code to Azure Function Host
148148
deploy-enrichments Deploys the web app code to Azure App Service
149149
deploy-search-indexes Deploy search indexes
150-
extract-env-debug-webapp Extract infrastructure.debug.env file from BICEP output
151-
extract-env-debug-functions Extract local.settings.json to debug functions from BICEP output
150+
extract-env-debug-webapp Extract infrastructure.debug.env file from Terraform output
151+
extract-env-debug-functions Extract local.settings.json to debug functions from Terraform output
152152
functional-tests Run functional tests to check the processing pipeline is working
153153
```
154154

docs/deployment/worbook_usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ To effectively use this template, follow these steps:
4545
4646
## Customization
4747
48-
If you need to customize the default queries, locate the respective sections in the Bicep file and modify the `query` field within the `content` property.
48+
If you need to customize the default queries, locate the respective sections in the Terraform file and modify the `query` field within the `content` property.
4949
5050
Feel free to adapt the template based on your specific log analysis requirements.

infra/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ build Build application code
2626
infrastructure Deploy infrastructure
2727
deploy-webapp Deploys the web app to Azure App Service
2828
deploy-search-indexes Deploy search indexes
29-
extract-env Extract infrastructure.env file from BICEP output
29+
extract-env Extract infrastructure.env file from Terraform output
3030
```
3131

3232
## Configure authentication and authorization

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `/tests` folder contains a set of functional tests that validate the documen
44

55
## Functional tests
66

7-
The functional test are invoked as needed throughout the development process. It is initiated through a `make functional-tests` command which calls the `.\scripts\functional-tests.sh` script, which in turn parses the Bicep outputs and environment variables and invokes the Python-based functional tests. The goal of these is to make sure that throughout our development cycle, any changes made does not effect the expected processing pipeline outputs from a pre-determined set of input files (located in `.\tests`).
7+
The functional test are invoked as needed throughout the development process. It is initiated through a `make functional-tests` command which calls the `.\scripts\functional-tests.sh` script, which in turn parses the Terraform outputs and environment variables and invokes the Python-based functional tests. The goal of these is to make sure that throughout our development cycle, any changes made does not effect the expected processing pipeline outputs from a pre-determined set of input files (located in `.\tests`).
88

99
To add more test cases, include new files for ingestions into the `.\tests\test_data` folder and name the file `test_example` with the filetype extension appropriate for the new test case.
1010
A search query for that file will need to be added to the test harness code near the top of the python file.

0 commit comments

Comments
 (0)