-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ContainerApp] Add CLI for DotNet Components #7564
[ContainerApp] Add CLI for DotNet Components #7564
Conversation
src/containerapp/azext_containerapp/dotnet_component_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/dotnet_component_decorator.py
Outdated
Show resolved
Hide resolved
Co-authored-by: xinyu pang <[email protected]>
…om/snehapar9/azure-cli-extensions into snehapar/Add-dotnet-components-CLI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls do as required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for supporting.
src/containerapp/azext_containerapp/tests/latest/test_containerapp_dotnet_component.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/dotnet_component_decorator.py
Outdated
Show resolved
Hide resolved
|
||
helps['containerapp sessionpool create'] = """ | ||
type: command | ||
short-summary: Create or update a Session pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In CLI, create command is only used for create operation
short-summary: Create or update a Session pool. | |
short-summary: Create a Session pool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check the similar messages as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yanzhudd
This command support update too.
# SessionPool Commands | ||
helps['containerapp sessionpool'] = """ | ||
type: group | ||
short-summary: Commands to manage session pools. | ||
""" | ||
|
||
helps['containerapp sessionpool create'] = """ | ||
type: command | ||
short-summary: Create or update a Session pool. | ||
examples: | ||
- name: Create or update a Session Pool with container type PythonLTS default settings. | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--location eastasia | ||
- name: Create or update a Session Pool with container type PythonLTS, with max concurrent sessions is 30, ready session instances 20. | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--container-type PythonLTS --max-sessions 30 --ready-sessions 20 \\ | ||
--location eastasia | ||
- name: Create or update a Session Pool with container type CustomContainer with default quickstart image. | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--container-type CustomContainer --environment MyEnvironment \\ | ||
--cpu 0.5 --memory 1Gi --target-port 80 --location eastasia --image mcr.microsoft.com/k8se/quickstart:latest | ||
- name: Create or update a Session Pool with container type CustomContainer that has secrets and environment variables. | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--container-type CustomContainer --environment MyEnvironment \\ | ||
--cpu 0.5 --memory 1Gi --target-port 80 --image MyImage \\ | ||
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret \\ | ||
--secrets mysecret=secretvalue1 anothersecret="secret value 2" --location eastasia | ||
- name: Create or update a Session Pool with container type CustomContainer that from private registry | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--container-type CustomContainer --environment MyEnvironment --image MyImage \\ | ||
--cpu 0.5 --memory 1Gi --target-port 80 --registry-server myregistry.azurecr.io \\ | ||
--registry-username myregistry --registry-password $REGISTRY_PASSWORD \\ | ||
--location eastasia | ||
- name: Create or update a Session Pool with container type CustomContainer with cooldown period 360s | ||
text: | | ||
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \\ | ||
--environment MyEnvironment --cpu 0.5 --memory 1Gi --target-port 80 --container-type CustomContainer \\ | ||
--cooldown-period 360 --location eastasia | ||
""" | ||
|
||
helps['containerapp sessionpool update'] = """ | ||
type: command | ||
short-summary: Update a Session pool. | ||
examples: | ||
- name: Update a session pool's max concurrent sessions configuration and image. | ||
text: | | ||
az containerapp sessionpool update -n mysessionpool -g MyResourceGroup --max-sessions 20 --image MyNewImage | ||
""" | ||
|
||
helps['containerapp sessionpool delete'] = """ | ||
type: command | ||
short-summary: Delete a session pool. | ||
examples: | ||
- name: Delete a session pool. | ||
text: az containerapp sessionpool delete -n mysessionpool -g MyResourceGroup | ||
""" | ||
|
||
helps['containerapp sessionpool show'] = """ | ||
type: command | ||
short-summary: Show details of a Session Pool. | ||
examples: | ||
- name: Show the details of a Session Pool. | ||
text: | | ||
az containerapp sessionpool show -n mysessionpool -g MyResourceGroup | ||
""" | ||
|
||
helps['containerapp sessionpool list'] = """ | ||
type: command | ||
short-summary: List Session Pools by subscription or resource group. | ||
examples: | ||
- name: List Session Pools in the current subscription. | ||
text: | | ||
az containerapp sessionpool list | ||
- name: List Session Pools by resource group. | ||
text: | | ||
az containerapp sessionpool list -g MyResourceGroup | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snehapar9
This is not related to your change. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need support
This checklist is used to make sure that common guidelines for a pull request are followed.
This PR adds CLI support for dotnet components. Please see video attached for the full CLI experience
https://microsoft-my.sharepoint.com/:v:/p/snehapar/ERx7M-kEDxZBnUFqMahq0FYBD8ApQYYSQa054aQsyIeR6w?e=gWsyrc
Related command
PR Description - This adds CLI support for to create/show/list/delete DotNet components.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.