Share via


az spring-cloud app deployment

Note

This reference is part of the spring-cloud extension for the Azure CLI (version 2.45.0 or higher). The extension will automatically install the first time you run an az spring-cloud app deployment command. Learn more about extensions.

This command group is implicitly deprecated because command group 'spring-cloud app' is deprecated and will be removed in a future release. Use 'spring app' instead.

Commands to manage life cycle of deployments of an app in Azure Spring Cloud. More operations on deployments can be done on app level with parameter --deployment. e.g. az spring-cloud app deploy --deployment .

Commands

Name Description Type Status
az spring-cloud app deployment create

Create a staging deployment for the app. To deploy code or update setting to an existing deployment, use az spring-cloud app deploy/update --deployment <staging deployment>.

Extension Deprecated
az spring-cloud app deployment delete

Delete a deployment of the app.

Extension Deprecated
az spring-cloud app deployment generate-heap-dump

Generate a heap dump of your target app instance to given file path.

Extension Deprecated
az spring-cloud app deployment generate-thread-dump

Generate a thread dump of your target app instance to given file path.

Extension Deprecated
az spring-cloud app deployment list

List all deployments in an app.

Extension Deprecated
az spring-cloud app deployment show

Show details of a deployment.

Extension Deprecated
az spring-cloud app deployment start-jfr

Start a JFR on your target app instance to given file path.

Extension Deprecated

az spring-cloud app deployment create

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Create a staging deployment for the app. To deploy code or update setting to an existing deployment, use az spring-cloud app deploy/update --deployment <staging deployment>.

az spring-cloud app deployment create --app
                                      --name
                                      --resource-group
                                      --service
                                      [--artifact-path]
                                      [--build-env]
                                      [--builder]
                                      [--config-file-patterns]
                                      [--container-args]
                                      [--container-command]
                                      [--container-image]
                                      [--container-registry]
                                      [--cpu]
                                      [--disable-probe {false, true}]
                                      [--disable-validation {false, true}]
                                      [--env]
                                      [--instance-count]
                                      [--jvm-options]
                                      [--main-entry]
                                      [--memory]
                                      [--no-wait]
                                      [--registry-password]
                                      [--registry-username]
                                      [--runtime-version {Java_11, Java_17, Java_8, NetCore_31}]
                                      [--skip-clone-settings]
                                      [--source-path]
                                      [--target-module]
                                      [--version]

Examples

Deploy source code to a new deployment of an app. This will pack current directory, build binary with Pivotal Build Service and then deploy.

az spring-cloud app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup

Deploy a pre-built jar to an app with jvm options and environment variables.

az spring-cloud app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --jar-path app.jar --jvm-options="-XX:+UseG1GC -XX:+UseStringDeduplication" --env foo=bar

Deploy a container image on Docker Hub to an app.

az spring-cloud app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1

Deploy a container image on a private registry to an app.

az spring-cloud app deployment create -n green-deployment --app MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1 --container-registry myacr.azurecr.io --registry-username <username> --registry-password <password>

Required Parameters

--app

Name of app.

--name -n

Name of deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--artifact-path

Deploy the specified pre-built artifact (jar or netcore zip).

--build-env

Space-separated environment variables in 'key[=value]' format.

--builder
Preview

(Enterprise Tier Only) Build service builder used to build the executable.

Default value: default
--config-file-patterns
Preview

(Enterprise Tier Only) Config file patterns separated with ',' to decide which patterns of Application Configuration Service will be used. Use '""' to clear existing configurations.

--container-args

The arguments of the container image.

--container-command

The command of the container image.

--container-image

The container image tag.

--container-registry

The registry of the container image.

Default value: docker.io
--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

--disable-probe

If true, disable the liveness and readiness probe.

Accepted values: false, true
--disable-validation

If true, disable jar validation.

Accepted values: false, true
--env

Space-separated environment variables in 'key[=value]' format.

--instance-count

Number of instance.

--jvm-options

A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'.

--main-entry -m

A string containing the path to the .NET executable relative to zip root.

--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--registry-password

The password of the container registry.

--registry-username

The username of the container registry.

--runtime-version

Runtime version of used language.

Accepted values: Java_11, Java_17, Java_8, NetCore_31
--skip-clone-settings

Create staging deployment will automatically copy settings from production deployment.

Default value: False
--source-path

Deploy the specified source folder. The folder will be packed into tar, uploaded, and built using kpack. Default to the current folder if no value provided.

--target-module

Child module to be deployed, required for multiple jar packages built from source code.

--version

Deployment version, keep unchanged if not set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment delete

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Delete a deployment of the app.

az spring-cloud app deployment delete --app
                                      --name
                                      --resource-group
                                      --service
                                      [--no-wait]

Required Parameters

--app

Name of app.

--name -n

Name of deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment generate-heap-dump

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Generate a heap dump of your target app instance to given file path.

az spring-cloud app deployment generate-heap-dump --app
                                                  --app-instance
                                                  --file-path
                                                  --resource-group
                                                  --service
                                                  [--deployment]

Required Parameters

--app

Name of app.

--app-instance

Target app instance you want to dump.

--file-path

The mount file path for your dump file.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment generate-thread-dump

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Generate a thread dump of your target app instance to given file path.

az spring-cloud app deployment generate-thread-dump --app
                                                    --app-instance
                                                    --file-path
                                                    --resource-group
                                                    --service
                                                    [--deployment]

Required Parameters

--app

Name of app.

--app-instance

Target app instance you want to dump.

--file-path

The mount file path for your dump file.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment list

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

List all deployments in an app.

az spring-cloud app deployment list --app
                                    --resource-group
                                    --service

Required Parameters

--app

Name of app.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment show

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Show details of a deployment.

az spring-cloud app deployment show --app
                                    --name
                                    --resource-group
                                    --service

Required Parameters

--app

Name of app.

--name -n

Name of deployment.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az spring-cloud app deployment start-jfr

Deprecated

This command is implicitly deprecated because command group 'spring-cloud app deployment' is deprecated and will be removed in a future release. Use 'spring app deployment' instead.

Start a JFR on your target app instance to given file path.

az spring-cloud app deployment start-jfr --app
                                         --app-instance
                                         --file-path
                                         --resource-group
                                         --service
                                         [--deployment]
                                         [--duration]

Required Parameters

--app

Name of app.

--app-instance

Target app instance you want to dump.

--file-path

The mount file path for your dump file.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

Name of Azure Spring Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--duration

Duration of JFR.

Default value: 60s
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.