0
votes

I have a single Azure Cloud Service as a project in Visual Studio 2015, which contains 2 Python Worker Roles.

They each have their own folder with source code files, and they are deployed to separate VMs. However, they both rely on some identical pieces of code. Right now my solution is to just include a copy of the code in each worker role, but then I have to remember to apply changes to both worker roles in case of a bug fix.

I have tried making a folder on the project level, containing the shared files, but when I add them to the worker role, VS just copies the files.

Is there a way to implement something like a shared folder, which only copies the files upon building the project?

1

1 Answers

0
votes

Likely many ways to solve your problem, but specifically from a worker role standpoint: Worker (and web) roles have definable startup tasks, allowing you to execute code/script during role startup. This allows you to do things like copying content from blob storage to local disk on your role instance. In this scenario, the blob where your code is stored acts like a shared disk.