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

AI/ML Online Endpoint Service Target #3718

Merged
merged 4 commits into from
Apr 30, 2024
Merged

AI/ML Online Endpoint Service Target #3718

merged 4 commits into from
Apr 30, 2024

Conversation

wbreza
Copy link
Contributor

@wbreza wbreza commented Apr 16, 2024

Adds ability to quickly and easily deploy to an AI/ML studio online endpoint from azd

  • When config.flow section is defined azd will create a new prompt flow from the specified file path
  • When config.environment section is defined azd will create a new environment version using the referenced yaml file definition
  • When config.model section is defined azd will create a new model version using the referenced yaml file definition

The config.deployment section is required and will create a new online deployment to the associated online endpoint from the referenced yaml file definition.

  • Associates environment and model will be referenced when available
  • azd waits for deployment to enter a terminal provisioning state
  • On successful deployments all traffic is shifted to the new deployment version
  • All previous deployments are deleted to free up compute for future deployments.

Tip

Use the custom build of azd outlined in the comments below to try out this new feature!

Warning

This feature is a work in progress and is subject to change. Any and all feedback is welcome and appreciated.

New azd service host type: ai.endpoint

Important

Requires Python installed and available on PATH

What can I deploy to AI online endpoints?

  • Custom Environments
    • Environments can be viewed with Azure ML Studio under the Environments section
  • Custom models
  • Prompt flows
  • Online Deployments (within Online-Endpoint)

Requirements

The following resources will be expected to be included within your deployed Azure resources.

  1. AI Hub Resource (Azure ML Workspace) & Required dependencies.
    • Key Vault
    • Storage Account
    • Container Registry (optional)
    • App Insights (optional)
    • Azure Open AI Services
    • Azure AI Search (If required by your app)
  2. AI Project Resource (Azure ML Workspace)
  3. Online Endpoint (ML Online Endpoint)
    • Should be tagged with azd-service-name tag
    • This is the target of the azd deployment
  4. AI Hub Connections
    • Any required connections that may be referenced in your flow/model

Example azure.yaml

This example comes from a fork of the contoso-chat application.

Reference the yaml schema from this branch for live IntelliSense within the azure.yaml

name: contoso-chat
metadata:
  template: [email protected]
hooks:
  # Post provision hooks are still required to seed any data sources or create required search indexes
  postprovision:
    shell: sh
    run: ./infra/hooks/postprovision.sh
services:
  chat:
    # Referenced new ai.endpoint host type
    host: ai.endpoint
    # New config flow for AI project configuration
    config:
      # The name of the AI studio project / workspace
      workspace: ${AZUREAI_PROJECT_NAME}
      # Optional: Path to custom ML environment manifest
      environment:
        path: deployment/docker/environment.yml
      # Optional: Path to your prompt flow folder that contains the flow manifest
      flow:
        path: ./contoso-chat
      # Optional: Path to custom model manifest
      model:
        path: deployment/chat-model.yaml
        overrides:
          "properties.azureml.promptflow.source_flow_id": ${AZUREAI_FLOW_NAME}
      # Required: Path to deployment manifest
      deployment:
        path: deployment/chat-deployment.yaml
        environment:
          PRT_CONFIG_OVERRIDE: deployment.subscription_id=${AZURE_SUBSCRIPTION_ID},deployment.resource_group=${AZURE_RESOURCE_GROUP},deployment.workspace_name=${AZUREAI_PROJECT_NAME},deployment.endpoint_name=${AZUREAI_ENDPOINT_NAME},deployment.deployment_name=${AZUREAI_DEPLOYMENT_NAME}

AI Endpoint Configuration

The configuration spec of the config section of services for ai.endpoint.

 - workspace: The name of the AI studio project / workspace (supports env var substitutions)
 - flow: Custom configuration for flows
 - environment: Custom configuration for ML environments
 - model: Custom configuration for ML models
 - deployment: Custom configuration for online endpoint deployments

Flow (flow)

Optional flow configuration section

 - name: Name of flow (defaults to <service-name>-flow-<timestamp> if not specified)
 - path: Relative path to a flow folder that contains the flow manifest
 - overrides: Any custom overrides to apply to the flow
 

Note

Each call to azd deploy will create a new timestamped flow

Environment (environment)

Optional environment configuration section

 - name: Name of custom environment (defaults to <service-name>-environment if not specified)
 - path: Relative path to a custom environment yaml manifest
 - overrides: Any custom overrides to apply to the environment

Note

Each call to azd deploy will create a new environment version

Model (model)

Optional model configuration section

 - name: Name of custom model (defaults to <service-name>-model if not specified)
 - path: Relative path to a custom model yaml manifest
 - overrides: Any custom overrides to apply to the model

Note

Each call to azd deploy will create a new environment version

Deployment (deployment)

Required deployment configuration section.

 - name: Name of custom model(defaults to <service-name>-deployment if not specified)
 - path: Relative path to a custom deployment yaml manifest
 - environment: A map of key value pairs to set environment variables for the deployment. Supports environment variable substitutions from OS/AZD environment variables using ${VAR_NAME} syntax.
 - overrides: Any custom overrides to apply to the deployment

Note

Only supports managed online deployments

@wbreza wbreza changed the title WIP: AI Service Target WIP: AI Service Targets Apr 16, 2024
@wbreza wbreza mentioned this pull request Apr 16, 2024
@wbreza wbreza added the ai AI label Apr 16, 2024
@wbreza wbreza force-pushed the wabrez/ai-service-targets branch 2 times, most recently from ba83aa4 to 38b5b33 Compare April 22, 2024 16:45
@wbreza wbreza changed the title WIP: AI Service Targets AI/ML Online Endpoint Service Target Apr 22, 2024
@wbreza wbreza marked this pull request as ready for review April 22, 2024 17:22
@wbreza wbreza requested a review from karolz-ms as a code owner April 23, 2024 21:04
@vhvb1989
Copy link
Member

vhvb1989 commented Apr 23, 2024

Actually, do we even need to set a host for this scenario? I think that machine learning applies only one specific host, right? >We would never expect machine learning config for a containerapp host, for example. And I notice we are not setting a >project: path, which makes me think that, for machine learning, we don't need to set a host ?

Host is required and needs to be set to ml.endpoint for the time being. We're working the product team to nail down the host naming. This deploys the model to an actual online endpoint object.

Project is optional. If set it will be used as a base for any other paths referenced in the config section.

OTOH, by not having a project: path, does it means we can't have a machine learning service + a classic azd service (like a java springapps) ?

Some AI components like prompt flows can be deployed to ACA or AKS, but you wouldn't use this host for that. That would simply use a dockerfile and deploy like normal containerized application.

@vhvb1989 - I accidently edited your post instead of replying to it... :(

Copy link
Member

@ellismg ellismg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking really good, @wbreza. Thanks for how cleanly this was inserted. A few questions that came to mind as I did my first pass.

cli/azd/pkg/project/ai_helper.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/internal/cmd/provision.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_target_ml_endpoint.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_target_ml_endpoint.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_target_ml_endpoint.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_target_ml_endpoint.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_target_ml_endpoint.go Outdated Show resolved Hide resolved
@ellismg
Copy link
Member

ellismg commented Apr 23, 2024

And I notice we are not setting a project: path, which makes me think that, for machine learning, we don't need to set a host ?

Does seem a little strange that we don't include a project here. Looking at the example azure.yaml that Wallace showed in the PR, I wonder if we should have a path and have it point to the file that config.deployment.path points to today. It feels like that is always required and so maybe moving up out of config makes sense?

@ellismg
Copy link
Member

ellismg commented Apr 23, 2024

I wonder if we can rename config to something more related to ml? Like, for example, mLearning. Same thing with the host name.

My general thought here is that config is nice as a general-purpose way to pass structured data to any provider, and that the "type" of the data is logically tied to a combination of the host and language (and maybe some other things)? I think the value in having them be seperate properties is really the UX for the editing experience. If we are confident that we could reuse this config name for another service target and still encode enough information in our JOSN schema for the azure.yaml file so folks got the correct intellisense based on the other properties in the object, then I think maybe moving towards config as the general way to pass service target specific configuration makes sense. If we don't feel good about that, then having the property have some more targeted name so we can produce a better schema is likely the way to go.

I'd drive the decision based on the UX we can give to users that have to edit this file by hand. Just my two cents...

@ellismg
Copy link
Member

ellismg commented Apr 23, 2024

When thinking about the sample azure.yaml file:

    config:
      # The name of the AI studio project / workspace
      workspace: ${AZUREML_AI_PROJECT_NAME}
      # Optional: Path to custom ML environment manifest
      environment:
        path: deployment/docker/environment.yml
      # Optional: Path to your prompt flow folder that contains the flow manifest
      flow:
        path: ./contoso-chat
      # Optional: Path to custom model manifest
      model:
        path: deployment/chat-model.yaml
        overrides:
          "properties.azureml.promptflow.source_flow_id": ${AZUREML_FLOW_NAME}
      # Required: Path to deployment manifest
      deployment:
        path: deployment/chat-deployment.yaml
        overrides:
          environment_variables.PRT_CONFIG_OVERRIDE: deployment.subscription_id=${AZURE_SUBSCRIPTION_ID},deployment.resource_group=${AZURE_RESOURCE_GROUP},deployment.workspace_name=${AZUREML_AI_PROJECT_NAME},deployment.endpoint_name=${AZUREML_ENDPOINT_NAME},deployment.deployment_name=${AZUREML_DEPLOYMENT_NAME}

I am wondering how much if this we could default? It seems like we "require" the overrides for both the model and deployment. Could we do work in azd such that if these keys are not set in the overrides bag, we add them (and then perhaps the way you opt out that is add the key but map it to the empty string, and then when building the overrides bag we just skip things with empty values?

It feels like we some simple defaults we could get this to:

    config:
      # Optional: Path to custom ML environment manifest
      environment:
        path: deployment/docker/environment.yml
      # Optional: Path to your prompt flow folder that contains the flow manifest
      flow:
        path: ./contoso-chat
      # Optional: Path to custom model manifest
      model:
        path: deployment/chat-model.yaml
      # Required: Path to deployment manifest
      deployment:
        path: deployment/chat-deployment.yaml

And then if we promote the deployment.path property out of config and to the normal service path property we'd be able to elide the config section completely for cases where you didn't have custom environment, or model and were not using an associated prompt flow?

I would like to make the azure.yaml simple for simple apps if possible - and this overrides thing is the one thing that jumps out at me as a bunch of confusing ceremony we might be able to handle for the user?

@kristenwomack
Copy link
Collaborator

I feel more confident with the long term of using config as the general-purpose way to pass structured data (provided that as we expand, we have enough information for intelligence to not get bloated, confusing, or have info missing). The mLearning is an interesting idea, and there are pros to going that route, however the two reasons I'm not convinced on that path are 1.) is that mLearning is durable long term? and 2.) when I look at what we have (dist, docker, hooks, image, k8s, etc) the terms are durable or product names. It's easy to know what they are, where mLearning could be confusing with general learning. Maybe iterating on the term mLearning is a jumping off point, and we go with a more specified property name?

@wbreza
Copy link
Contributor Author

wbreza commented Apr 24, 2024

Functional - note: I wonder if we can rename config to something more related to ml? Like, for example, mLearning. Same thing with the host name.

I actually would prefer if we moved to a generic config property instead of all the service target specific ones like aks. Then through our azure.yaml schema can give proper IntelliSense support based on the service host and internally we just convert the generic config in the service appropriate configuration object.

@wbreza
Copy link
Contributor Author

wbreza commented Apr 24, 2024

I feel more confident with the long term of using config as the general-purpose way to pass structured data (provided that as we expand, we have enough information for intelligence to not get bloated, confusing, or have info missing). The mLearning is an interesting idea, and there are pros to going that route, however the two reasons I'm not convinced on that path are 1.) is that mLearning is durable long term? and 2.) when I look at what we have (dist, docker, hooks, image, k8s, etc) the terms are durable or product names. It's easy to know what they are, where mLearning could be confusing with general learning. Maybe iterating on the term mLearning is a jumping off point, and we go with a more specified property name?

@kristenwomack We will be iterating on the naming of the hosts, environment variables, etc with the AI team. Seems like long term everything will be under the AI umbrella and moving away from the ML branding.

@wbreza
Copy link
Contributor Author

wbreza commented Apr 24, 2024

I would like to make the azure.yaml simple for simple apps if possible - and this overrides thing is the one thing that jumps out at me as a bunch of confusing ceremony we might be able to handle for the user?

The overrides would only be used for advanced scenarios where there needs to be some dynamic configuration with the AI component configuration that can't be statically set in the yaml definition.

Lots of the other configuration is purely optional if you are not using it. Workspace (aka project) is optional and will use ENV VAR when not defined.

Copy link
Member

@vhvb1989 vhvb1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partial rev

cli/azd/cmd/container.go Outdated Show resolved Hide resolved
cli/azd/internal/cmd/provision.go Outdated Show resolved Hide resolved
cli/azd/pkg/ai/config.go Show resolved Hide resolved
cli/azd/pkg/ai/python_bridge.go Outdated Show resolved Hide resolved
cli/azd/pkg/ai/python_bridge.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Show resolved Hide resolved
cli/azd/pkg/project/ai_helper.go Outdated Show resolved Hide resolved
cli/azd/pkg/project/service_config.go Show resolved Hide resolved
@ellismg
Copy link
Member

ellismg commented Apr 25, 2024

Just wondering - I'm in sort of bad state over here and ended doing an azd down on the contso-chat sample and then trying to re-deploy it later, and got this error:

ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:

Deployment Error Details:
InvalidTemplateDeployment: The template deployment 'cognitiveServices' is not valid according to the validation procedure. The tracking id is 'c867b1e1-0d61-4db8-9eca-db2c27baa199'. See inner errors for details.
FlagMustBeSetForRestore: An existing resource with ID '/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/rg-matell-contso-chat/providers/Microsoft.CognitiveServices/accounts/aoai-gwjxigz4bxghc' has been soft-deleted. To restore the resource, you must specify 'restore' to be 'true' in the property. If you don't want to restore existing resource, please purge it first.

Due to operator error, I am unsure if azd down was going to try to purge this resource, but just adding a note here to see if we need to add this to our list of purgeable resources so that azd down followed by azd up will continue to work.

@ellismg
Copy link
Member

ellismg commented Apr 25, 2024

I confirmed that we are already purging these account types:

(✓) Done: Purging Cognitive Account: aoai-gwjxigz4bxghc

So feel free to ignore the above.

Copy link
Member

@vhvb1989 vhvb1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main comments are about implementation details which can be re-iterated in the future.
Functionally speaking, LGTM

@Azure Azure deleted a comment from azure-pipelines bot Apr 26, 2024
@azure-sdk
Copy link
Collaborator

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718 --version '' --verbose --skip-verify

pwsh:

Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718' -Version '' -SkipVerify -Verbose

Windows

PowerShell install

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718' -Version '' -SkipVerify -Verbose;"

MSI install

powershell -c "irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3718/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"

Standalone Binary

MSI

Documentation

learn.microsoft.com documentation

title: Azure Developer CLI reference
description: This article explains the syntax and parameters for the various Azure Developer CLI commands.
author: alexwolfmsft
ms.author: alexwolf
ms.date: 04/29/2024
ms.service: azure-dev-cli
ms.topic: conceptual
ms.custom: devx-track-azdevcli

Azure Developer CLI reference

This article explains the syntax and parameters for the various Azure Developer CLI commands.

azd

The Azure Developer CLI (azd) is an open-source tool that helps onboard and manage your application on Azure

Options

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --docs         Opens the documentation for azd in your web browser.
  -h, --help         Gets help for azd.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

  • azd auth: Authenticate with Azure.
  • azd config: Manage azd configurations (ex: default Azure subscription, location).
  • azd deploy: Deploy the application's code to Azure.
  • azd down: Delete Azure resources for an application.
  • azd env: Manage environments.
  • azd hooks: Develop, test and run hooks for an application. (Beta)
  • azd init: Initialize a new application.
  • azd monitor: Monitor a deployed application. (Beta)
  • azd package: Packages the application's code to be deployed to Azure. (Beta)
  • azd pipeline: Manage and configure your deployment pipelines. (Beta)
  • azd provision: Provision the Azure resources for an application.
  • azd restore: Restores the application's dependencies. (Beta)
  • azd show: Display information about your app and its resources.
  • azd template: Find and view template details. (Beta)
  • azd up: Provision Azure resources, and deploy your project with a single command.
  • azd version: Print the version number of Azure Developer CLI.

azd auth

Authenticate with Azure.

Options

      --docs   Opens the documentation for azd auth in your web browser.
  -h, --help   Gets help for auth.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth login

Log in to Azure.

Synopsis

Log in to Azure.

When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.

To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, or --federated-credential-provider.

azd auth login [flags]

Options

      --check-status                           Checks the log-in status instead of logging in.
      --client-certificate string              The path to the client certificate for the service principal to authenticate with.
      --client-id string                       The client id for the service principal to authenticate with.
      --client-secret string                   The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
      --docs                                   Opens the documentation for azd auth login in your web browser.
      --federated-credential-provider string   The provider to use to acquire a federated token to authenticate with.
  -h, --help                                   Gets help for login.
      --redirect-port int                      Choose the port to be used as part of the redirect URI during interactive login.
      --tenant-id string                       The tenant id or domain name to authenticate with.
      --use-device-code[=true]                 When true, log in by using a device code instead of a browser.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth logout

Log out of Azure.

Synopsis

Log out of Azure

azd auth logout [flags]

Options

      --docs   Opens the documentation for azd auth logout in your web browser.
  -h, --help   Gets help for logout.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config

Manage azd configurations (ex: default Azure subscription, location).

Synopsis

Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.

Available since azure-dev-cli_0.4.0-beta.1.

The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

Options

      --docs   Opens the documentation for azd config in your web browser.
  -h, --help   Gets help for config.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config get

Gets a configuration.

Synopsis

Gets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config get <path> [flags]

Options

      --docs   Opens the documentation for azd config get in your web browser.
  -h, --help   Gets help for get.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config list-alpha

Display the list of available features in alpha stage.

azd config list-alpha [flags]

Options

      --docs   Opens the documentation for azd config list-alpha in your web browser.
  -h, --help   Gets help for list-alpha.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config reset

Resets configuration to default.

Synopsis

Resets all configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.

azd config reset [flags]

Options

      --docs    Opens the documentation for azd config reset in your web browser.
  -f, --force   Force reset without confirmation.
  -h, --help    Gets help for reset.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config set

Sets a configuration.

Synopsis

Sets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config set <path> <value> [flags]

Examples

azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus

Options

      --docs   Opens the documentation for azd config set in your web browser.
  -h, --help   Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config show

Show all the configuration values.

Synopsis

Show all configuration values in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config show [flags]

Options

      --docs   Opens the documentation for azd config show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config unset

Unsets a configuration.

Synopsis

Removes a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config unset <path> [flags]

Examples

azd config unset defaults.location

Options

      --docs   Opens the documentation for azd config unset in your web browser.
  -h, --help   Gets help for unset.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd deploy

Deploy the application's code to Azure.

azd deploy <service> [flags]

Options

      --all                   Deploys all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd deploy in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Deploys the application from an existing package.
  -h, --help                  Gets help for deploy.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd down

Delete Azure resources for an application.

azd down [flags]

Options

      --docs                 Opens the documentation for azd down in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Does not require confirmation before it deletes resources.
  -h, --help                 Gets help for down.
      --purge                Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env

Manage environments.

Options

      --docs   Opens the documentation for azd env in your web browser.
  -h, --help   Gets help for env.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env get-values

Get all environment values.

azd env get-values [flags]

Options

      --docs                 Opens the documentation for azd env get-values in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env list

List environments.

azd env list [flags]

Options

      --docs   Opens the documentation for azd env list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env new

Create a new environment and set it as the default.

azd env new <environment> [flags]

Options

      --docs                  Opens the documentation for azd env new in your web browser.
  -h, --help                  Gets help for new.
  -l, --location string       Azure location for the new environment
      --subscription string   Name or ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env refresh

Refresh environment settings by using information from a previous infrastructure provision.

azd env refresh <environment> [flags]

Options

      --docs                 Opens the documentation for azd env refresh in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.
      --hint string          Hint to help identify the environment to refresh

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env select

Set the default environment.

azd env select <environment> [flags]

Options

      --docs   Opens the documentation for azd env select in your web browser.
  -h, --help   Gets help for select.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env set

Manage your environment settings.

azd env set <key> <value> [flags]

Options

      --docs                 Opens the documentation for azd env set in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd hooks

Develop, test and run hooks for an application. (Beta)

Options

      --docs   Opens the documentation for azd hooks in your web browser.
  -h, --help   Gets help for hooks.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd hooks run

Runs the specified hook for the project and services

azd hooks run <name> [flags]

Options

      --docs                 Opens the documentation for azd hooks run in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for run.
      --platform string      Forces hooks to run for the specified platform.
      --service string       Only runs hooks for the specified service.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd init

Initialize a new application.

azd init [flags]

Options

  -b, --branch string         The template branch to initialize from. Must be used with a template argument (--template or -t).
      --docs                  Opens the documentation for azd init in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-code             Initializes a new application from your existing code.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
  -s, --subscription string   Name or ID of an Azure subscription to use for the new environment
  -t, --template string       Initializes a new application from a template. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd monitor

Monitor a deployed application. (Beta)

azd monitor [flags]

Options

      --docs                 Opens the documentation for azd monitor in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for monitor.
      --live                 Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
      --logs                 Open a browser to Application Insights Logs.
      --overview             Open a browser to Application Insights Overview Dashboard.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd package

Packages the application's code to be deployed to Azure. (Beta)

azd package <service> [flags]

Options

      --all                  Packages all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd package in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.
      --output-path string   File or folder path where the generated packages will be saved.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline

Manage and configure your deployment pipelines. (Beta)

Options

      --docs   Opens the documentation for azd pipeline in your web browser.
  -h, --help   Gets help for pipeline.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline config

Configure your deployment pipeline to connect securely to Azure. (Beta)

azd pipeline config [flags]

Options

      --auth-type string             The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials.
      --docs                         Opens the documentation for azd pipeline config in your web browser.
  -e, --environment string           The name of the environment to use.
  -h, --help                         Gets help for config.
      --principal-id string          The client id of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-name string        The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role stringArray   The roles to assign to the service principal. By default the service principal will be granted the Contributor and User Access Administrator roles. (default [Contributor,User Access Administrator])
      --provider string              The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines).
      --remote-name string           The name of the git remote to configure the pipeline to run on. (default "origin")

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd provision

Provision the Azure resources for an application.

azd provision [flags]

Options

      --docs                 Opens the documentation for azd provision in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for provision.
      --no-state             Do not use latest Deployment State (bicep only).
      --preview              Preview changes to Azure resources.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd restore

Restores the application's dependencies. (Beta)

azd restore <service> [flags]

Options

      --all                  Restores all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd restore in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd show

Display information about your app and its resources.

azd show [flags]

Options

      --docs                 Opens the documentation for azd show in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for show.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template

Find and view template details. (Beta)

Options

      --docs   Opens the documentation for azd template in your web browser.
  -h, --help   Gets help for template.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template list

Show list of sample azd templates. (Beta)

azd template list [flags]

Options

      --docs            Opens the documentation for azd template list in your web browser.
  -h, --help            Gets help for list.
  -s, --source string   Filters templates by source.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template show

Show details for a given template. (Beta)

azd template show <template> [flags]

Options

      --docs   Opens the documentation for azd template show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template source

View and manage template sources. (Beta)

Options

      --docs   Opens the documentation for azd template source in your web browser.
  -h, --help   Gets help for source.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template source add

Adds an azd template source at the specified key (Beta)

azd template source add <key> [flags]

Options

      --docs              Opens the documentation for azd template source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   Location of the template source.
  -n, --name string       Display name of the template source.
  -t, --type string       Kind of the template source.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template source list

Lists the configured azd template sources. (Beta)

azd template source list [flags]

Options

      --docs   Opens the documentation for azd template source list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template source remove

Removes the specified azd template source (Beta)

azd template source remove <key> [flags]

Options

      --docs   Opens the documentation for azd template source remove in your web browser.
  -h, --help   Gets help for remove.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd up

Provision Azure resources, and deploy your project with a single command.

azd up [flags]

Options

      --docs                 Opens the documentation for azd up in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for up.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd version

Print the version number of Azure Developer CLI.

azd version [flags]

Options

      --docs   Opens the documentation for azd version in your web browser.
  -h, --help   Gets help for version.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

@wbreza wbreza enabled auto-merge (squash) April 30, 2024 01:13
@wbreza wbreza merged commit 6e59938 into main Apr 30, 2024
38 checks passed
@wbreza wbreza deleted the wabrez/ai-service-targets branch April 30, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants