Forum Discussion
wbosland
Feb 06, 2023Copper Contributor
Share VM Environment with multiple DevOps projects
Hi,
I created a VM Environment in my DevOps Project that I use in a multi-stage YAML pipeline to deploy a Web API to IIS. Is it possible to share that same VM Environment with other DevOps Projects so they can use the same agent to deploy their Web APIs?
- dalemac89Copper ContributorI've got the same use case - out of interest, what did you end up doing?
- wboslandCopper ContributorI ended up creating a VM Environment for each DevOps Project and install those as separate agents on the same server. If you want to do this as well, make sure you use a different environment name for each project.
The reason for this is when you install the agent as a Windows service using Powershell, the environment name is used in the name of the service.
So if you use the same environment name, the installation will fail because a Windows service with that name already exists.
To make sure these conflicts never occur, I used this naming convention: <project name>-<environment name>- dalemac89Copper Contributor
wbosland Thanks for the info, and for the heads up about the environment name, much appreciated.
Shame that MSFT don't allow you to set up a single environment and use it across projects. One of our servers has 20ish IIS sites on it for testing various web apps. That's gonna be a lot of agents!