vyadh / teamcity-deployment-dashboard

A TeamCity dashboard to help summarise what app version has been released to what environment.
Apache License 2.0
25 stars 6 forks source link

Multi environments per one deploy #13

Closed nekhozhin closed 5 years ago

nekhozhin commented 5 years ago

Hey! We have only one deployment with one parameter which include multi select environment values e.g. %hosts% = node1,node2,node3 and etc. Dashboard works fine only if we choose only one value. In dashboard we set Environment Property hosts and Environments: all values comma separated with Multi-Environment Build Configurations enabled. Any chance you can add this feature?

Thanks!

vyadh commented 5 years ago

This sounds similar to the 'Multi-Environment Build Configurations' feature added a couple of weeks ago. See #6

Activating this flag will make the plugin search a single deployment configuration for 'builds' specified by the environments in the configuration.

Does that fit what you want to do?

nekhozhin commented 5 years ago

But works other way. At one time we are deploying with multi environments image We are not running the same build multi times with different values, we are triggering build once with parameter hosts = node1,node2,node3 for example when we are deploying the same release on multi hosts

vyadh commented 5 years ago

Okay, thanks. I think I see what you're trying to do. The interesting point I think is that if that deployment succeeded or failed then as far as the plugin is concerned, the three nodes will all show as deployed, or none will (as the plugin won't be able to detect any individually failing). If that's the case, that seems more like a deployment to a single environment rather than three (even if they are different). I guess my point is, if the three will always be the same version, you don't gain much having that in three columns in the dashboard rather than one (same project, version, time and status).

Personally, if there are a fixed number of nodes, I'd split this up into different deployment stages, either linked by dependencies with one triggering the other, or them all being triggered concurrently. This way if one fails you'll get visibility into what release is on what node.

Otherwise I'd treat it as a single environment. We have load balanced servers in one environment and do just this - we just show it as a single deployment.

nekhozhin commented 5 years ago

Thanks for reply! In our case sometimes we are deploying on nodes different releases, e.g. for some hardware/software a/b testing with control group, e.g. node1 - group A, node2 - control group, node3 - master, node4 - group B, node5 - some pre beta. Before we was using like you now. And this nodes it's instance groups with LB. We created in teamcity deployments with parameter hosts in which you can choose with multiselect hosts to deploy to. Ok we will try to fetch and create this feature. Thanks!

vyadh commented 5 years ago

Ah, so you use different versions in the same deployment too? In that case I can see why you'd want such a feature. However, if the plugin supported multiple environments somehow, I'm not sure how to read the versions. How would it know what version is on what node?

The trouble is the plugin has a fairly central assumption that each build/deployment is a single project, environment and version. That makes things nice and simple, and to be honest, I'd rather not complicate the code unless I thought it was a common use case. Of course, you're welcome to fork the project to implement something like that. :)

I'd be interested to know how you would support multiple versions in your scenario. It may be I'm still not quite understanding well enough about how your deployments work.

vyadh commented 5 years ago

If you have a way of supporting this functionality and not complicate the code too much, I'd be interested to see it. For now, I'll close this issue, but feel free to carry on the conversation.