Skip to content

Commit

Permalink
Updating workshop docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nitya committed Sep 18, 2024
1 parent b8d7e3d commit 629c5a5
Show file tree
Hide file tree
Showing 12 changed files with 307 additions and 960 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Contoso Chat (AITOUR25)",
"name": "Contoso Chat (v3)",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
Expand Down
42 changes: 27 additions & 15 deletions docs/workshop/docs/00 | Before You Begin/index.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
# 0️⃣ | Pre-Requisites

!!! warning "PRE-REQUISITES FOR SELF-GUIDED WORKSHOP"
!!! warning "PRE-REQUISITES FOR THIS WORKSHOP"

To participate in this workshop you will need the following:

1. **Your own laptop.** Should have a modern browser, preferably Microsoft Edge.
1. **A GitHub account.** A personal account with GitHub Codespaces access.
1. **An Azure subscription.** With access to Azure OpenAI Model deployments.

!!! warning "PRE-REQUISITES FOR TOUR-GUIDED WORKSHOP"

The same pre-requisites hold in this case, with one main exception: **An Azure subscription will be provided for you**.
The subscription is valid for the duration of the tour session and comes with a pre-provisioned infrastructure.

!!! info "GOOD-TO-HAVE SKILLS FOR DEVELOPMENT"

1. **Familiarity with VS Code.** Our default development environment.
1. **Familiarity with Python**. Our default coding language.
1. **Familiarity with Azure CLIs.** Our default deployment tooling.


The workshop is currently designed for delivery in two different contexts as described below. Choose one path to follow based on your current context.
## What You Learn

In this hands-on workshop, you will learn to:

## [Self-Guided Workshop](./01%20|%20Self%20Guided%20:%20Setup/01-setup.md)
* Use the Azure AI platform for code-first development of custom copilot solutions
* **Infrastructure**: Simplified provisioning and deployment with Azure Developer CLI
* **Ideation**: Rapid prototyping with Prompty asset and Azure AI model deployments
* **Evaluation**: Manual and AI-assisted testing with custom evaluators (for quality, safety)
* **Operationalization**: Deployment using Azure Container Apps (next: monitoring & actions)
* **Customization**: adapt to your application needs (data, prompts, models, evaluators)

Work through the instructions on your own
The workshop is designed for delivery in two formats:

- [X] You will use your own Azure subscription and laptop for development.
- [X] You will provision Azure infrastructure and deploy the application yourself.
- [X] You can work at your own pace and explore the codebase at will.
- **Tour-guided** where you join an instructor-led session (e.g., on Microsoft AI Tour)
- **Self-guided** where you walk through instructions on your own (e.g., at home)

## [Tour-Guided Workshop](./02%20|%20Tour%20Guided%20:%20Setup/01-setup.md)
## Tour-Guided Version

Offered as instructor-led sessions on the [Microsoft AI Tour](https://aka.ms/aitour).

- [X] You will be provided with an Azure subscription (just bring your laptop)
- [X] The infrastructure will be pre-provisioned for you to save you time
- [X] You will have a fixed time (75 minutes) to complete the workshop.
- [X] The infrastructure will be pre-provisioned for you to save you time (just launch lab VM)
- [X] You will have a fixed time (**75 minutes**) to complete the workshop (in venue)

!!! info "Start Here: 01 | Tour Guided: Setup → [1️⃣ | Getting Started](./../01%20|%20Tour%20Guided%20:%20Setup/01-setup.md)"

## Self-Guided Version

Work through the instructions on your own

- [X] You will use your own Azure subscription and laptop (see pre-requisites)
- [X] You will provision Azure infrastructure and deploy the application yourself.
- [X] You can work at your own pace and explore todebase with no time constraints.

!!! info "Start Here: 02 | Self Guided: Setup → [1️⃣ | Getting Started](./../02%20|%20Self%20Guided%20:%20Setup/01-setup.md)"
91 changes: 0 additions & 91 deletions docs/workshop/docs/01 | Self Guided : Setup/01-setup.md

This file was deleted.

98 changes: 98 additions & 0 deletions docs/workshop/docs/01 | Tour Guided : Setup/01-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# 1️⃣ | Getting Started


Thie instructions are for participants of the instructor-led **"WRK550: Build a Retail Copilot Code-First on Azure AI"** workshop offered on the Microsoft AI Tour (2024-2025). If you're not at an AI Tour event right now, you can register for an upcoming event in a city near you.

- [**Register to attend**](https://aitour.microsoft.com/) at a tour stop near you.
- [**View Lab resources**](https://aka.ms/aitour/wrk550) to continue your journey.

!!! info "First → Review [ 0️⃣ | Pre-requisites](./../00%20|%20Before%20You%20Begin/index.md) before you begin setup"

## 1. Launch Skillable Lab

Your instructor should have shared a _Skillable Lab Link_ with you at this time. In this section, we'll launch the Skillable VM and verify that we have the right credentials for the workshop.


??? note "Step 0: Launch Browser Window In Incognito Mode"

The workshop is conducted completely within a browser environment. You may have an enterprise Azure or GitHub account that you are logged into that may cause conflicts. To avoid this, we recommend opening a new browser window in **incognito mode** (private mode) with your preferred browser.

- Open a new browser window in incognito or private mode
- **Tip**: If you're using Microsoft Edge, we recommend creating 2 tab groups as follows:
- Group 1 = **"Skillable"** - open tabs A and B below for Skillable setup
- Group 2 = **"Development"** - open tabs 1️⃣-4️⃣ below for all workshop development

??? note "Step 1: Launch Skillable Lab"

1. Open a new browser window (in incognito mode)
1. Navigate to Skillable Lab (**use insrtuctor provided link**) = Tab A
1. Click `Launch` - opens window with Login, Instructions = Tab B
1. Click `Resources` tab - find admin `Password`
1. Click to fill password for login - confirm
1. You should see: Windows 11 Desktop ✅
1. Revisit `Resources` tab - look for `Azure Portal` section
1. Verify `Subscription`, `Username`, `Password` assigned ✅
1. Keep this browser open - you will need the credentials in the next step

**🌟 | CONGRATULATIONS!** - Your Skillable VM is live!


## 4. Setup Development Env

??? note "Step 2: Open GitHub in tab 1️⃣, Launch Codespaces in tab 2️⃣"

1. Open a new browser tab = Tab 1️⃣
1. Navigate to the workshop sample ([Contoso Chat](https://aka.ms/aitour/contoso-chat))
1. Log into GitHub - use a personal login account
1. Fork this sample to your profile - uncheck `main` to get branches
1. Switch to `WRK-550` branch in your fork
1. Click green `Code` button, select `Codespaces` tab
1. Click `Create new codespaces on WRK-550`
1. This should launch a new browser tab = Tab 2️⃣
1. Verify the new tab shows a VS Code editor ✅
1. Codespaces is loading ... this take a while

**🌟 | CONGRATULATIONS!** - Your Codespaces is running

??? note "Step 3: View Azure Portal in tab 3️⃣"

1. Open a new browser tab = Tab 3️⃣
1. Navigate to the [Azure Portal](https://portal.azure.com)
1. Sign in with Skillable `Username`-`Password` from Step 1.
1. Click `Resource Groups` - refresh it periodically if needed
1. See: resource group `rg-AITOUR` created ✅
1. Click resource group item - see 'Overview' in details page
1. View `Deployments` under **Essentials** - see 35 deployments ✅
1. View `Overview` resources listed - veriify 15 resources created ✅

**🌟 | CONGRATULATIONS!** - Your Azure Infra is Provisioned!

??? note "Step 4: View Azure AI Studio in tab 4️⃣"

1. Open a new browser tab = Tab 4️⃣
1. Navigate to the [Azure AI Studio](https://ai.azure.com)
1. Click `Sign in` - should auto-login with Azure credentials
1. Click `All resources` - see: a hub resource listed
1. Click hub resource - see: a project resource listed
1. Click `Deployments` tab - see: 4 models under `aoai-connection` ✅
1. Check: `gpt-4`, `gpt-35-turbo`, `text-embedding-ada-002` listed ✅

**🌟 | CONGRATULATIONS!** - Your Azure AI Project was created!

??? note "Step 5: View Container Apps Endpoint in tab 5️⃣"

1. Return to Azure Portal = Tab 3️⃣
1. Visit the `rg-AITOUR` Resource group page
1. Click the `Container Apps` resource - see details page
1. Look for `Application Url` - at top right
1. Click to launch in new tab = Tab 5️⃣
1. See: page with `"Azure Container Apps"` and logo

**🌟 | CONGRATULATIONS!** - Your ACA Endpoint is alive!


We verified our Skillable credentials worked, and launched our Codespaces environment!

---

!!! info "Next → 2️⃣ [Validate Setup](./02-validate.md) before you begin building"
62 changes: 62 additions & 0 deletions docs/workshop/docs/01 | Tour Guided : Setup/02-validate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 2️⃣ | Validate Setup

!!! info "Let's Review: We should have these tabs open in browser"

1. Tab A = Skillable Lab
2. Tab B = Skillable VM
3. Tab 1️⃣ = GitHub Repo
4. Tab 2️⃣ = GitHub Codespaces
5. Tab 3️⃣ = Azure Portal
6. Tab 4️⃣ = Azure AI Studio
7. Tab 5️⃣ = Azure Container Apps.

_In this section we'll authenticate with Azure from our GitHub Codespaces environment, and do some post-provisioning steps to get us ready for development_.


## On GitHub Codespaces

Lets authenticate with Azure and configure local development environment to use infrastructure.


??? note "Step 1: Validate Codespaces Ready in 2️⃣"

1. Return to GitHub Codespaces tab
1. See: VS Code editor with terminal open
1. Verify: `Prompty Extension` in sidebar (left, bottom)
1. Verify: Cursor ready in VS Code terminal (bottom)
1. Verify Python installed: `python --version` ✅
1. Verify Azure CLI installed: `az version` ✅
1. Verify Azure Developer CLI installed: `azd version` ✅
1. Verify Prompty installed: `prompty --version` ✅
1. Verify FastAPI installed: `fastapi --version` ✅

??? note "Step 2: Authenticate with Azure via CLIs in 2️⃣"

1. Log into Azure CLI - `az login --use-device-code`
1. Complete authflow - use default tenant, subscription
1. You are now logged into Azure CLI ✅
1. Log into Azure Developer CLI - `azd auth login`
1. Complete authflow - see: "Logged in to Azure" ✅

??? note "Step 3: Refresh Azure Dev Env in local env in 2️⃣"

1. Run `azd env refresh -e AITOUR` in terminal
1. Select default subscription
1. Select `francecentral` as Azure location
1. See: `SUCCESS: Environment refresh completed`
1. See: `.azure/AITOUR/.env` created with values ✅

??? note "Step 4: Run post-provisioning hooks in 2️⃣"

1. Run `bash workspaces/src/azd-update-roles.sh` in terminal
1. This will take a few minutes ....
1. Run `azd hooks run postprovision` in terminal
1. This will take a few minutes ....
1. Builds and deploys container app ..
1. Verify that you see a `.env` file in your repo ✅
1. Refresh Container App in tab 5️⃣ - verify that you see "Hello world" ✅


## On Azure Portal

Verify Azure CosmosDB, Azure AI Search and Azure Container App updates occured.
Loading

0 comments on commit 629c5a5

Please sign in to comment.