Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May 2024 updates #122

Merged
merged 36 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
72f292a
initial update
cassiebreviu May 3, 2024
0b6c575
simplify solution
cassiebreviu May 3, 2024
f232b15
more refactoring
cassiebreviu May 4, 2024
e36f83d
update chat request
cassiebreviu May 4, 2024
634699d
update prompt yml, work on chat request
cassiebreviu May 4, 2024
0f9279d
chat response updates
cassiebreviu May 4, 2024
b52d120
eval updates
cassiebreviu May 4, 2024
6b26d47
eval notebook work
cassiebreviu May 4, 2024
9c80fe7
delete eval folder
cassiebreviu May 4, 2024
ffab59b
rename contoso folder, eval updates
cassiebreviu May 4, 2024
65638db
eval updates
cassiebreviu May 4, 2024
18ab7e4
add evals with new eval sdk
cassiebreviu May 6, 2024
2ad2b6d
Refactor / Support azd deployment (#103)
nitya May 6, 2024
4f94c7d
eval no sdk notebook
cassiebreviu May 7, 2024
7235268
fix custom eval promptys
cassiebreviu May 7, 2024
9cf20d7
Update bicep files for GitHub actions (#105)
jldeen May 7, 2024
17362a8
fix chat prompty path, fix eval sdk run name
cassiebreviu May 7, 2024
50f04c3
fix / update azd in dev container setup, make hooks executable (#106)
nitya May 8, 2024
05c8a92
GitHub Actions Evaluation Updates (#107)
jldeen May 8, 2024
18b09f1
fix / update main README, move workshop content to docs/ (#108)
nitya May 8, 2024
2f316a0
fix entry function for flex flow
cassiebreviu May 8, 2024
b73bf6d
Merge branch 'may-2024-updates' of https://github.com/Azure-Samples/c…
cassiebreviu May 8, 2024
2eae8d8
Contoso Chat / fixes env, roles (#112)
nitya May 11, 2024
2ee5aba
add architecture diagram (#111)
gkulin May 11, 2024
b802f0c
fix variable names, add windows script, add mi, add cog serv role
cassiebreviu May 12, 2024
39a0957
remove keys from script
cassiebreviu May 12, 2024
6f7c281
fix seach client
cassiebreviu May 12, 2024
9363e57
add ps script, add roles to endpoint to fix permissions
cassiebreviu May 13, 2024
a884608
add key auth back to search and cosmos
cassiebreviu May 13, 2024
b88aa05
Redirect std out dev/null (#114)
wbreza May 13, 2024
67a748c
Update architecture diagram (#113)
gkulin May 13, 2024
9581bf2
fix broken arch diagram link in readme (#115)
gkulin May 13, 2024
d5c7543
Update README.md
cassiebreviu May 13, 2024
76b0d10
fix arch diagram link (#116)
gkulin May 14, 2024
aaa704c
Adding Managed Identity (#117)
andredewes May 14, 2024
472bb99
May 2024 updates | updated README (#121)
nitya May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
35 changes: 35 additions & 0 deletions .github/workflows/bicep-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Validate AZD template
on:
push:
branches:
- main
paths:
- "infra/**"
pull_request:
branches:
- main
paths:
- "infra/**"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Microsoft Security DevOps Analysis
uses: microsoft/security-devops-action@preview
id: msdo
continue-on-error: true
with:
tools: templateanalyzer

- name: Upload alerts to Security tab
uses: github/codeql-action/upload-sarif@v3
if: github.repository_owner == 'Azure-Samples'
with:
sarif_file: ${{ steps.msdo.outputs.sarifFile }}
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.

Loading
Loading