typesafehub / conductr-cli

CLI for Lightbend ConductR
Other
16 stars 21 forks source link

Support --tag, --role flags #533

Closed bayarmunkh closed 6 years ago

bayarmunkh commented 7 years ago

Hi,

with ConductR 2.1, I can tag bundles. But how do I use actually those tags? For instance, I'd like to do something like conduct info --tag=mytag or conduct stop --tag=mytag.

Any way to support these cases? Command like them are very helpful when there are 20+ bundles running. I can do conduct info | grep mytag but that is unnatural.

Same for role. conduct info --role=web would be helpful too.

Thanks

Conduct version is 1.2.19.

huntc commented 7 years ago

Tags can be specified via <bundle-id>:<tag>.

bayarmunkh commented 7 years ago

yea, i saw that in the docs, but wasn't able to use it. maybe i'm missing something. See the logs below.

chkad@Chkas-MacBook-Pro ~ $ conduct info
UNLICENSED - please use "conduct load-license" to use more agents. Additional agents are freely available for registered users.
Licensed To: unknown
Max ConductR agents: 1
ConductR Version(s): 2.1.*
Grants: conductr, cinnamon, akka-sbr

ID       NAME                   TAG  #REP  #STR  #RUN  ROLES
870ee7d  continuous-delivery  2.1.0     1     0     1  continuous-delivery
57e432d  eslite               2.1.0     1     0     1  elasticsearch
cabaae7  visualizer           2.1.0     1     0     1  web
chkad@Chkas-MacBook-Pro ~ $ conduct info 57e432d:2.1.0
Error: Unable to find bundle 57e432d:2.1.0
chkad@Chkas-MacBook-Pro ~ $ conduct info eslite:2.1.0
Error: Unable to find bundle eslite:2.1.0
chkad@Chkas-MacBook-Pro ~ $ conduct info 57e432d0c647be2bbc83fa8e59ee469b:2.1.0
Error: Unable to find bundle 57e432d0c647be2bbc83fa8e59ee469b:2.1.0
chkad@Chkas-MacBook-Pro ~ $ conduct version
1.2.19
Supported API version(s): 1, 2

Also my question was more around operating with multiple bundles using a single command.

conduct stop service-A
conduct stop service-B
conduct stop service-C

vs

// say the services are tagged with `2.1.0`
conduct stop --tag:2.1.0

is it possible to support this?

thanks

huntc commented 7 years ago

Hi Chka,

I think that conduct info <bundle> is the only one that presently omits support for tags. Most of the others should e.g. conduct stop service-A:2.1.3. However, we have no "selection" functionality presently such that you could perform batch operations. I will re-open this ticket so that we can think about that.

Kind regards, Christopher