Azure Cloud Service Deployment - Pre and Post Deployment scripts

Hello,

I have an Octopus Deploy project that uses the Deploy to Azure Cloud Service deployment step. I have a situation where I need to run a powershell script pre and post deployment (on the azure VM).

Pre: Execute Copy-Item cmdlet to backup files in a folder
Post: Execute same cmdlet to restore files.

From my trials it seems the “Custom Deployment scripts” feature executes on the tentacle server, is there anyway to execute these scripts within the azure vm? There is no tentacle installed on the azure vm, so this may seem like a question for the azure cloud service community. But asking here as well for a possible creative solution using Octopus Deploy.

Azure Cloud Service service configuration seems to support a startup script (which will work as my post deployment script) but there doesn’t seem to be an option for pre deployment.

Thanks!

Hi Gordon,

Thanks for reaching out!

Q - There is no tentacle installed on the azure vm, so this may seem like a question for the azure cloud service community. But asking here as well for a possible creative solution using Octopus Deploy.

You are correct here. There’s no way from Octopus to run scripts on the VM hosting the Azure Cloud Service, unless you install a Tentacle on it. You’ll probably have better luck asking to the Azure cloud service community.

If you find there’s a way to achieve this, please let us know. We are interested in knowing about that workaround.

Best regards,
Dalmiro