Is there any more formal docs on octopus 3.1.* and using slots? I couldn’t find any. (When will you be adding slot support for web apps like you have for cloud services?)
For the time being, it looks like I need to use the commandlet, which is fine, but i’d love a little help.
Thanks for reaching out. I’ve discussed this with the Team and we decided to create a github issue to investigate how we can add a more robust support for azure web app slots. You can follow its progress over here: https://github.com/OctopusDeploy/Issues/issues/2094
At the current moment, the recommended approach is to use Switch-AzureWebsiteSlot in a separate step scoped to the environment that represents the target slot.
If you don’t want to have a a dedicated server to run the Powershell script, you can turn the Octopus server itself into a Tentacle, assign it some role like scriptrunner and run the Powershell script from it.
I currently do have the Octopus Server as a Tentacle.
Do i have to do anything to configure the commandlet so it has access all my Azure credentials? Or do you pre load Subscription Info to all Power Shell scripts?
Perhaps a quick example usage / script?
Basically the only way to use Azure Webapps without down time during deploys is to use slots. All recommendations and best practices welcome.
You should actually use the Azure Powershell Script step introduced in 3.0 for this. It will manage the subscription for you (using one of the subscriptions previously mapped to your Octopus instance). All scripts ran using this step will be executed from the Octopus Server box.
Sorry I did not mention this alternative before. This was actually the most accurate way to do what you want to do (until we officially add support for slots)
The cmdlet should be available from an Azure Powershell Script step. If you run the below Powershell script on an Azure Powershell Script step, what do you see in the Output?
if (Get-Command -Module Azure -Name Switch-AzureWebsiteSlot){
"The cmdlet [Switch-AzureWebsiteSlot] is available and ready to be used"
}
else{
"Couldnt find the command"
}