opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.65k stars 1.78k forks source link

Support for podman/podman-compose as an alternative to docker/docker-compose #6877

Open lukas-vlcek opened 1 year ago

lukas-vlcek commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently, OpenSearch testing has a hard dependency on Docker and Docker-compose. This makes the development on non-Linux platforms more complicated and introduces a barrier for new contributors.

Describe the solution you'd like

A Podman and Podman-compose are open-source alternatives and they had matured a lot. It would be great if developers had the option to choose between docker and podman.

Describe alternatives you've considered

My primary development environment is MacOS (M1) and I am not sure if there are "non-hackich" alternatives (for example Minikube).

Additional context

I was recently experimenting with podman and podman-compose:

# You can install podman directly from brew of as part of https://podman-desktop.io/
% podman version
Client:       Podman Engine
Version:      4.4.2
API Version:  4.4.2
Go Version:   go1.20.1
Git Commit:   74afe26887f814d1c39925a1624851ef3590e79c
Built:        Thu Feb 23 16:59:21 2023
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      4.4.2
API Version:  4.4.2
Go Version:   go1.19.6
Built:        Wed Mar  1 12:22:39 2023
OS/Arch:      linux/arm64
# You can install podman-compose using pip3
% podman-compose version
['podman', '--version', '']
using podman version: 4.4.2
podman-composer version  1.0.3
podman --version 
podman version 4.4.2
exit code: 0

And I have to say that I was able to run many example applications from both the https://github.com/docker/awesome-compose and https://github.com/containers/podman-compose/tree/devel/examples.

The experience seem to be really smooth these days. Podman-compose uses Qemu VMs and CLI commands podman and podman-compose work really effortlessly. You create new podman machine instance (which is typically a fresh fedora), do some basic settings (like installing podman-mac-helper, export DOCKER_HOST). Then you navigate to docker-compose examples folder, fire podman-compose up and that's it...

So far so good. But when I was trying to convince OpenSearch to use podman-compose instead of docker-compose I realized that the main issue is that it rely on gradle-docker-compose-plugin which is not compatible with podman-compose. See https://github.com/avast/gradle-docker-compose-plugin/issues/387

To me it seems that missing gradle plugin for podman is the last bit that is holding us back. Perhaps the most logical way would be to fork the docker plugin and adapt it for podman (but I am not saying this is on my near roadmap, although a prototyping should not be that difficult).

I would like to hear from others, WDYT?

dblock commented 1 year ago

What's the issue you're running into using Docker on M1?

lukas-vlcek commented 1 year ago

1) As far as I understand it is available only as a part of paid subscription (at least that would be my case, see Docker Desktop terms in installation instructions) 2) I would like to use Podman (and I believe there will be more people going forward)

dblock commented 1 year ago

+1 on podman because of licensing

dbwiddis commented 1 year ago

+1 on additional options other than docker for we macOS folks!

saratvemulapalli commented 1 year ago

@lukas-vlcek looks like we have agreement on podman, would you like to contribute the changes?

lukas-vlcek commented 1 year ago

Yes, I would like to give it a try. It is on my radar.