Skip to content

[App Service] Add deployment guidance, warnings for Linux web apps#33088

Open
vageorge00 wants to merge 10 commits intoAzure:devfrom
vageorge00:appservice-deploy-ux-improvements
Open

[App Service] Add deployment guidance, warnings for Linux web apps#33088
vageorge00 wants to merge 10 commits intoAzure:devfrom
vageorge00:appservice-deploy-ux-improvements

Conversation

@vageorge00
Copy link
Copy Markdown

@vageorge00 vageorge00 commented Mar 27, 2026

Related command
az webapp create, az webapp deploy, az webapp up, az webapp delete, az webapp deployment source config-local-git, az appservice plan update

Description
Fixes https://github.com/serverless-paas-balam/tuxedo/issues/119
Improves the Azure CLI experience for deploying Linux web apps by adding help text, runtime warnings.

Help text: Added deployment guidance to az webapp create, SCM_DO_BUILD_DURING_DEPLOYMENT guidance to az webapp deploy, OS/runtime/plan defaults to az webapp up, branch convention to config-local-git, and scale up vs scale out to az appservice plan update.

Code: Added warning for container image path doubling when --container-image-name includes the registry host. Added runtime warnings for Linux zip deploy, OS type defaulting, runtime auto-detection, plan auto-generation, delete plan warning, and local-git branch convention.

Testing Guide

azdev style appservice  # PASSED
azdev linter appservice  # PASSED

 # Verify help text changes:
 az webapp create --help
 az webapp deploy --help
 az webapp up --help
 az appservice plan update --help
 
 # Verify deploy warning (Linux zip deploy):
 az webapp deploy -g MyRG -n MyLinuxApp --src-path app.zip --type zip
 # Should see: "Note: 'az webapp deploy' does not run build automation..."
 
 # Verify container image warning (registry host in image name):
 az webapp create -g MyRG -n MyApp --plan MyPlan --container-image-name docker.io/nginx:latest --container-registry-url docker.io
 # Should see: "Note: --container-image-name 'docker.io/nginx:latest' appears to include the registry host..."

End-to-end agent tests across Python, .NET, Java, and containers confirmed all warnings fire correctly.

Manual end-end tests for logging changes:

  1. See log that 'az webapp deploy' does not install dependencies:
image
  1. See log if Image name already includes the registry host (docker.io/) for az webapp create
    az webapp create -g test-startup4-rg -n test-pr-container --plan test-startup4-plan --container-image-name docker.io/nginx:latest --container-registry-url docker.io
image
  1. See log about branch info for
    az webapp deployment source config-local-git -g test-container-rg -n test-container-app2
image
  1. See log about plan being deleted
    az webapp delete -g test-container-rg -n test-container-app3
image
  1. Spot checking for help and param changes:
    We get added help/param info
    az webapp create --help
image image

History Notes

[App Service] az webapp create: Add post-creation deployment guidance and startup command examples
[App Service] az webapp deploy: Add build automation guidance for Linux zip deployments
[App Service] az webapp up: Add logging for OS type, runtime auto-detection, and plan auto-generation
[App Service] Add warning for container image path when --container-image-name includes registry host
[App Service] az webapp delete: Add warning about App Service Plan deletion


@microsoft-github-policy-service agree company="Microsoft"

vageorge00 and others added 3 commits March 27, 2026 10:50
…Linux

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 27, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @vageorge00,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 27, 2026

❌AzureCLI-BreakingChangeTest
❌apim
rule cmd_name rule_message suggest_message
1012 - SubgroupRemove apim backend sub group apim backend removed please confirm sub group apim backend removed

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 27, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@vageorge00 vageorge00 marked this pull request as ready for review March 27, 2026 23:09
Copilot AI review requested due to automatic review settings March 27, 2026 23:09
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@sarsharma
Copy link
Copy Markdown
Member

nit: From the screenshot in the description, I see that we still suggest deployment commands even if cx is using docker images
image
Should we skip that for docker image scenarios to avoid confusion

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --end-to-end-encryption-enabled true --min-tls-version 1.2
- name: Create a Linux Python web app with a custom startup command.
text: >
az webapp create -g MyResourceGroup -p MyLinuxPlan -n MyUniqueAppName --runtime "PYTHON:3.14" --startup-file "gunicorn --bind=0.0.0.0 app:app"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we double check here on --startup-file
I think it might be reference to the startup script file itself instead of the actual command

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you! Checked -> we are able to use startup file like "startup.sh" and also a command. Fixed, added example

local_context_attribute=LocalContextAttribute(name='web_name', actions=[LocalContextAction.SET],
scopes=['webapp', 'cupertino']))
c.argument('startup_file', help="Linux only. The web's startup file")
c.argument('startup_file', help="Linux only. The web's startup command. "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

as mentioned previously, let's double check on this
is this property taking the script file as input or the actual command itself?
also, if you want to accept startup command, lets add a new param for it as this can be a breaking change if you modify existing param

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Double checked, it can be file or command, thanks! fixed

app = client.web_apps.get(resource_group_name, name)
params.is_linux_webapp = is_linux_webapp(app)

# Warn interpreted-language Linux apps that zip deploy won't auto-build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

curios what is the case of dotnet, does it auto build?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Tested: .NET does auto-build with SCM_DO_BUILD_DURING_DEPLOYMENT=true. Without it, raw source gets copied but never compiled (app falls back to default placeholder). I have updated the warning to log for all Linux zip deploys, not just Python/Node/PHP. Good catch!

vageorge00 and others added 3 commits March 30, 2026 15:04
…ix, startup command clarification, scale up/down/in/out, runtime version updates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… for basic auth

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vageorge00 vageorge00 changed the title [App Service] Add deployment guidance, warnings, and container image fix for Linux web apps [App Service] Add deployment guidance, warnings for Linux web apps Mar 31, 2026
…add startup script example

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vageorge00
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Microsoft"

@yanzhudd
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).


Suggested next steps after creation:
- Deploy your code:
az webapp deploy -g MyResourceGroup -n MyAppName --src-path app.zip --type zip
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • --type zip is optional, and can be skipped if the file type is already a zip.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed --type zip

short-summary: Create a web app.
long-summary: The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.
long-summary: |
The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One of the common issues while creating sites is not getting the --runtime (linuxfxversion) right. Maybe we can emphasize about az webapp list-runtimes as well along with deploy.

Currently PHP:7.2 is listed as an example, let's move that to "PYTHON:3.14"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed! Added list-runtimes here, changed PHP:7.2 to PYTHON:3.14 in _params for az webapp create --runtime and az webapp up --runtime

"and Node.js runtimes, and to Windows for .NET and ASP.NET runtimes. "
"Use 'linux' explicitly for .NET Linux deployments. "
"Use 'az webapp list-runtimes' to see available runtimes.")
c.argument('runtime', options_list=['--runtime', '-r'], help="canonicalized web runtime in the format of Framework:Version, e.g. \"PHP:7.2\". "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PHP:7.2 has reached end of life, we should take this opportunity to move to Python, PYTHON:314 (latest)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed

…2 to PYTHON:3.14, add list-runtimes to create help

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad act-platform-engineering-squad Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation Web Apps az webapp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants