Enable a "before or after" event to be defined in auto-scaling of Cloud Services
We domain-join the Virtual Machines associated with our Cloud Service roles. Of course, the process of joining the domain forces a reboot. And, when scaling up, this is fine. However, when scaling-down we want to automatically remove the machines AD Account from the domain. I don't see a way to execute a "before or after" event in Azure auto-scaling. The current prescription is to override the roles OnStop event. However, there is no way to tell if it is a simple reboot or an actual de-allocation.
We should be able to explicitly define & execute a separate set of code before and after a role is spun-up or spun-down.
Is this code that you’d want to define inside your role, or, code that you’d want to define in the autoscale setting?
I would be open to either...