VM scale set update a VM instance (as a master) and deploy to other instances: with their database

Pongpon Nilaphruek 51 Reputation points
2021-05-21T12:58:35.447+00:00

Hi,

I have a situation that I would like to know how to update a VM instance (as a master) and deploy to other instances.
Also, if I install DBMS on a VM (localhost) and install my app to that. It is ready to deploy to VMSS.
However, if user connect it via loadbalancer. My question is the database that has been changed in VM instance1, it will be automatically updated to VM instance 2 or not? and if I woud like to update source code in VMSS, How can I do?

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
448 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ramya Harinarthini_MSFT 5,366 Reputation points Microsoft Employee Moderator
    2021-05-21T18:37:00.14+00:00

    @Pongpon Nilaphruek Welcome to Microsoft Q&A, Thank you for posting your here!!

    I would recommend you to create the VMSS from a custom image. You could first deploy a VM (by selecting desired OS) and all required application, configurations and DBMS need to be installed on the VM then make this as a custom VM image(By running Sysprep to create generalized image). Now deploy the VMSS or scale set with the same custom image to serve your application traffic.

    Steps to follow

    1)Create and customize a VM
    2)Deprovision and generalize the VM
    3)Create a custom VM image
    4)Deploy a scale set that uses the custom VM image

    You could make it with multiple methods as below

    Tutorial: Create and use a custom image for virtual machine scale sets with Azure PowerShell

    Tutorial: Create and use a custom image for virtual machine scale sets with the Azure CLI

    Add a custom image to an Azure scale set template

    Additional Information :https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview#why-use-virtual-machine-scale-sets

    Hope this helps!
    Kindly let us know if the above helps or you need further assistance on this issue.

    -------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.