Azure Cloud Service
Command: New-OctopusAzureCloudServiceTarget
Parameter | Value |
---|---|
-name | Name for the Octopus deployment target |
-azureCloudServiceName | Name of the Azure Cloud Service |
-azureStorageAccount | Name of the Azure Storage Account |
-azureDeploymentSlot | Deployment slot. Options are staging (default), production |
-swap | Swap staging to production, or just deploy. Options are swap (default), deploy |
-instanceCount | Use the current instance count from Azure, or use the value in the configuration file. Options are current (default), configuration |
-octopusAccountIdOrName | Name or Id of the Account Resource in Octopus. Must be a Management Certificate Account |
-octopusRoles | Comma separated list of target tags to assign |
-updateIfExisting | Will update an existing Cloud Service target with the same name, create if it doesn’t exist |
-octopusDefaultWorkerPoolIdOrName | Name or Id of the Worker Pool for the deployment target to use. (Optional). Added in 2020.6.0. |
Example:
# Using default options
New-OctopusAzureCloudServiceTarget -name "My Azure Cloud Service Target" `
-azureCloudServiceName "CloudService1" `
-azureStorageAccount "MyAzureCloudStorageAccount" `
-octopusAccountIdOrName "Service Management Cert Account" `
-octopusRoles "AzureCloudService" `
-updateIfExisting
# Overriding default values
New-OctopusAzureCloudServiceTarget -name "My Azure Cloud Service Target" `
-azureCloudServiceName "CloudService1" `
-azureStorageAccount "MyAzureCloudStorageAccount" `
-azureDeploymentSlot "production" `
-swap "deploy" `
-instanceCount "configuration" `
-octopusAccountIdOrName "Service Management Cert Account" `
-octopusDefaultWorkerPoolIdOrName "Azure Worker Pool" `
-octopusRoles "AzureCloudService"
If your process creates dynamic deployment targets from a script, and then deploys to those targets in a subsequent step, make sure you add a full health check step for the role of the newly created targets after the step that creates and registers the targets.
This allows Octopus to ensure the new targets are ready for deployment by staging packages required by subsequent steps that perform the deployment.
Help us continuously improve
Please let us know if you have any feedback about this page.
Page updated on Thursday, June 27, 2024