Skip to content

Commit

Permalink
May 2024 updates (#122)
Browse files Browse the repository at this point in the history
* initial update

* simplify solution

* more refactoring

* update chat request

* update prompt yml, work on chat request

* chat response updates

* eval updates

* eval notebook work

* delete eval folder

* rename contoso folder, eval updates

* eval updates

* add evals with new eval sdk

* Refactor / Support azd deployment (#103)

* refactor for azd / 1. update requirements

* refactor for azd / 2. update azd config for flex-flow, ai.endpoint

* refactor for azd / 3. add deployment, flex-flow, docs updates

* refactor for azd / 4. make postprovision.sh executable for hooks

* refactor for azd / 5. fix mismatched database names

* eval no sdk notebook

* fix custom eval promptys

* Update bicep files for GitHub actions (#105)

* Create bicep-audit.yml (#97)

* Configure Azure Developer Pipeline

* update bicep files for github actions:

* handle login depending on github/azdev

* ensure ipython and ipykernel are installed

* update eval workflow

* WIP eval

* scaffold out job summaries

* fix deeplink var

* WIP evals

---------

Co-authored-by: Anthony Shaw <[email protected]>

* fix chat prompty path, fix eval sdk run name

* fix / update azd in dev container setup, make hooks executable (#106)

* GitHub Actions Evaluation Updates (#107)

* Create bicep-audit.yml (#97)

* Configure Azure Developer Pipeline

* update bicep files for github actions:

* handle login depending on github/azdev

* ensure ipython and ipykernel are installed

* update eval workflow

* WIP eval

* scaffold out job summaries

* fix deeplink var

* WIP evals

* Update evaluations workflow

* add space in summary report

* update eval and chat.prompty paths to run from any directory

* update postprovision script to run notebooks

---------

Co-authored-by: Anthony Shaw <[email protected]>

* fix / update main README, move workshop content to docs/ (#108)

* fix / update azd in dev container setup, make hooks executable

* fix / move README to docs/ and replace with azd-template version

* fix entry function for flex flow

* Contoso Chat / fixes env, roles (#112)

* Create bicep-audit.yml (#97)

* initial setup / added fixes

* add data population notebooks

* fix / added troubleshotting to fix role assignment issue

---------

Co-authored-by: Anthony Shaw <[email protected]>

* add architecture diagram (#111)

* add arch diagram

* fix name

* fix variable names, add windows script, add mi, add cog serv role

* remove keys from script

* fix seach client

* add ps script, add roles to endpoint to fix permissions

* add key auth back to search and cosmos

* Redirect std out dev/null (#114)

* Update architecture diagram (#113)

* Create bicep-audit.yml (#97)

* add arch diagram

* fix name

* update diagram

* rename file

---------

Co-authored-by: Anthony Shaw <[email protected]>

* fix broken arch diagram link in readme (#115)

* Create bicep-audit.yml (#97)

* add arch diagram

* fix name

* update diagram

* rename file

* fix arch diagram filename

* fix broken link

---------

Co-authored-by: Anthony Shaw <[email protected]>

* Update README.md

* fix arch diagram link (#116)

* Create bicep-audit.yml (#97)

* add arch diagram

* fix name

* update diagram

* rename file

* fix arch diagram filename

* fix broken link

* fix link

---------

Co-authored-by: Anthony Shaw <[email protected]>
Co-authored-by: Cassie Breviu <[email protected]>

* Adding Managed Identity (#117)

Co-authored-by: Andre Dewes <[email protected]>

* May 2024 updates | updated README (#121)

* refactor / README.md to align with template

* refactor / README.md - add Table of Contents

* update / README - initial sync with template

---------

Co-authored-by: Nitya Narasimhan <[email protected]>
Co-authored-by: Jessica Deen <[email protected]>
Co-authored-by: Anthony Shaw <[email protected]>
Co-authored-by: Grace Kulin <[email protected]>
Co-authored-by: Wallace Breza <[email protected]>
Co-authored-by: Andre Dewes <[email protected]>
Co-authored-by: Andre Dewes <[email protected]>
  • Loading branch information
8 people authored May 15, 2024
1 parent f9b0ea9 commit 9db4969
Show file tree
Hide file tree
Showing 209 changed files with 7,055 additions and 8,330 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ RUN pip install -r requirements.txt \

# Configure the IPython kernel
RUN ipython kernel install --name "python3" --user

# Install daily version of azd for latest changes
# See: https://github.com/Azure/azure-dev/tree/main/cli/installer#download-from-daily-builds
RUN curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --version daily
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": "Python 3.11",
"name": "Contoso Chat (v2)",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
Expand Down
16 changes: 0 additions & 16 deletions .env.sample

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Deploy Contoso Chat

on:
workflow_dispatch:
push:
# Run when commits are pushed to mainline branch (main or master)
# Set this to the mainline branch you are using
branches:
- main
- master
paths-ignore:
- '.github/workflows/evaluations.yaml'
- 'README.md'

# GitHub Actions workflow to deploy to Azure using azd
# To configure required secrets for connecting to Azure, simply run `azd pipeline config`

# Set up permissions for deploying with secretless Azure federated credentials
# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
permissions:
id-token: write
contents: read

jobs:
build_and_deploy:
runs-on: ubuntu-latest
env:
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
AZURE_PRINCIPAL_TYPE: 'ServicePrincipal'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install azd
uses: Azure/[email protected]

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Log in with Azure (Federated Credentials)
if: ${{ env.AZURE_CLIENT_ID != '' }}
run: |
azd auth login `
--client-id "$Env:AZURE_CLIENT_ID" `
--federated-credential-provider "github" `
--tenant-id "$Env:AZURE_TENANT_ID"
shell: pwsh

- name: Log in with Azure (Client Credentials)
if: ${{ env.AZURE_CREDENTIALS != '' }}
run: |
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable;
Write-Host "::add-mask::$($info.clientSecret)"
azd auth login `
--client-id "$($info.clientId)" `
--client-secret "$($info.clientSecret)" `
--tenant-id "$($info.tenantId)"
shell: pwsh
env:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}

- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ env.AZURE_CLIENT_ID }}
tenant-id: ${{ env.AZURE_TENANT_ID }}
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}

- name: Set az account
uses: azure/CLI@v2
with:
inlineScript: |
az account set --subscription ${{env.AZURE_SUBSCRIPTION_ID}}
- name: Provision Infrastructure
run: azd provision --no-prompt
env:
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- name: Deploy Application
run: azd deploy --no-prompt
env:
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- name: Build Deep Link
id: deep_link
run: |
echo "deep_link=https://portal.azure.com/#@/resource/subscriptions/${{ env.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-${{ vars.AZURE_ENV_NAME }}/overview" >> "$GITHUB_OUTPUT"
- name: GitHub Summary Step
if: ${{ success() }}
run: |
echo "🔗 [View Resources Deployed Here](${{ steps.deep_link.outputs.deep_link }})" >> $GITHUB_STEP_SUMMARY
80 changes: 0 additions & 80 deletions .github/workflows/deploy-chat-pf-online-endpoint-pipeline.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/deploy-intent-pf-online-endpoint-pipeline.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/deploy-support-pf-online-endpoint-pipeline.yml

This file was deleted.

Loading

0 comments on commit 9db4969

Please sign in to comment.