Skip to content

Commit b6f5cd8

Browse files
docs: Updated the deployment documents (#76)
* upadted the readme files * Updated the link * Updated the alignment
1 parent 2d8deb8 commit b6f5cd8

File tree

3 files changed

+165
-25
lines changed

3 files changed

+165
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ QUICK DEPLOY
8585

8686
| [![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) |
8787
|---|---|
88-
[Steps to deploy with GitHub Codespaces](docs/github_code_spaces_steps.md)
88+
[Steps to deploy with GitHub Codespaces](docs/github_code_spaces_steps.md)| [Steps to deploy with Dev Container](docs/Dev_ContainerSteps.md)
8989

9090

9191
## Connect to and validate access to the new environment

docs/Dev_ContainerSteps.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
### VS Code Dev Containers
2+
3+
You can run this solution in VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
4+
5+
1. Open the project:
6+
7+
[![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)
8+
9+
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
10+
4. Continue with the [deploying steps](#steps-to-provision-network-isolated-environment-using-dev-container).
11+
12+
# Steps to Provision Network Isolated environment using Dev Container
13+
14+
1. Log into your Azure subscription:
15+
16+
```shell
17+
azd auth login
18+
```
19+
20+
![Image showing the entering of the command 'azd auth' in the terminal of VS Code](../img/provisioning/azdauthcommandline.png)
21+
22+
![image showing the authorization window opening in the browser](../img/provisioning/azdauthpopup.png)
23+
24+
![Image showing the password prompt for azure](../img/provisioning/enterpassword.png)
25+
26+
2. Login to azure, run the below command:
27+
```shell
28+
az login
29+
```
30+
The [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cli?view=azure-cli-latest) is used to validate available AI model quota.
31+
32+
![image showing theaz login in the vs code terminal](../img/provisioning/az_login.png)
33+
34+
3. Now start the deployment of the infrastructure by typing the below command:
35+
```shell
36+
azd up
37+
```
38+
> ⚠️ **Note:** The latest version of the Azure Developer CLI (AZD) is currently limited on prompting for missing parameters. The feature flag parameters in this solution have been temporarily defaulted to `'disabled'` until this limitation is lifted and prompting will resume.
39+
40+
41+
![image showing the terminal in vs code](../img/provisioning/azd_provision_terminal.png)
42+
43+
This step will allow you to choose from the subscriptions you have available, based on the account you logged in with in the login step. Next it will prompt you for the region to deploy the resources into as well as any additional Azure resources to be provisioned and configured.
44+
45+
**Important:** Be sure to remember the vm password. This will be used in a later step. You are still required to log into Azure once you connect through the virtual machine.
46+
47+
6. The automated model quota check will run, and will check if the location selected will have the necessary quota for the AI Models that are listed in the parameters file prior to deploying any resources.
48+
![image showing model quota pre-provision code executing](../img/provisioning/preprovision_output.png)
49+
50+
51+
If the location selected has sufficient quota for the models you plan to deploy, the provisioning will begin without notification.
52+
53+
![image showing model quota pre-provision pass](../img/provisioning/preprovision_success.png)
54+
55+
If the location selected does not have the available quota for the models selected in your parameters, there will be a message back to the user, prior to any provisioning of resources. This will allow the developer to change the location of the provisiong and try again. Note that in our example, Italy North had capacity for gpt-4o but not for text-embedding-ada-002. This terminated the entire provisioning, because both models could not be deployed due to a quota issue.
56+
57+
![image showing model quota pre-provision fail](../img/provisioning/preprovision_fail.png)
58+
59+
7. After completeing the required paramters that you were prompted for, and a successful model quota validation, the provisioning of resources will run and deploy the Network Isolated AI Foundry development portal and dependent resources in about 20 minutes.
60+
61+
62+
# Post Deployment Steps:
63+
These steps will help to check that the isolated environment was set up correctly.
64+
Follow these steps to check the creation of the required private endpoints in the environment (when set to networkIsolation = true).
65+
66+
One way to check if the access is private to the hub is to launch the AI Foundry hub from the portal.
67+
68+
![Image showing if network isolation is checked](../img/provisioning/checkNetworkIsolation3.png)
69+
70+
When a user that is not connected through the virtual network via an RDP approved connection will see the following screen in their browser. This is the intended behavior!
71+
72+
![Image showing the virtual machine in the browser](../img/provisioning/checkNetworkIsolation4.png)
73+
74+
A more thourough check is to look for the networking settings and checking for private end points.
75+
76+
1. Go to the Azure Portal and select your Azure AI hub that was just created.
77+
78+
2. Click on Settings and then Networking.
79+
80+
![Image showing the Azure Portal for AI Foundry Hub and the settings blade](../img/provisioning/checkNetworkIsolation1.png)
81+
82+
3. Open the Workspace managed outbound access tab.
83+
84+
![Image showing the Azure Portal for AI Foundry Hub and the Workspace managed outbound access tab](../img/provisioning/checkNetworkIsolation2.png)
85+
86+
Here, you will find the private endpoints that are connected to the resources within the hub managed virtual network. Ensure that these private endpoints are active.
87+
The hub should show that Public access is ‘disabled’.
88+
89+
## Connecting to the isolated network via RDP
90+
1. Navigate to the resource group where the isolated AI Foundry was deployed to and select the virtual machine.
91+
92+
![Image showing the Azure Portal for the virtual machine](../img/provisioning/checkNetworkIsolation5.png)
93+
94+
2. Be sure that the Virtual Machine is running. If not, start the VM.
95+
96+
![Image showing the Azure Portal VM and the start/stop button](../img/provisioning/checkNetworkIsolation6.png)
97+
98+
3. Select “Bastion” under the ‘Connect’ heading in the VM resource.
99+
100+
![Image showing the bastion blade selected](../img/provisioning/checkNetworkIsolation7.png)
101+
102+
4. Supply the username and the password you created as environment variables and press the connect button.
103+
104+
![Image showing the screen to enter the VM Admin info and the connect to bastion button](../img/provisioning/checkNetworkIsolation8.png)
105+
106+
5. Your virtual machine will launch and you will see a different screen.
107+
108+
![Image showing the opening of the Virtual machine in another browser tab](../img/provisioning/checkNetworkIsolation9.png)
109+
110+
6. Launch Edge browser and navigate to your AI Foundry Hub. https://ai.azure.com Sign in using your credentials.
111+
112+
113+
7. You are challenged by MFA to connect.
114+
115+
![Image showing the Multi Factor Authentication popup](../img/provisioning/checkNetworkIsolation10.png)
116+
117+
8. You will now be able to view the Foundry Hub which is contained in an isolated network.
118+
119+
![Image showing the Azure Foundry AI Hub with a private bubble icon](../img/provisioning/checkNetworkIsolation11.png)
120+
121+
## Contributing
122+
123+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
124+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
125+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
126+
127+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
128+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
129+
provided by the bot. You will only need to do this once across all repos using our CLA.
130+
131+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
132+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
133+
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
134+
135+
## Trademarks
136+
137+
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
138+
trademarks or logos is subject to and must follow
139+
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
140+
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
141+
Any use of third-party trademarks or logos are subject to those third-party's policies.

docs/github_code_spaces_steps.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,53 @@ You can run this solution using GitHub Codespaces. The button will open a web-ba
77
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Deploy-Your-AI-Application-In-Production)
88
2. Accept the default values on the create Codespaces page
99
3. Open a terminal window if it is not already open
10-
4. Continue with the [deploying steps](#deploying)
11-
10+
4. Continue with the [deploying steps](#steps-to-provision-network-isolated-environment-using-github-codespaces-using-azd-cli)
1211

1312
# Steps to Provision Network Isolated environment using GitHub Codespaces using AZD CLI
1413

15-
1. Navigate to the repo
16-
2. Click the code button
17-
3. Click the Codespaces tab
18-
4. Click "Create Codespaces on main"
19-
20-
![Image showing Codespaces in the browser](../img/provisioning/codespaces.png)
21-
22-
This step will create the codespaces environment for you and launch a web based VS Code session.
23-
5. In the terminal window (usually below by default) you can select the layout of the window in the upper right corner.
14+
1. Log into your Azure subscription:
2415

25-
![Image showing VS Code terminal](../img/provisioning/vscode_terminal.png)
26-
27-
6. Log into your Azure subscription by leveraging the “azd auth login” command. Type the command “azd auth login”. It will display a code to copy and paste into the authorization window that will appear when you hit the enter button.
16+
```shell
17+
azd auth login
18+
```
2819

2920
![Image showing the entering of the command 'azd auth' in the terminal of VS Code](../img/provisioning/azdauthcommandline.png)
3021

3122
![image showing the authorization window opening in the browser](../img/provisioning/azdauthpopup.png)
3223

3324
![Image showing the password prompt for azure](../img/provisioning/enterpassword.png)
3425

35-
7. Return to the codespaces window and type “az login”. The [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cli?view=azure-cli-latest) is used to validate available AI model quota.
36-
![image showing theaz login in the vs code terminal](../img/provisioning/az_login.png)
26+
2. Return to the codespaces window and type below command:
27+
```shell
28+
az login
29+
```
30+
The [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cli?view=azure-cli-latest) is used to validate available AI model quota.
3731

38-
8. Return to the codespaces window now. In the terminal window, begin by initializing the environment by typing the command “azd init”
32+
![image showing theaz login in the vs code terminal](../img/provisioning/az_login.png)
3933

34+
3. Return to codespace terminal and type the below command for initializing the environment.
35+
```shell
36+
azd init
37+
```
4038
![image showing the initial screen in the vs code terminal](../img/provisioning/azd_init_terminal.png)
4139

42-
9. Enter the name for your environment
40+
4. Enter the environment name.
4341

4442
![aImage showing entering a new environment name](../img/provisioning/enter_evn_name.png)
4543

46-
10. Now start the deployment of the infrastructure by typing the command “azd up”
47-
44+
5. Now start the deployment of the infrastructure by typing the below command:
45+
```shell
46+
azd up
47+
```
4848
> ⚠️ **Note:** The latest version of the Azure Developer CLI (AZD) is currently limited on prompting for missing parameters. The feature flag parameters in this solution have been temporarily defaulted to `'disabled'` until this limitation is lifted and prompting will resume.
4949

5050
![image showing the terminal in vs code](../img/provisioning/azd_provision_terminal.png)
5151

5252
This step will allow you to choose from the subscriptions you have available, based on the account you logged in with in the login step. Next it will prompt you for the region to deploy the resources into as well as any additional Azure resources to be provisioned and configured.
5353

54-
**Be sure to remember the vm password. This will be used in a later step. You are still required to log into Azure once you connect through the virtual machine.
55-
54+
**Important:** Be sure to remember the vm password. This will be used in a later step. You are still required to log into Azure once you connect through the virtual machine.
5655

57-
11. The automated model quota check will run, and will check if the location selected will have the necessary quota for the AI Models that are listed in the parameters file prior to deploying any resources.
56+
6. The automated model quota check will run, and will check if the location selected will have the necessary quota for the AI Models that are listed in the parameters file prior to deploying any resources.
5857
![image showing model quota pre-provision code executing](../img/provisioning/preprovision_output.png)
5958

6059

@@ -66,7 +65,7 @@ You can run this solution using GitHub Codespaces. The button will open a web-ba
6665

6766
![image showing model quota pre-provision fail](../img/provisioning/preprovision_fail.png)
6867

69-
12. After completeing the required paramters that you were prompted for, and a successful model quota validation, the provisioning of resources will run and deploy the Network Isolated AI Foundry development portal and dependent resources in about 20 minutes.
68+
7. After completeing the required paramters that you were prompted for, and a successful model quota validation, the provisioning of resources will run and deploy the Network Isolated AI Foundry development portal and dependent resources in about 20 minutes.
7069

7170

7271
# Post Deployment Steps:

0 commit comments

Comments
 (0)