Skip to content

Commit 97ab46d

Browse files
authored
Merge pull request #39 from microsoft/document/addfeatureflagsinfo
Document/addfeatureflagsinfo
2 parents 88f6312 + 17e4540 commit 97ab46d

10 files changed

Lines changed: 96 additions & 60 deletions

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ The diagram below illustrates the capabilities included in the template.
3535

3636
- Configures AI Foundry, adhering to the best practices outlined in the Well Architected Framework.
3737

38-
- Provides the ability to add additional Azure services during deployment, configured to connect via isolation, to facilitate your AI project.
39-
(API Management, CosmosDB, Azure SQL DB, App Service)
38+
- Provides the ability to [add additional Azure services during deployment](docs/add_additional_services.md), configured to connect via isolation to enrich your AI project.
39+
(API Management, CosmosDB, Azure SQL DB)
4040

4141
## Prerequisites and high-level steps
4242

4343
1. Have access to an Azure subscription and Entra ID account with Contributor permissions.
44-
2. Confirm the subscription you are deploying into has the [Required Roles and Scopes](Required_roles_scopes_resources.md) and
45-
3. If deploying from your [local environment](local_environment_steps.md) Install the [Azure Developer CLI (AZD)](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd?tabs=winget-windows%2Cbrew-mac%2Cscript-linux&pivots=os-windows)
46-
4. If deploying via [GitHub Codespaces](github_code_spaces_steps.md) - requires the user to be on a GitHub Team or Enterprise Cloud plan
47-
5. If leveraging [One-click deployment](#quick-deploy)
48-
6. If leveraging [GitHub Actions](github_actions_steps.md)
44+
2. Confirm the subscription you are deploying into has the [Required Roles and Scopes](docs/Required_roles_scopes_resources.md).
45+
3. The solution ensures secure access to the private VNET through a jump-box VM with Azure Bastion. By default, Bastion does not require an inbound NSG rule for network traffic. However, if your environment enforces specific policy rules, you can resolve access issues by entering your machine's IP address in the `allowedIpAddress` parameter when prompted during deployment. If not specified, all IP addresses are allowed to connect to Azure Bastion.
46+
4. If deploying from your [local environment](docs/local_environment_steps.md), install the [Azure Developer CLI (AZD)](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd?tabs=winget-windows%2Cbrew-mac%2Cscript-linux&pivots=os-windows).
47+
5. If deploying via [GitHub Codespaces](docs/github_code_spaces_steps.md) - requires the user to be on a GitHub Team or Enterprise Cloud plan.
48+
6. If leveraging [One-click deployment](#quick-deploy).
49+
7. If leveraging [GitHub Actions](docs/github_actions_steps.md).
4950

5051
For additional documentation of the default enabled services of this solution accelerator, please see:
5152

@@ -69,13 +70,13 @@ For additional documentation of the default enabled services of this solution ac
6970
QUICK DEPLOY
7071
</h2>
7172

72-
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Deploy-Your-AI-Application-In-Production) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Deploy-Your-AI-Application-In-Production) | [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FDeploy-Your-AI-Application-In-Production%2Fmain%2Finfra%2Fmain.json) |
73-
|---|---|---|
74-
[Steps to deploy with GitHub Codespaces](DeployViaCodeSpaces.md)
73+
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Deploy-Your-AI-Application-In-Production) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Deploy-Your-AI-Application-In-Production) |
74+
|---|---|
75+
[Steps to deploy with GitHub Codespaces](docs/DeployViaCodeSpaces.md)
7576

7677

7778
## Connect to and validate access to the new environment
78-
Follow the post deployment steps [Post Deployment Steps](post_deployment_steps.md) to connect to the isolated environment.
79+
Follow the post deployment steps [Post Deployment Steps](docs/post_deployment_steps.md) to connect to the isolated environment.
7980

8081

8182
## Deploy your application in the isolated environment
File renamed without changes.

docs/add_additional_services.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Add additional Azure services when deploying
2+
3+
Within this deployment automation of AI Foundry, we also have coupled several additional Azure services that are commonly deployed when creating an AI solution. We have added the ability to deploy these services at the same time as the AI Foundry deployment, or to add the services later.
4+
These 'feature flags' leverage true/false values to either enable or disable (default behavior) the deployment and configuration of the following service(s):
5+
6+
**Table of the available feature flags in this repository:**
7+
8+
| **Feature Flag Name** | **Effect When Enabled** | **Instructions to Enable** |
9+
|------------------------------|---------------------------------------------------------|-------------------------------------------------------------------------------------------|
10+
| `cosmosDbEnabled` | Enables Cosmos DB integration. | Set the environment variable `AZURE_COSMOS_DB_ENABLED` to `true`. |
11+
| `sqlServerEnabled` | Enables SQL Server integration. | Set the environment variable `AZURE_SQL_SERVER_ENABLED` to `true`. |
12+
| `acrEnabled` | Enables Azure Container Registry (ACR) integration. | Set the environment variable `AZURE_ACR_ENABLED` to `true`. |
13+
| `apiManagementEnabled` | Enables API Management integration. | Set the environment variable `AZURE_API_MANAGEMENT_ENABLED` to `true`. |
14+
15+
To enable these features during the deployment of your Foundry services, simply set the value to 'true' when prompted. This will add the selected feature during deployment, integrating it with the virtual network, private endpoints, and DNS zones.
16+
You can set the values as an env variable within the code
17+
```powershell
18+
azd env set AZURE_API_MANAGEMENT_ENABLED true
19+
```
20+
21+
Additionally, within the infra/ folder you can modify the main.parameters.json file to set the value to true by default.
22+
```json
23+
"apiManagementEnabled": {
24+
"value": "${AZURE_API_MANAGEMENT_ENABLED=true}"
25+
}
26+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

infra/main.bicep

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ param connections connectionType[] = []
1515
param aiModelDeployments deploymentsType[] = []
1616

1717
@description('Specifies whether creating an Azure Container Registry.')
18-
param acrEnabled bool = false
18+
param acrEnabled bool
1919

2020
@description('Specifies the size of the jump-box Virtual Machine.')
2121
param vmSize string = 'Standard_DS4_v2'
@@ -41,7 +41,7 @@ param userObjectId string = deployer().objectId
4141
param allowedIpAddress string = ''
4242

4343
@description('Specifies if Microsoft APIM is deployed.')
44-
param apiManagementEnabled bool = false
44+
param apiManagementEnabled bool
4545

4646
@description('Specifies the publisher email for the API Management service. Defaults to admin@[name].com.')
4747
param apiManagementPublisherEmail string = 'admin@${name}.com'
@@ -50,13 +50,13 @@ param apiManagementPublisherEmail string = 'admin@${name}.com'
5050
param networkIsolation bool = true
5151

5252
@description('Whether to include Cosmos DB in the deployment.')
53-
param cosmosDbEnabled bool = false
53+
param cosmosDbEnabled bool
5454

5555
@description('Optional. List of Cosmos DB databases to deploy.')
5656
param cosmosDatabases sqlDatabaseType[] = []
5757

5858
@description('Whether to include SQL Server in the deployment.')
59-
param sqlServerEnabled bool = false
59+
param sqlServerEnabled bool
6060

6161
@description('Optional. List of SQL Server databases to deploy.')
6262
param sqlServerDatabases databasePropertyType[] = []

infra/main.parameters.json

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,58 @@
11
{
2-
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3-
"contentVersion": "1.0.0.0",
4-
"parameters": {
5-
"name": {
6-
"value": "${AZURE_ENV_NAME}"
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"name": {
6+
"value": "${AZURE_ENV_NAME}"
7+
},
8+
"location": {
9+
"value": "${AZURE_LOCATION}"
10+
},
11+
"vmAdminPasswordOrKey": {
12+
"value": "${AZURE_VM_ADMIN_PASSWORD}"
13+
},
14+
"vmSize": {
15+
"value": "${AZURE_VM_SIZE=Standard_DS4_v2}"
16+
},
17+
"cosmosDbEnabled": {
18+
"value": "${AZURE_COSMOS_DB_ENABLED}"
19+
},
20+
"sqlServerEnabled": {
21+
"value": "${AZURE_SQL_SERVER_ENABLED}"
22+
},
23+
"acrEnabled": {
24+
"value": "${AZURE_ACR_ENABLED}"
25+
},
26+
"apiManagementEnabled": {
27+
"value": "${AZURE_API_MANAGEMENT_ENABLED}"
28+
},
29+
"aiModelDeployments": {
30+
"value": [
31+
{
32+
"name": "textembed",
33+
"model": {
34+
"name": "text-embedding-ada-002",
35+
"format": "OpenAI",
36+
"version": "2"
37+
},
38+
"sku": {
39+
"name": "Standard",
40+
"capacity": 10
41+
}
742
},
8-
"location": {
9-
"value": "${AZURE_LOCATION}"
10-
},
11-
"vmAdminPasswordOrKey":{
12-
"value": "${AZURE_VM_ADMIN_PASSWORD}"
13-
},
14-
"vmSize": {
15-
"value": "${AZURE_VM_SIZE=Standard_DS4_v2}"
16-
},
17-
"allowedIpAddress": {
18-
"value": "${AZURE_ALLOWED_IP_ADDRESS}"
19-
},
20-
"aiModelDeployments": {
21-
"value": [
22-
{
23-
"name": "textembed",
24-
"model": {
25-
"name": "text-embedding-ada-002",
26-
"format": "OpenAI",
27-
"version": "2"
28-
},
29-
"sku": {
30-
"name": "Standard",
31-
"capacity": 10
32-
}
33-
},
34-
{
35-
"name": "gpt",
36-
"model": {
37-
"name": "gpt-4o",
38-
"version": "2024-05-13",
39-
"format": "OpenAI"
40-
},
41-
"sku": {
42-
"name": "GlobalStandard",
43-
"capacity": 10
44-
}
45-
}
46-
]
43+
{
44+
"name": "gpt",
45+
"model": {
46+
"name": "gpt-4o",
47+
"version": "2024-05-13",
48+
"format": "OpenAI"
49+
},
50+
"sku": {
51+
"name": "GlobalStandard",
52+
"capacity": 10
53+
}
4754
}
55+
]
4856
}
49-
}
57+
}
58+
}

0 commit comments

Comments
 (0)