How do I place the Azure work agent role locally / indoors?

A bit of background ....

This is the first time weโ€™re joining Azure and trying to do it in baby steps At the moment, our first applications will be work queues for monitoring processes for processing requests (for example, sending e-mail or performing some screen captures), and we will simply add to the queues from our local MVC applications and WCF services. Later we will port the MVC and WCF application to Azure.

Our development workflow essentially goes as follows (slightly changed no matter):

  • Development locally and on some shared servers. Check source control.
  • Every 15 minutes, the build server builds and deploys in the development environment (doubles as CI and spans in case we need to get into the development environment other than the local one).
  • Technical testers manually start the build server to deploy the last successful Dev build in the test environment (or, alternatively, the previously built test build, including / excluding the database).
  • Technical testers and business testers manually run the build server to deploy the last successful build of the Test (or, alternatively, a previously built test build, including / excluding the database) into the QA environment.
  • At some point, we will merge the QA-approved change set for deployment.
  • Later, our build assembly server deploys this version for intermediate assembly, and then later in our production environments (we place it N times in parallel / independent environments).

As you can tell, we have a number of internal versions of our application for people with internal support who suffered before performance. I would like them to have a fairly low level of dependence on Lazur. I donโ€™t need to end the term dependency, so we will continue to use Azure Queues and maybe some other mechanisms just because they are easy to continue using, but we donโ€™t want our build server to be deployed to Azure for each of these environments ( and alternatively pay for everything that is hosting).

So, how can we intelligently place our work roles in place as we actually test the code that is deployed to Azure?

One of the proposed options is that we create a working role as a wrapper / facade and do all the real work inside the class library, which was our plan. However, the subsequent actions that would allow us to โ€œplaceโ€ this were to create a second shell / facade application that does the same work as the working role, just so that we can run it as a scheduled task or windows server . In the end, I don't like this option because the whole project is never tested until it reaches the stage.

Is it possible to do something like this when we create a second wrapper / facade application that, instead of calling the class library that it actually references, calls the Run() function in the working role?

+6
source share
2 answers

Do you think Azure emulator can help you? These are the differences between a true Azure provider and an emulator.

Having a facade for your work role seems reasonable. And use adapters to adapt any possible cloud technology (or other hosting) to this facade? Just trying to give up some ideas. I actually used this approach before, but was a "personal" project.

Use PowerShell to customize your roles and more. Configure your Azure emulator like this .

+5
source

To be honest, the facade approach is the best.

When you have deployments that ultimately depend on the supporting infrastructure, it is extremely difficult to fully test until you deploy to an identical or comparable infrastructure. This is certainly the case with the Azure Worker role.

Separating the functional aspects of your application from the touch points of the infrastructure, you can spend your efforts on making your code act as it should, prove that the facade behaves as it should, and then confidently check the final combination.

There is always some element of compromise in this regard if your test environments do not match your production environments.

And this is what Azure deployment is for; this is the last level of trust before switching to production.

You can create a very small deployment, purely for the next stages of testing. You pay for the deployment time of the role, so if you remove the deployment after testing is complete, you can minimize the cost.

Lastly, the facade template is an example, a design for validation. Factor of your code to maximize the amount that you can test before deployment, and minimize the risk in subsequent stages of testing.

+2
source

Source: https://habr.com/ru/post/895349/


All Articles