다음을 통해 공유


How to Create a Monster Build Agent in Azure for Cheap!

This post has been moved to a new site. Please update your links to this location instead:

https://hauge.cloud/2016/08/14/how-to-create-a-monster-build-agent-in-azure-for-cheap/

Comments

  • Anonymous
    August 15, 2016
    The only comment I'd have about this is how much money it's actually going to save you. You're configuring a D3 instance which costs you $0.516 per hour that it's running (plus disk storage). That means that you can run your VM for 77.5 hours per month before getting Visual Studio to host it is cheaper. If you assume 20 working days per month, that means you can run your VM for slightly less than 4 hours per day.If this is a personal / spare time project then it might make sense, but I would imagine anyone doing CI or with a team of more than 2 people will benefit from picking the hosted option. Also, if you need faster builds then this may work out in your favour (as I don't know what instance sizes VSTS runs but our on-premise builds run in about half the time as the hosted ones).
    • Anonymous
      August 15, 2016
      Great feedback, thanks Matthew! I agree, definitely make sure to do the math to see which way is cheaper/better before doing this.
  • Anonymous
    February 15, 2017
    Maybe I'm missing something, but can't a release only interact with the artifacts? In Environment 2 how are you building the solution? The only thing I can think of is: In your Build definition you are creating artifacts that contains your entire source code, and that's what you're buiilding. Am I missing something?Also it seems there is a simpler way of starting/stopping VMs now, which is nice, but it seems we still need the additional Hosted Environments to do that.
    • Anonymous
      February 15, 2017
      Hi John - good questions! Let me try to address one by one to hopefully clarify:A release interacts with artifacts, yes - but there is a new feature in VSTS to point directly at the source for an artifact. You can point directly at Git, GitHub, or Team Foundation Version Control to get the source codeWe build the solution the same way that would happen during a build pipeline. We have an artifact that points at the source code (in our case, it's stored in Git) which is downloaded to the build agent and we have steps to build the source code just like we would have during the build pipeline.You do need the hosted environment for being able to start and stop the build agent, since it's using Powershell and we need to run that powershell somewhere. The good news is that you can use the free hosted agent and the environment runs very very quickly so we don't end up using many build agent minutes at all.I'm happy to discuss more - or if you want an in-person discussion just reach out to my email and we can setup some time, p e t e r (dot) h a u g e (dot) m i c r o s o f t (dot) c o m . Thanks!
  • Anonymous
    February 15, 2018
    Hi Peter,does it mean that although I have already build definition I have to reproduce build steps again in release environment definition under phase?
    • Anonymous
      February 19, 2018
      Hi Vladi - no, you can do the same thing in Build as well! Just create other agent phases for Starting & Stopping the build agent. More info here: https://docs.microsoft.com/en-us/vsts/build-release/concepts/process/phases . Using agent phases in Build (as of Feb 2018) is in preview, you can enable preview features by mousing over your picture in the upper right and clicking 'preview features'.