-
Notifications
You must be signed in to change notification settings - Fork 301
MachineOf should support wildcards #494
Comments
What's the use-case here? MachineOf is only intended to match a single unit, while a wildcard implies multiple matches. |
We have a usecase where I think wildcards would help. We have a container, let's call it 'bedrock', that provides shared services (Splunk logging, statsd monitoring) and want to run one copy per host. We can use
Wildcards would allow us to define unit that depend on I can see wanting wildcards in both the
|
@graemej I've been thinking of the wildcard as a bash expansion. For example, you would effectively have |
I was thinking 'any-of' vs. 'all-of' semantics on the match. e.g. have a dependent unit scheduled anywhere that |
I am looking into this as well to distribute units that take care of shared utilitites(just like in your case, log-forwarding, monitoring etc). Would it not be possible to use a metadata tag for this ? Tagging all the machines which should get the utility containers with some tag, say and then having [X-Fleet] Would that not map the unit to all the machines which have that tag ? |
After reading the docs further, it seems a unit will only ever be assigned to a single machine. I guess I could automatically start the utility containers on all machines via the cloud-config for those machines as shown here: http://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/ |
@oddurmagg We've been considering supporting a static schedule of units that a fleet Agent must start and track during initialization. It's effectively the same as the
|
We considered the cloud-config path too (we're PXE-booting bare metal) but fleet seemed cleaner. The sticking point is that we want units that depend on a Although CoreOS is fast to boot it felt like rolling out service containers via fleet would be smoother if an upgrade was needed. |
@bcwaldon I think having a way to say, "schedule this unit on all machines which have this metadata tag" would solve this. My concern is if I would configure, say aws autoscaling, to introduce new machines with a webapp on it, I would have to make sure there was a unit waiting to be scheduled on it. The autoscaling would then have to submit that unit start it so it would get scheduled on the newly introduced host. I´d rather that machine would spin up, fleet would startup on it and from it´s metadata it would figure out what should be running on it. It might not jive with fleet models, which might be assuming that each unit only runs on a single machine. |
So I think there are a few reasonable approaches here:
|
|
I'd also really like this. I'm using the ambassador pattern described here and have a unit that needs to be able to communicate with one service, so I'd like to run it on a box with |
How about adding |
@oddurmagg , I think the use cases you've described in this ticket should now be adequately covered by #681 and #811 - please follow along there. |
I think I have a valid use case for this: I'm using an Elasticsearch cluster running on some hosts in a small CoreOS cluster to store data collected with Logstash. Logstash creates a new index every day. To do some housekeeping (optimize any index older than a day since it will be read from only and delete any index older than 30 days) I rely on elasticsearch curator. For this curator instance it doesn't matter where it runs, as long as it runs on a host where Elasticsearch itself is running since it will be available at Reading the above discussion about any of vs all of I think both points are valid. A solution might be to have |
I've got a similar issue. I have one service that is shared between multiple clients. Ideally I want to be able to launch any number of these shared instances and have fleet run them where it decides to, and then have a number of clients connecting to the local instance. e.g. Some questions people may have. Why can't I just have one shared service? I'm running on restricted resource machines and only have 2 CPUs per machine and want to be able to shard the shared service. |
I have this
The reason I need the wildcard is that I need What currently happens is that |
I have a similar scenario like @graemej and @digital-wonderland where I'm running multiple instances of one container and want a second container to be scheduled on any machine that runs the first container. The first container is Currently I'm required to set e.g. |
Apologies for the duplicate feature request, but I've outlined my use-case in #1298. I currently work around this feature by defining identical unit-files with a different name since I see no way to solve it any other way. |
+1 for this feature |
1 similar comment
+1 for this feature |
No description provided.
The text was updated successfully, but these errors were encountered: