jaas icon indicating copy to clipboard operation
jaas copied to clipboard

Prefixing services created by jaas

Open ddingel opened this issue 7 years ago • 5 comments

With a lot of created services it is useful to group services created by jaas.

Expected Behavior

jaas run --image hello-world

Service created: jaas_xenodochial_fermat (qvvqxyf120cbxjxoc8kdsw6fv)

Current Behavior

Currently the service name will be random. There is no way to identify which services were created by jaas.

Possible Solution

Set the name in the spec.

Steps to Reproduce (for bugs)

  1. jaas run --image hello-world
  2. docker service ls

Context

Use jaas on a docker swarm with long running services. If for some reason the jaas created services does not exit I want to identify that one.

Your Environment

  • Version used:
  • Environment name and version (e.g. Docker 1.13):
  • Server type and version:
  • Operating System and version:
  • Link to your project:

ddingel avatar Jan 16 '18 22:01 ddingel

Interesting idea. Have you also thought of applying labels? Labels can be used for filtering too.

alexellis avatar Jan 16 '18 22:01 alexellis

Yes, but I like the way of docker-compose and the docker stack deploy commands. They will prefix your service name with the project name or the current working directory.

I am also thinking about grouping, so that with docker stack ls, you could easily identify jaas as a own stack. But as they don't belong to a stack I am not sure.

ddingel avatar Jan 16 '18 23:01 ddingel

Maybe we want to add a jaas label and allow the User to set the name completely different by a command line parameter --name, what do you think?

ddingel avatar Jan 17 '18 21:01 ddingel

We can start by adding a label. com.alexellis.io.jaas = 1 for instance

alexellis avatar Jan 19 '18 21:01 alexellis

That will allow for filtering and is probably a minimum requirement as the metadata will allow us to track the orphaned objects.

alexellis avatar Jan 22 '18 15:01 alexellis