Some CI workflows requires to use multiple instances of a same service, like migration scripts.
My desired use case is to run same version of a service but multiple times, to emulate a cluster of machines on which my application depends on.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
It would be nice to allow to launch interdependent services too. I was trying to launch the elements of the confluent platform for my integration tests (zookeeper, kafka & schema-registry), but as they are not linked with each other, the kafka and schema-registry weren't able to connect the zookeeper instance upon their start, so they kept failing.
+1 this is a very important use case for me as well, as I have a suite of integration tests that require multiple databases. While it would be possible to have those running on the same Postgres instance, it would be much more convenient to just have several instances of the same Postgres image with different names.
This would also be very useful for a problem I ran into.
I am using an image called boostport/vault. This results in the hostname boostport__vault. The vault service needs to know its own hostname when issuing certificates to generate CRL urls. However, because the hostname is boostport__vault, it complains that boostport__vault is not a valid domain.
Being able to set the name would be immensely useful, as I can just set the hostname to vault in this case.
I ran into another use case where this would be very useful. My configuration sets up several services pulled from a private docker repository with a URL like my.repository.com:5000, e.g.:
This results in both services named my.repository.com as per services documentation.
Without being able to give a custom alias to individual services, I am unable to connect to those both of these services at the same time (not to mention that the resulting name is not meaningful at all).
I think that what @smirnowld and @daniel.kez describe in 2 previous comments makes this not only a feature proposal, but a bug. Please increase priority of this!
@grzegorz-dubicki Problem described by @smirnowld and @daniel.kez should be resolved since November 2016 (see: !376 (merged)). So if you have two different images on the same registry on non standard port, then Runner should created different aliases for both of them.
As for the initial proposal, to make multiple services from the same image accessible - it should be released with 9.3. The first part is a change in GitLab CE/EE (see: gitlab-ce!8578). Change in Runner that will consume this new API data is on the way