TFS Edition: Copy setup.exe to multiple Azure VMs at once

I have multiple runs of Azure VM (Classic) and want to copy the setup.exe file as a result of the TFS build process for these VMs. Since the installation is about 800 MB in size, I don't want to copy it x times for each virtual machine. What's the best practice to copy it only once and then distribute it to all VMs?

+3


source to share


2 answers


We usually use the Azure File Copy task which uses AzCopy to handle the copy situation.

When the target is an Azure VM, the files are first copied to the automatically generated Azure blob container and then uploaded to the VMs. The container is removed after the files have been successfully copied to the virtual machines.



Even if it doesn't copy the same file from build agent to VMs multiple times. And loading inside azure can be. 800 MB is still a large file size. It will take a lot of time.

File storage is a good solution, however first you need to manually map the drive to the file storage for all virtual machines. AzCopy doesn't support file storage. You have to use powershell script in your TFS release definition to handle this.

+2


source


Since you are using an Azure VM, you can set up file storage and then the virtual machines map the disk to the file storage. This way you can upload the file to one place, but all your virtual machines will have access to it.
https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-files



+2


source







All Articles