Skip to content
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

Add support for docker-compose run #52

Open
Laski opened this issue Nov 18, 2020 · 3 comments
Open

Add support for docker-compose run #52

Laski opened this issue Nov 18, 2020 · 3 comments

Comments

@Laski
Copy link

Laski commented Nov 18, 2020

Is your feature request related to a problem? Please describe.
We have many environment initialization routines implemented inside the docker image and run with compose (e.g. docker-compose run backend load_db). In order to completely replace docker-compose with blimp, it would be nice that blimp supports that syntax and behaviour.

Describe the solution you'd like
Be able to blimp run backend load_db (with or without support for the other parameters).

Additional context

$ blimp run backend load_db
unknown command "run" for "blimp"

Did you mean this?
	up

PS: I just found this project and looks really promising. Thanks!

@kklin
Copy link
Member

kklin commented Nov 18, 2020

Hi @Laski! We don't expect to add blimp run soon unfortunately since we're not working on it full time anymore.

However, we have had some teams simulate docker-compose run with blimp exec. The basic pattern is to create a dummy version of the container for blimp to boot, and then exec into it to run commands.

E.g.

services:
  backend:
    image: backend-image
    # This makes it so the container starts, making it available for `blimp exec`, but its command just makes it wait forever.
    command: tail -f /dev/null

Then once you blimp up, you can run blimp exec backend load_db.

Hope that helps!

@Laski
Copy link
Author

Laski commented Nov 18, 2020

Thanks @kklin! Yeah, it seems the best workaround until this is implemented 😅 .
Sad to hear the project is not being worked on, it seems so promising. Which dir/files do you think I can read in order to have an idea of how to implement this myself? If I find the time I'd love to help.

@kklin
Copy link
Member

kklin commented Nov 20, 2020

You'd implement this modifying the RPC between the CLI, and the cluster component that deploys containers into the Kubernetes cluster: https://github.com/kelda/blimp/blob/master/_proto/blimp/cluster/v0/manager.proto

For example, the code for deploying pods when you run blimp up is here: https://github.com/kelda/blimp/blob/master/cluster-controller/main.go#L500

The thing I'm not sure about is what the UX would be of the containers created by blimp run. Should they get removed if you do blimp up after? If not, how would you remove them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants