diff --git a/.github/workflows/azd_deploy.yml b/.github/workflows/azd_deploy.yml index b4a8d3f..5fe3937 100644 --- a/.github/workflows/azd_deploy.yml +++ b/.github/workflows/azd_deploy.yml @@ -14,6 +14,14 @@ on: - provision - deploy - destroy + run_evals: + description: 'Run evals' + required: false + default: 'false' + type: choice + options: + - true + - false push: # Run when commits are pushed to mainline branch (main or master) # Set this to the mainline branch you are using @@ -37,17 +45,19 @@ env: AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} - RUN_EVALS: false + RUN_EVALS: ${{ github.event.inputs.run_evals || 'false' }} jobs: provision: environment: prod - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v4 - - name: Install azd - uses: Azure/setup-azd@ae0f8b5482eeac61e940f447327d84c73beb8b1e + # Disabling due to embedded sudo cmdlet. + # Relying on the self-hosted runner to have azd installed + # - name: Install azd + # uses: Azure/setup-azd@ae0f8b5482eeac61e940f447327d84c73beb8b1e - name: Azure CLI Login # Uses azure/login@v2.2 uses: azure/login@a65d910e8af852a8061c627c456678983e180302 diff --git a/.github/workflows/main_staging_ci.yml b/.github/workflows/main_staging_ci.yml index eac6393..7ac90de 100644 --- a/.github/workflows/main_staging_ci.yml +++ b/.github/workflows/main_staging_ci.yml @@ -14,7 +14,7 @@ on: jobs: quality-checks: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout Code 🛎️ diff --git a/README.md b/README.md index e4e88cb..e942d8a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ 🚀 **Welcome! Ready to streamline your Prior Authorization process?** Click below to get started with your deployment and unlock the full potential of AutoAuth.
- + 📚 Wiki @@ -21,7 +21,7 @@ - [Overview](#-overview) - [Introducing AutoAuth](#-introducing-autoauth) - [Quick Start](#-quick-start) - - [End-to-End Deployment Using AZD](https://pablosalvador10.github.io/gbb-ai-hls-factory-prior-auth/azd_deployment.html) + - [End-to-End Deployment Using AZD](https://azure-samples.github.io/autoauth-solution-accelerator/azd_deployment.html) - [PriorAuth SDK](#priorauth-sdk) - [Evaluations Framework](#evaluations) - [What's Next?](#-whats-next) @@ -61,7 +61,7 @@ This repository aims to **streamline and automate** the PA process using Azure A

-**Note:** For comprehensive details, including technical architecture, customization steps, references, and additional documentation, please visit our **[GitHub Pages](https://pablosalvador10.github.io/gbb-ai-hls-factory-prior-auth)**. +**Note:** For comprehensive details, including technical architecture, customization steps, references, and additional documentation, please visit our **[GitHub Pages](https://azure-samples.github.io/autoauth-solution-accelerator)**.
@@ -78,7 +78,7 @@ This repository aims to **streamline and automate** the PA process using Azure A > [!TIP] > *Want to customize or learn more about configuration?* -> **[Read the detailed instructions on our GitHub Pages ➜](https://pablosalvador10.github.io/gbb-ai-hls-factory-prior-auth)** +> **[Read the detailed instructions on our GitHub Pages ➜](https://azure-samples.github.io/autoauth-solution-accelerator)** More detailed documentation can be found in [docs/azd_deployment.md](docs/azd_deployment.md). @@ -112,7 +112,7 @@ For those looking for greater flexibility, the AutoAuth SDK enables you to embed With the AutoAuth SDK, you have the flexibility to automate end-to-end Prior Authorization workflows or select specific components to integrate into your system. Whether you require a full application or a microservice solution, AutoAuth provides the tools you need. -**Note:** Detailed information, technical architecture, customization steps, references, and further documentation are available on our **[GitHub Pages](https://pablosalvador10.github.io/gbb-ai-hls-factory-prior-auth)**. +**Note:** Detailed information, technical architecture, customization steps, references, and further documentation are available on our **[GitHub Pages](https://azure-samples.github.io/autoauth-solution-accelerator)**. ### Evaluations diff --git a/infra/README.md b/infra/README.md index dfcfaf7..bbeb71c 100644 --- a/infra/README.md +++ b/infra/README.md @@ -420,7 +420,6 @@ AZURE_OPENAI_API_VERSION | string | AZURE_OPENAI_EMBEDDING_DEPLOYMENT | string | AZURE_OPENAI_CHAT_DEPLOYMENT_ID | string | AZURE_OPENAI_CHAT_DEPLOYMENT_01 | string | -AZURE_OPENAI_API_VERSION_O1 | string | AZURE_OPENAI_EMBEDDING_DIMENSIONS | string | AZURE_SEARCH_SERVICE_NAME | string | AZURE_SEARCH_INDEX_NAME | string | diff --git a/infra/main.json b/infra/main.json index 6ad5b8d..69a1abd 100644 --- a/infra/main.json +++ b/infra/main.json @@ -15471,10 +15471,6 @@ "type": "string", "value": "[if(contains(parameters('reasoningModel').name, 'o1'), parameters('reasoningModel').name, '')]" }, - "AZURE_OPENAI_API_VERSION_O1": { - "type": "string", - "value": "[if(contains(parameters('reasoningModel').name, 'o1'), parameters('reasoningModel').version, '')]" - }, "AZURE_OPENAI_EMBEDDING_DIMENSIONS": { "type": "string", "value": "[parameters('embeddingModelDimension')]" diff --git a/infra/resources.bicep b/infra/resources.bicep index 4362c41..b450df2 100644 --- a/infra/resources.bicep +++ b/infra/resources.bicep @@ -542,7 +542,6 @@ output AZURE_OPENAI_API_VERSION string = chatModel.version output AZURE_OPENAI_EMBEDDING_DEPLOYMENT string = embeddingModel.name output AZURE_OPENAI_CHAT_DEPLOYMENT_ID string = chatCompletionModels[0].name output AZURE_OPENAI_CHAT_DEPLOYMENT_01 string = contains(reasoningModel.name, 'o1') ? reasoningModel.name : '' -output AZURE_OPENAI_API_VERSION_O1 string = contains(reasoningModel.name, 'o1') ? reasoningModel.version : '' output AZURE_OPENAI_EMBEDDING_DIMENSIONS string = embeddingModelDimension output AZURE_SEARCH_SERVICE_NAME string = searchService.outputs.searchServiceName output AZURE_SEARCH_INDEX_NAME string = 'ai-policies-index' diff --git a/infra/resources.json b/infra/resources.json index 0e3d189..bba6d25 100644 --- a/infra/resources.json +++ b/infra/resources.json @@ -15266,10 +15266,6 @@ "type": "string", "value": "[if(contains(parameters('reasoningModel').name, 'o1'), parameters('reasoningModel').name, '')]" }, - "AZURE_OPENAI_API_VERSION_O1": { - "type": "string", - "value": "[if(contains(parameters('reasoningModel').name, 'o1'), parameters('reasoningModel').version, '')]" - }, "AZURE_OPENAI_EMBEDDING_DIMENSIONS": { "type": "string", "value": "[parameters('embeddingModelDimension')]" diff --git a/utils/azd/hooks/postdeploy.sh b/utils/azd/hooks/postdeploy.sh index d98ff7e..71295ad 100755 --- a/utils/azd/hooks/postdeploy.sh +++ b/utils/azd/hooks/postdeploy.sh @@ -152,12 +152,8 @@ set_storage_shared_key_access() { run_evaluations() { # Ask user if they want to run evaluations (if not already set) if [ -z "${RUN_EVALS:-}" ]; then - read -p "Would you like to run model evaluations through AI Foundry? (y/n): " response - if [[ ! "$response" =~ ^[Yy] ]]; then - log_info "Model evaluations will be skipped." - return 0 - fi - log_info "Model evaluations will be run." + log_info "RUN_EVALS env flag currently not set. Model evaluations will be skipped." + return 0 else log_info "RUN_EVALS flag is already set to: $RUN_EVALS" if [[ "$RUN_EVALS" =~ ^[Ff][Aa][Ll][Ss][Ee]$ ]]; then diff --git a/utils/azd/hooks/postprovision.ps1 b/utils/azd/hooks/postprovision.ps1 index fed4c4f..95ac937 100644 --- a/utils/azd/hooks/postprovision.ps1 +++ b/utils/azd/hooks/postprovision.ps1 @@ -3,7 +3,6 @@ Write-Output " AZURE_OPENAI_ENDPOINT=$(azd env get-value AZURE_OPENAI_ENDPOINT) AZURE_OPENAI_API_VERSION=$(azd env get-value AZURE_OPENAI_API_VERSION) -AZURE_OPENAI_API_VERSION_O1=$(azd env get-value AZURE_OPENAI_API_VERSION_O1) AZURE_OPENAI_EMBEDDING_DEPLOYMENT=$(azd env get-value AZURE_OPENAI_EMBEDDING_DEPLOYMENT) AZURE_OPENAI_CHAT_DEPLOYMENT_ID=$(azd env get-value AZURE_OPENAI_CHAT_DEPLOYMENT_ID) AZURE_OPENAI_EMBEDDING_DIMENSIONS=$(azd env get-value AZURE_OPENAI_EMBEDDING_DIMENSIONS) diff --git a/utils/azd/hooks/postprovision.sh b/utils/azd/hooks/postprovision.sh index b39f620..a283cb7 100755 --- a/utils/azd/hooks/postprovision.sh +++ b/utils/azd/hooks/postprovision.sh @@ -3,7 +3,6 @@ echo "Generating .env file..." echo " AZURE_OPENAI_ENDPOINT=$(azd env get-value AZURE_OPENAI_ENDPOINT) AZURE_OPENAI_API_VERSION=$(azd env get-value AZURE_OPENAI_API_VERSION) -AZURE_OPENAI_API_VERSION_O1=$(azd env get-value AZURE_OPENAI_API_VERSION_O1) AZURE_OPENAI_EMBEDDING_DEPLOYMENT=$(azd env get-value AZURE_OPENAI_EMBEDDING_DEPLOYMENT) AZURE_OPENAI_CHAT_DEPLOYMENT_ID=$(azd env get-value AZURE_OPENAI_CHAT_DEPLOYMENT_ID) AZURE_OPENAI_EMBEDDING_DIMENSIONS=$(azd env get-value AZURE_OPENAI_EMBEDDING_DIMENSIONS) diff --git a/utils/devops/Dockerfile b/utils/devops/Dockerfile new file mode 100644 index 0000000..e6a20a6 --- /dev/null +++ b/utils/devops/Dockerfile @@ -0,0 +1,26 @@ +FROM ghcr.io/actions/actions-runner:2.304.0 +# for latest release, see https://github.com/actions/runner/releases + +USER root + +# install curl and jq +RUN apt-get update && apt-get install -y curl jq && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install Azure CLI +RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash + +# Install Azure Developer CLI (azd) +RUN mkdir -p /tmp/azd && \ + curl -fsSL https://aka.ms/install-azd.sh > /tmp/azd/install-azd.sh && \ + chmod +x /tmp/azd/install-azd.sh && \ + /tmp/azd/install-azd.sh && \ + rm -rf /tmp/azd + +COPY github-actions-runner/entrypoint.sh ./entrypoint.sh +RUN chmod +x ./entrypoint.sh + +USER runner + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/utils/devops/github-actions-runner/entrypoint.sh b/utils/devops/github-actions-runner/entrypoint.sh new file mode 100644 index 0000000..68b6fcd --- /dev/null +++ b/utils/devops/github-actions-runner/entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh -l + +# Retrieve a short lived runner registration token using the PAT +REGISTRATION_TOKEN="$(curl -X POST -fsSL \ + -H 'Accept: application/vnd.github.v3+json' \ + -H "Authorization: Bearer $GITHUB_PAT" \ + -H 'X-GitHub-Api-Version: 2022-11-28' \ + "$REGISTRATION_TOKEN_API_URL" \ + | jq -r '.token')" + +./config.sh --url $GH_URL --token $REGISTRATION_TOKEN --unattended --ephemeral && ./run.sh