Creating an azure virtual machine on my local machine

Is it possible to create one or more azure virtual machines on my local machine? I want to create a web application and download it locally, without having to put it in the cloud. I am thinking of the following scenario: I have a local virtual machine that is running an IIS server with my web application; I am using the tool to generate a large load; I need to deploy a second virtual machine containing the same things as the first virtual machine. The web application downtime should be 0 (hopefully).

(): : - (CPU, Memory) . , VM (, CPU 80%), ( , -, ), .

+3




2


Azure .

  • Virtual machines are just regular virtual machines. You can create them locally and download them, but it's up to you, including how to handle updates. If that's what you need to do, I don't know how you would handle updates without downtime; although you can add multiple VMs to the load balancer and then update them one at a time.
  • It sounds like you really want to learn Cloud Services. You can run one or more virtual machines locally in the emulator, upgrade without downtime once in the cloud, implement auto-scaling (you have to use a tool or write code).
  • Alternatively, you can look at Azure Websites, but this is a completely different concept and you cannot test load and load balancing locally in the same way.

Based on your claim that you really want to autoscale your application, you want to look at autoscaling cloud services. However, you cannot fully test this in a cloud emulator, but you can test your logic.

Background

Azure Cloud Services is designed for this kind of thing; You don't really work with virtual machines the way you are used to, instead you create a package that Azure then deploys to as many servers as you like. Once launched, you can manually enter the management console and increase or decrease the number of active servers by simply moving the slider. Of course, you want to do this automatically, so you have several options.

There is a management API that you can use to change the number of servers. So it would be pretty simple to write some code that you deploy on a different thread from WebRole.Start and that just sits and monitors the CPU on the machine and then calls the management API to deploy a new server instance if your CPU goes to a specific problem. Okay, locally you can only check that the control API call is made, you won't actually see the new server. But, if you take the Azure free trial and just give it a try, you'll see that you really don't need to check this part - it just works.



In practice, however, there is much more for automatic scaling. Here are some of the things you need to consider:

  • Even relatively idle web servers will often burst up to 100% for a short time, so a simple hijacking is unlikely to be good enough; You need to decide how long the server needs to be over a certain trade before you start using another server instance.
  • What happens when you have multiple servers? And, on Azure, you should always have at least two servers to keep you resilient. Note that the idea behind Cloud Services is really to have many small servers, not several large servers. You pay for the core, not the number of servers.
    • Imagine you currently have three servers, and for some reason they are really busy and the other two are down. Do you want to deploy a fourth server?
    • Imagine you currently have two servers and they are both busy. Do you really want them both to start a new server so you end up with four servers?

There are several ways to solve these problems. For starters, instead of controlling the programs running locally on each server, you'd better move this monitoring outside; Azure has the ability to flush performance metrics to table storage at any time frame you choose. You can then run an external program that retrieves performance data from all of your current servers over time and then explains the total workload before deciding whether to roll out or take out additional servers. Now you can of course place this external monitoring program in a separate thread on each of your web roles to ensure your resilience to monitoring, but the key point is that the monitoring program does not control the server.on which it runs, it monitors all the servers. Of course, you still have to deal with stopping multiple instances of the monitoring program from all start and stop servers. One way to do this is to place the stop / start commands in the Azure message queue (there are several different types) and use the built-in "de-duper" which will automatically remove identical commands that are queued inside some time window (I'm more just but you get the idea).which will automatically remove identical commands that are queued inside some kind of time window (I'm more simple, but you get the idea).which will automatically remove identical commands that are queued inside some time window (I'm more simple, but you get the idea).

Actual answer

Indeed, you want to look at an auto-scaling app block that will do most of this for you. I assume this is the real answer to your question, but first I would like to give a little context. Again, I find out that you asked to test this locally, but I believe this question doesn't make sense in the context of Azure and I hope the above information helps.

+2


source


I'm sure you can't do this and it doesn't make sense. If you want load testing, you need to run it in a work-like environment, which means you need to run the application - the Azure cloud. How else do you know that the load will actually be handled in the real cloud?



+1


source







All Articles