Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am a bit confused about deployment of cloud services, and particular whether just code can be replaced

Just getting used to VS2012 publishing of Cloud Services. At present I have a one instance webrole which contains a MVC3 application. I can publish it to Azure without issue, and it creates the Cloud Service>Web Role>VMs. Fine. Takes a little while.

However when I do a little code change how can I migrate just this code change without replacing all the VMs that implement the WebRole etc.

It seems that Code and infrastructure are inseparable, or have I misunderstood. Is there a way to just update the code bit?

Thanks.

like image 579
SamJolly Avatar asked Jan 10 '23 22:01

SamJolly


1 Answers

When you roll out an update, you upload an entire package containing not only your code files, but also the configuration for the VM, such as # of instances, ports to open on the firewall, local resources to allocate, etc. These configuration settings are part of the code package - so there is more going on than just updating code files.

However, there are a couple of methods you can use to have more granular control over updates.

  1. Use Web Deploy. One thing to keep in mind, is that any automatic service updates will restore your website to the last fully-deployed package, which may not be as up-to-date. You would only want to use this in staging, then do a full package update for production rollout.
  2. Use an Azure Web Site instead, which allows continuous integration with your source control provider, and direct updates to the code.
  3. Use an Iaas VM instead. These are basically the same as running your own custom server in the Azure cloud, and you have full control over the OS. However, you also have full responsibility for keeping the OS updated and secure.
  4. You can also enable RDP to your Azure Web Role VM's. You will find all your code files there and IIS, but I wouldn't recommend updating your code this way for the same reasons listed in #1.
like image 77
mellamokb Avatar answered May 10 '23 23:05

mellamokb