Skip to content

Commit 81f59ab

Browse files
cherchykmarcelotokodluc
authored
Adding support for Azure Developer CLI (AZD) (#751)
Add AZD support --------- Co-authored-by: Marcelo Tokunaga <[email protected]> Co-authored-by: Devis Lucato <[email protected]> Co-authored-by: Devis Lucato <[email protected]>
1 parent 942abfc commit 81f59ab

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,3 +503,4 @@ swa-cli.config.json
503503
**/copilot-chat-app/webapp/node_modules
504504

505505
*.orig
506+
.azure

KernelMemory.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{6EF76FD8-4
8080
README.md = README.md
8181
SECURITY.md = SECURITY.md
8282
KernelMemory.sln.DotSettings = KernelMemory.sln.DotSettings
83+
azure.yaml = azure.yaml
8384
EndProjectSection
8485
EndProject
8586
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{B8976338-7CDC-47AE-8502-C2FBAFBEBD68}"
@@ -243,6 +244,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infra", "infra", "{B488168B
243244
infra\main.bicep = infra\main.bicep
244245
infra\main.json = infra\main.json
245246
infra\README.md = infra\README.md
247+
infra\AZD.md = infra\AZD.md
248+
infra\main.parameters.json = infra\main.parameters.json
246249
EndProjectSection
247250
EndProject
248251
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{C2D3A947-B6F9-4306-BD42-21D8D1F42750}"

azure.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
2+
3+
name: kernel-memory

infra/AZD.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Deploying Kernel Memory infrastructure to Azure using AZD (Azure Developer CLI)
2+
3+
To deploy the Kernel Memory infrastructure to Azure, you can also use the azd up command from
4+
[Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/overview).
5+
This will create all the necessary resources.
6+
7+
## Deployment
8+
9+
The deployment process may take up to 20 minutes.
10+
11+
First you will need to install AZD, you can find how to do this on different platforms on this
12+
[Install or update the Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd).
13+
For example, on Windows you can use this command:
14+
15+
winget install microsoft.azd
16+
17+
After AZD installation, you'll need to log in with your Azure Account and then you can start the deployment.
18+
19+
To authenticate, execute:
20+
21+
azd auth login
22+
23+
It'll open Azure's login screen. Complete your authentication process. Remember that depending on your Tenant configuration
24+
Two-Factor Authentication may be required.
25+
26+
### Before starting the deployment for the first time
27+
28+
Kernel Memory deployment bicep uses Resource Group Scoped Deployment feature, and it has to be enabled using this command:
29+
30+
azd config set alpha.resourceGroupDeployments on
31+
32+
### Deployment
33+
34+
To start the actual deployment of Kernel Memory, navigate to the root of your local clone of the Kernel Memory repository
35+
and execute:
36+
37+
azd up
38+
39+
After hitting Enter, you will need to fill parameters.
40+
41+
> You can find more info about parameters here: [README.md](README.md).
42+
43+
The deployment takes about 20 minutes to complete.
44+
45+
### Clean Up Resources
46+
47+
To clean up resources and uninstall Kernel Memory from your Subscription, execute this command:
48+
49+
azd down
50+
51+
You'll be asked to confirm the deletion of the resource group, and after that you'll be asked to confirm deletion of
52+
your Azure AI Services. After that, all resources will be deleted.
53+
54+
## AZD Resources
55+
56+
> You can find more information about AZD on these links:
57+
> - [Installation guide](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd) for Azure Developer CLI.
58+
> - [Quickstart:](https://learn.microsoft.com/azure/developer/azure-developer-cli/get-started) Deploy an Azure Developer CLI template.

infra/main.parameters.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"environmentName": {
6+
"value": "${AZURE_ENV_NAME}"
7+
},
8+
"location": {
9+
"value": "${AZURE_LOCATION}"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)