I'm currently having a PHP application running in an Azure VM, now I have moved that setup to a VMSS and Load Balancer and having a VM as staging. But now, when the developer make a change each time, They will do that to the staging VM and I will take a snapshot of the image and update the VMSS image with the new version of the image. This is really a bad process. So I thought to have Azure DevOps in place to take care of the deployment. But I couldn't figure out how we can deploy to VMSS instances. I have seen the Microsoft Documentation, but didn't help much.
My idea towards it is deploying the application to the staging VM and take the image and update the VMSS all in CD pipeline process with CLI scripts.
I need some one to check whether my idea is correct or is there any better solution. If you need any further details or clarification to help me, please let me know.
The exact answer depends on Linux or Windows.
Images can be useful. If your PHP app has a bunch of dependencies that have to be installed/configued and rarely change then baking this into an image can speed things up. However for the application itself it likely makes more sense to install the app after deploying the image. If your app rarely changes maybe it makes sense to then update the image to make your scaling faster.
Check out:
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-deploy-app