1

I currently have a DEV server where several application are deployed. I want to automate the deployment of these applications using Azure DevOps pipelines, and thus I am now looking to the build multi-stage pipelines.

As far as I understand, we should now use the creation of environments, and not the deployment groups.

However setting up an environment in a project (specifying a VM resource) implies the execution of the PowerShell script, which will create one agent, one windows service, and one "environment" deployment group for each project. Thus if I have a single server with 10 project, this will download 10 times the agent, install 10 windows services on the same server.

I understand the interest for parallelizing the job deployment, but this seems a bit overkill to me.

Is there something am I missing ? Can we share an environemnt VM resource (and thus the underlying environment agent) for several projects ?

Thanks!

1 Answers1

1

Is there something am I missing ? Can we share an environemnt VM resource (and thus the underlying environment agent) for several projects ?

Sorry but sharing VM among different environments is not supported yet.

It seems that you have 10 team projects, here're some suggestions which may help depending on that we can't share VM among environments:

  1. Specify resource for each project, it means we have to do that 10 times as you mentioned above. Then each Team project should have their own CI/CD pipelines.(Not what you originally want)

  2. Use one multistage pipeline from one Team project to fetch repos from the ten projects and then do CI/CD job for them. In this way, we use one pipeline to build and deploy ten repos, so we only need to use Environment in current project.

    In this way, we only need to specify the VM resource for current project once. We can use ten stages or ten jobs for deployment of the ten projects. But this will make the yaml file complex and hard to maintain. Any error in any job or stage could fail the whole pipeline, also it's not a good workflow. (Not recommended).

  3. You can check this blog : Sharing of Deployment Groups across projects. You can consider using classic CI/CD pipelines temporarily so that you can use the deployment groups, not the environments. And sharing a VM among different Deployment Groups is supported.

Since what you want is not supported for now, we have to use a temporary workaround. And just like the blog mentioned:

One of the big pieces of feedback we received was that this only partially addressed the scenario of customers sharing their IaaS machines (deployment targets) across multiple applications.

I agree it's a good idea to support sharing VM among environments, so I suggest you can post a feature request(Suggest a feaure) in our User Voice forum to share your feedback.

Hope all above makes help for you. Cheers!

Community
  • 1
  • 1
LoLance
  • 25,666
  • 1
  • 39
  • 73
  • 2
    Thanks for your feedback ! For those who are interested, go and vote on https://developercommunity.visualstudio.com/idea/963981/share-a-vm-resource-among-different-environment.html – Pierre-Emmanuel Dautreppe Mar 26 '20 at 07:25