Skip to content

Commit

Permalink
Merge pull request #25 from Azure/miyagi-v2
Browse files Browse the repository at this point in the history
Miyagi V2 - Semantic Kernel workshop - beta release
  • Loading branch information
thegovind authored Nov 19, 2024
2 parents 9a0234d + 2b382be commit 6050ac0
Show file tree
Hide file tree
Showing 99 changed files with 5,737 additions and 19 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {},
"ghcr.io/devcontainers/features/azure-cli:latest": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"EditorConfig.EditorConfig",
"GitHub.copilot"
]
}
}
}
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ node_modules/
parts/
sdist/
var/
package*.json
*.egg-info/
.installed.cfg
*.egg
Expand Down Expand Up @@ -69,3 +68,23 @@ ENV/
# MkDocs documentation
site*/
.vscode/

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Frontend/react/npm files
appsettings.json
.env
package-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Advanced AI Orchestration using agents and planners
6 changes: 6 additions & 0 deletions docs/wksp/05-semantic-kernel-workshop/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Hands-on AI Orchestration using Semantic Kernel

This workshop is broken into 2 main sections:

1. [Create simple AI Orchestration using Sematic Kernel](simple-ai-orchestration/index.md)
1. [Create advanced AI Orchestration using Sematik Kernel with agents and planners](advanced-ai-orchestration/index.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Azure Developer CLI (AZD) and Bicep templates for Infrastructure as Code deployment

In this section we go over the creation of `azd` [(Azure Developer CLI)]((https://aka.ms/azure-dev/install))
files and corresponding bicep templates to be able to build, provision infrastructure and
deploy our solution into Azure.

## Azure Developer CLI files overview

The following components are needed to deploy via AZD

### `azure.yaml` file

This file specifies the components to be deployed. Our file specifies two components to be deployed:

1. Application backend - .NET deployed as Azure Container App
1. Web frontend - Typescript deployed as Azure Container App

For each component we need to provide the path to the corresponding `Dockerfile` which will be used
to build and package the application:

```yaml
name: semantic-kernel-workshop-csharp
metadata:
template: [email protected]
services:
api:
project: ./App/backend/
host: containerapp
language: dotnet
docker:
path: ../Dockerfile
context: ../../
web:
project: ../frontend/
host: containerapp
language: ts
docker:
path: ./Dockerfile
context: ./
```
### `infra` directory

Within the `infra` directory you have the option to provide either `bicep` or `terraform` templates
to deploy the required infrastructure for our application to run. In this example we
use `bicep` templates which are organized as follows:

* **infra**
* `main.bicep` - contains the bicep parameters and modules to deploy
* `main.paramters.json` - parameter values to be used during deployment
* `abbreviations.json` - optional file to specify suffix abbreviations for each resource type
* app - subdirectory with application related templates
* `api.bicep` - bicep template for backend application infrastructure
* `web.bicep` - bicep templated for web application infrastructure
* core - subdirectory with templates for core infrastructure components
* **ai** - subdirectory for AI related components
* **host** - subdirectory for container app, environment and registry components
* **monitor** - subdirectory for monitoring components (e.g. application insights)
* **security** - subdirectory for security components (e.g. keyvault)
* **storage** - subdirectory for storage components (e.g. storage account)

The `azd init` command can be used to generate a starter template, however the quickest way
to generate an existing template is to find a template that uses similar components from
[awesome-azd](https://azure.github.io/awesome-azd/).

## Deploying using AZD CLI

You can build, provision all resources and deploy by following these steps:

1. Switch to `workshop/donet` directory.
1. Ensure Docker desktop is running (if not using Github Codespace).
1. Run `azd auth login` to login to your Azure account.
1. Run `azd up` to provision Azure resources and deploy this sample to those resources.
You will be prompted for the following parameters:
* Environment name: sk-test
* Select an Azure subscription to use from list
* Select an Azure location to use: e.g. (US) East US 2 (eastus2)
* Enter a value for the infrastructure parameters:
* **openAIApiKey**
* **openAiChatGptDeployment**: e.g. gpt-4o
* **openAiEndpoint**
* **stockServiceApiKey**
1. After the application has been successfully deployed you will see the API and Web Service URLs printed in the console.
Click the Web Service URL to interact with the application in your browser.

**NOTE:** It may take a few minutes for the application to be fully deployed.

## Deployment removal

In order to remove all resources deployed, use this command:

```bash
azd down --purge
```
Loading

0 comments on commit 6050ac0

Please sign in to comment.