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

Start and stop command using cobra cli #108

Open
Luxxgit2k4 opened this issue Feb 15, 2025 · 6 comments
Open

Start and stop command using cobra cli #108

Luxxgit2k4 opened this issue Feb 15, 2025 · 6 comments
Labels
Milestone

Comments

@Luxxgit2k4
Copy link

Luxxgit2k4 commented Feb 15, 2025

Reason/Context

Hello @yada , @lbroudoux the current cli does not have command for starting and stopping the server. Adding commands microcks-cli start and microcks-cli stop using Cobra will be easy while interacting with the server. Already started working on it.

Description

microcks-cli start: Runs the microcks server using docker in the background.

microcks-cli stop: Stops the server

Implementation ideas

No response

@lbroudoux
Copy link
Member

This is one that could be kept as a Part of #97. What do you think @Harsh4902?

Just a note as I saw the PR proposed by @Luxxgit2k4: I think we should have a higher level of integration from what you proposed. IIRC the proposal was just executing a docker run process but I think the docker client actually has a Go library.

Also, ideally, we might be able to support Podman as well. This could come in a second step, but I think we must be prepared for that, maybe by proposing a --driver option like for minikube, if it cannot be easily detected automatically. Default could be to rely on docker (--driver=docker if not specified) but it could be nice also to have microcks start --driver=podman to rely on podman. Maybe we could check how Testcontainers is doing that because I think that it is able to automatically detect the container runtime...

@lbroudoux lbroudoux added this to the 1.0.0 milestone Mar 14, 2025
@lbroudoux lbroudoux changed the title start and stop command using cobra cli Start and stop command using cobra cli Mar 18, 2025
@Harsh4902
Copy link

@lbroudoux I have created a POC for start and stop command here by using docker go client. I checked code of testcontainers. They are just using docker go client and for switching to podman, just setting up podman.sock's path into DOCKER_HOST env variable. Working on this part with my POC.

@lbroudoux
Copy link
Member

Looks promising! I'm looking forward to executing my first microcks start command! Do not hesitate to push as soon as you have something running.

I assume that the launch of start command will also be tracked in a context file or something to later be able to check the status of microcks and also be able to execute microcks stop. Is it correct? Maybe we should create another issue to track this in parallel?

@Harsh4902
Copy link

@lbroudoux Oh yes! 😁. Definitely we have to do it. Thank you for suggesting, will raise an issue.

@Luxxgit2k4
Copy link
Author

Luxxgit2k4 commented Mar 27, 2025

Hello @lbroudoux @Harsh4902 if you need help am happy to contribute 😊.

@Harsh4902
Copy link

@lbroudoux I have created a POC for start and stop command here by using docker go client. I checked code of testcontainers. They are just using docker go client and for switching to podman, just setting up podman.sock's path into DOCKER_HOST env variable. Working on this part with my POC.

@Luxxgit2k4 Please check the POC which I have mention in this comment and see if you can add any suggestions to this. I am happy to discuss further ideas.

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

No branches or pull requests

3 participants