Skip to content

Conversation

@khkh-ms
Copy link
Contributor

@khkh-ms khkh-ms commented Nov 1, 2023

Related command

  • az functionapp create
  • az functionapp config container set

Description
The Consumption + Dedicated plan structure consists of a serverless plan that allows customer’s applications to scale in and out on demand. Applications can scale to zero, and you only pay for running apps.

Fully managed plan that customers can optionally use that provides dedicated, customized hardware to run apps on. Customers can select from general purpose and memory optimized workflow profiles that provide larger amounts of CPU and memory. You pay per node, versus per app, and workload profile can scale in and out as demand changes.

Testing Guide

Get environment names

az containerapp env show --name "<ENVIRONMENT_NAME>" --resource-group "<RESOURCE_GROUP>"

Create a function app (note: --memory, --cpu and ---workload-profile-name are new flags)

az functionapp create -g <resource-group> -n <function-app-name> -s <storage-account-name> --environment <container-apps-environment-name> --runtime dotnet-isolated --functions-version 4 --memory 4.0gi --cpu 2.0 --workload-profile-name <work-load-profile-name>

Then update the function app

az functionapp config container set --workload-profile-name <workload-profile-name> --memory 4.0gi --cpu 2.0


This checklist is used to make sure that common guidelines for a pull request are followed.

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

azure-client-tools-bot-prd bot commented Nov 1, 2023

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

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

Hi @khkh-ms,
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

Hi @khkh-ms,
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

azure-client-tools-bot-prd bot commented Nov 1, 2023

⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd functionapp config container set cmd functionapp config container set added parameter cpu
⚠️ 1006 - ParaAdd functionapp config container set cmd functionapp config container set added parameter memory
⚠️ 1006 - ParaAdd functionapp config container set cmd functionapp config container set added parameter workload_profile_name
⚠️ 1006 - ParaAdd functionapp create cmd functionapp create added parameter cpu
⚠️ 1006 - ParaAdd functionapp create cmd functionapp create added parameter memory
⚠️ 1006 - ParaAdd functionapp create cmd functionapp create added parameter workload_profile_name

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 1, 2023

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

@yanzhudd
Copy link
Contributor

please resolve CI issues and conflicts

# Conflicts:
#	src/azure-cli/azure/cli/command_modules/appservice/_params.py
#	src/azure-cli/azure/cli/command_modules/appservice/custom.py
Comment on lines 1786 to 1788
_validate_cpu_momory_functionapp(cpu, memory)
update_resource_config(cmd, resource_group_name, name, cpu=cpu, memory=memory,
workload_profile_name=workload_profile_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a check here to make sure that the updates are only made if workload_profile_name, cpu or memory are updated?

raise CLIError(ex)


def update_resource_config(cmd, resource_group_name, name, workload_profile_name=None, cpu=None, memory=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, might be a good idea to rename this function since it is not clear just from the name what exactly would be updated. I would update it to something like update_workload_profile_config

yanzhudd
yanzhudd previously approved these changes Dec 19, 2023
kamperiadis
kamperiadis previously approved these changes Dec 19, 2023
@kamperiadis kamperiadis dismissed stale reviews from yanzhudd and themself via 7a7f376 December 19, 2023 16:36
@wangzelin007
Copy link
Member

LGTM

@wangzelin007 wangzelin007 merged commit a9dc0fd into dev Dec 20, 2023
MaxHorstmann pushed a commit to MaxHorstmann/azure-cli that referenced this pull request Jan 19, 2024
…or Centauri apps (Azure#27736)

* workload changes

* small fix

* Added tests.

* Addressing the comments.

* Updates after changes.

* Updated messages

* test update.

* updated unit tests

* Removed the test SDK version

* One more change

* Few more changes in test.

* pylint fixes.

* Changes after merge.

* Changed regions in the tests.

* cred-tests

* typo

* addressed the comments

* Update the recording after some change.

* review changes

* Test Update and Moved once condition.

* lint

* pylint again

* Addressed the review comments

* Updated the recording.

* Changed the function name.

* Flake8 fix

* Updated the recording.

* Updated the recording.

* Update polling logic for PATCH function app

* Rerun workload profile unit test

* Consolidate dapr config and workload config updates

* Use fake value in recording

* Fetch cpu and memory only if resource config is not null

* Revert resource config null check, add GET for all centauri apps created, update indexing

---------

Co-authored-by: Kirstyn Joy Amperiadis <[email protected]>
@wangzelin007 wangzelin007 deleted the khkh/workload-profiles branch November 18, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot ContainerApp Functions az functionapp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants