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

[ContainerApp] Add CLI for DotNet Components #7564

Merged
merged 75 commits into from
May 14, 2024

Conversation

snehapar9
Copy link
Contributor

@snehapar9 snehapar9 commented Apr 29, 2024

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

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.

snehapar9 and others added 30 commits November 3, 2023 14:42
Copy link

@Moazzem-Hossain-pixel Moazzem-Hossain-pixel left a 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

Copy link

@Moazzem-Hossain-pixel Moazzem-Hossain-pixel left a comment

Choose a reason for hiding this comment

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

Thanks

Copy link

@MoazzemHossain-bot MoazzemHossain-bot left a comment

Choose a reason for hiding this comment

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

Thanks for supporting.


helps['containerapp sessionpool create'] = """
type: command
short-summary: Create or update a Session pool.
Copy link
Contributor

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

Suggested change
short-summary: Create or update a Session pool.
short-summary: Create a Session pool.

Copy link
Contributor

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.

Copy link
Contributor

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.

Comment on lines 1687 to 1768
# 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
"""
Copy link
Contributor

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

@yanzhudd yanzhudd merged commit 35f6acc into Azure:main May 14, 2024
14 of 15 checks passed
Copy link

@Moazzem-Hossain-pixel Moazzem-Hossain-pixel left a comment

Choose a reason for hiding this comment

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

Need support

Copy link

@Moazzem-Hossain-pixel Moazzem-Hossain-pixel left a comment

Choose a reason for hiding this comment

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

Need support

harryli0108 pushed a commit to harryli0108/azure-cli-extensions that referenced this pull request May 15, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants