Signed-off-by: Lukas Holecek hluk@email.cz
Not sure if this is a good idea since podman-compose is still in early phase of development and it's not that well tested and less user-friendly than docker-compose.
podman-compose
docker-compose
@gnaponie, @vmaljulin Can you review and check that it works for you? E.g. make up && make test
make up && make test
@lholecek, any chance we can make the use of podman-compose vs docker-compose configurable?
It is configurable:
make COMPOSE=docker-compose PODMAN=docker ...
rebased onto ba5b84041209246e6fb77cd638ae5a855caf7041
rebased onto 7c81be0932715f65b9d2a08c835637f971f6b35a
rebased onto 19ad60c11f7af63c2f91fb5852d7b8104471ec57
I think we can "switch" to podman. But maybe for a while we might keep the option of docker-compose too, and explain in the doc on how to "switch" back to docker-compose if the user wants to. Can we add this?
There are still some stability issues with podman-compose.
One notable issue is that it's not possible to publish ports - it gives me following error:
ERRO[0000] error starting some container dependencies ERRO[0000] "error from slirp4netns while setting up port redirection: map[desc:bad request: add_hostfwd: slirp_add_hostfwd failed]"
I assume you need to be still root for this.
Workaround (depending on what you need to do) is to access API in the container:
# list policies make exec CMD="curl localhost:8080/api/v1.0/policies" # waiverdb version make exec CMD="curl localhost:5004/api/v1.0/about/"
Maybe can we document this? We don't want people to waste time solving something you already figured out.
rebased onto 6eb38456c30ebcc2c1038e7a0e1b352beb36fa2b
rebased onto e3dbba7ef0587ae459d9d9c0496e54fdee26a649
rebased onto 95fa993d008523e34585a97dbd4540befce54859
After today's system update, publishing ports seems to work (no root necessary). :ok_hand:
rebased onto 6e437907f9a3f03788c4e888fe852013b5662293
rebased onto c2b76b977c60d2b21522b948461be6c7ab209b58
rebased onto b765ede13155cdcf2b6ecdcb4578a0d14c14753a
@gnaponie @lucarval Can you review again? I've also added another commit to enable testing waiverdb and resultsdb.
Maybe we should add to the installation guide in the documentation that the user should install podman, because only docker-compose is listed there.
I've pulled your code and tried. I execute "make up -d" and it tells me that docker isn't running. Isn't it supposed to start with podman? Yes, I have podman installed.
Well, podman is not required, I would rather avoid adding more documentation if not strictly needed.
BTW, podman-compose is not yet in fedora package repos but there was a request to get it there and it might be already in rawhide. You can install it using pip3 install podman-compose but I don't think it's worth mentioning in developer docs.
pip3 install podman-compose
Mentioned in the docs:
Quick Tip: Use make to run frequent commands mentioned below. It uses podman-compose (if installed) instead of docker-compose.
make
2 new commits added
Allow running tests for resultsdb and waiverdb with docker-compose
Use podman-compose by default if available
I tried "make build" and I get this error... any idea?
Error: error building at STEP "COPY . .": error copying "/home/gnaponie/proj/greenwave" to "/home/gnaponie/.local/share/containers/storage/overlay/1dfbb086f1589f509c9cc5ffc8d99c6d6b3ba9d4e3f3237d1b6af324145a93ea/merged/src": Error processing tar file(exit status 1): unexpected EOF 125
Not sure what exactly is the problem, but we should update Dockerfile for greenwave so it doesn't copy everything to the container (same thing can happen with waiverdb and resultsdb). It's not ideal, but we can use .dockerignore.
.dockerignore
❯ podman run -it --rm localhost/greenwave_dev ls -la total 444 drwxr-xr-x. 2 root root 4096 Nov 14 11:17 . drwxr-xr-x. 2 root root 4096 Nov 14 11:22 .. -rw-rw-r--. 1 root root 31408 Nov 14 10:17 .coverage -rw-rw-r--. 1 root root 215 Oct 15 05:30 .coveragerc -rw-rw-r--. 1 root root 76 Mar 18 2019 .dockerignore drwxrwxr-x. 32 root root 4096 Mar 15 2019 .eggs -rw-r--r--. 1 root root 17 Apr 10 2019 .env drwxrwxr-x. 9 root root 4096 Nov 14 10:19 .git -rw-rw-r--. 1 root root 368 Nov 7 07:37 .gitignore drwxrwxr-x. 3 root root 4096 Jul 11 16:35 .pytest_cache drwxrwxr-x. 8 root root 4096 Nov 14 10:17 .tox drwxrwxr-x. 4 root root 4096 Aug 30 12:51 .vagrant drwxrwxr-x. 5 root root 4096 Apr 9 2019 .venv drwxrwxr-x. 2 root root 4096 Sep 4 2018 .vscode ... drwxrwxr-x. 2 root root 4096 Nov 14 09:55 __pycache__ ... drwxrwxr-x. 5 root root 4096 Nov 14 10:19 docker ...
Oh .dockerignore is already there. Looks like podman doesn't support it.
podman
Ah, looks like bug in buildah, fixed in v1.11.5: https://github.com/containers/buildah/commit/2c8122afef228aa9e5e010492410cfa0fbc33c9d
Hmm, it doesn't work for me anymore -- some system update might have broke this. It comes down to this error:
❯ podman pod create --name=greenwave --share net -p 5004:5004 -p 5001:5001 -p 8080:8080 Error: unable to create pod: unable to create pod cgroup for pod 90208560d9caf9408aa8bcdb6a4d8345549710ef7112eeb224f5437976df2c73: error creating cgroup user.slice/user-libpod_pod_90208560d9caf9408aa8bcdb6a4d8345549710ef7112eeb224f5 437976df2c73.slice: The name org.freedesktop.systemd1 was not provided by any .service files
Can anyone review? I have currently some issues with podman - I'll try to find out what went wrong later (I've recently uninstalled gdm and it might have removed/disabled some other important part).
gdm
Sorry Lukas, but this doesn't work for me... I tried "make up" and that's the end of the output: http://pastebin.test.redhat.com/815050
Looks like it wants you to run make build explicitly.
make build
Hey Lukas, I've tried again and it doesn't work. I tried with make build and also make recreate. Using make down first. But I get a lot of errors. Let me know if you need more details.
Were you able to run it correctly?
podman-compose down probably only gives you error messages because the pod and containers were not running. The exit code should be still 0 though.
podman-compose down
0
@lholecek and I checked it together. It doesn't work for me, it might be because I still run on fedora 30 and I get some OCI runtime error. We decided we're going to merge this PR, besides the documentation. So that people that want to use podman-compose, if it works for them, they can use it, otherwise docker-compose also works fine.
rebased onto f09637daef17287b3147bfe4c3c4dcd5501e6241
I've removed the podman-compose mention from the docs.
rebased onto f5e253022383dae5715f8148ef3fee0efcb8463e
As discussed, feel free to merge it if it works for you, as long as it doesn't break docker-compose.
Pull-Request has been merged by lholecek
Signed-off-by: Lukas Holecek hluk@email.cz