Azure Web App deployment targets allow you to reference existing Web Apps in your Azure subscription, that you can then reference by role during deployments.
This new target type was introduced in
2018.5, so you'll need to be running at least that version of the Octopus Server. You can read more about all the new PaaS targets in our blog.
You will firstly need an Azure Service Principal account that references your Azure subscription.
Once your Azure account is setup, you will then need an existing Azure Web App / App Service setup within your Azure subscription. To learn more about App Services, the Azure team provide useful documentation on App Services that can help you get started. If you are dynamically creating the web app during your deployment, check our section about creating Web App targets by scripts using service messages.
Creating Web App targets
Once you have an App Service setup within your Azure subscription, you are then ready to map that to an Octopus deployment target.
To create an Azure Web App target within Octopus:
- Go to
Add Deployment Target
Azure Web Appfrom the list of available targets and click Next
- Fill out the necessary fields, being sure to provide a unique role that clearly identifies your Azure Web App target
- After clicking Save, your deployment target will be added and go through a health check to ensure Octopus can connect to it.
- If all goes well, you should see your newly created target in your
Deployment Targetslist, with a status of Healthy
Creating Web App Targets by scripts
Azure Web App targets can also be created via a Powershell Cmdlet within a Deployment Process, this can be especially handy if you are also creating the Azure Web App via a script.
See Managing Resources by script for more information on creating Azure Web Apps via a script.
Deploying to Web App targets
See our documentation about this topic
If your Azure Web App target is not completing a health check successfully, you may need to check that your Octopus Server can communicate with Azure. It may be worth checking that your Azure Account is able to complete a Save and Test to ensure Octopus can communicate with Azure. If your Octopus Server is behind a proxy or firewall, you will need to consult with your Systems Administrator to ensure it is able to communicate with Azure.