-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Container Linking & Services #405
Comments
Hi @ChetanBhasin, thanks for this feature request. It seems like it would be a useful feature, though it would be quite a departure from the way Toast works today. We'd have to think through what it would look like and what the implications would be (if any). For now, I'll leave this issue open for further discussion. |
Here is an idea for how it might work:
This would likely be a large change, so if anyone is interested in taking this on, please discuss it with me first. I might not have the bandwidth to review such a change. @ChetanBhasin For now, I think running multiple Toast jobs in parallel should "just work", as they would run on Docker's default bridge network and should be able to talk to each other (even without declaring any ports in the toastfile). |
@stepchowfun I like your suggestion. There are also some interesting considerations to keep in mind when running tasks in parallel. What if the parallel running tasks are interactive? And do we output the logs from all of them in the console? That could be quite annoying, IMO. Anyway, I'm happy to brainstorm a solution and try implementing it. |
Those are great points. Right now Toast does not really support interactive tasks, because it does not attach stdin (except for the For output, Toast currently reuses its own stdout/stderr for the container. But we'd probably want to change that to do some kind of streaming, prefixing each chunk with some kind of line/header indicating which task it's from (I think I recall Docker Compose doing something like this, but I haven't used it in a while). I am worried this could get quite complex unless we are careful. For example, maybe users would want to see only the output from one of their containers, and have everything else be logged to files. Or maybe users would want to customize how the network is configured. Etc... FWIW, as a workaround for not having parallel tasks, I sometimes just run multiple processes in parallel within a single task. It's not ideal, but it works well enough for my simple use cases. |
Description
I'm not entirely sure if it's already possible, but I couldn't find any evidence of it, but it would be great to have container linking and running services.
For example, for running tests that require a database or external cache, it's very useful to be able to have a long-running task run alongside another.
It's also useful for running integration tests where one service communicates with the other.
Alternatives considered
I've considered two alternatives:
The text was updated successfully, but these errors were encountered: