Replies: 1 comment 1 reply
-
Iteration 4The state of the running pod can be saved in a Kubernetes compatible format, and then restored with just one command:
podman generate kube ente-server > data/ente-server.yaml
podman pod rm ente-server -f
podman play kube data/ente-server.yamlNow the next time I want to start the same cluster again, I don't need to run all the commands again, I can just This is not saving the volumes, maybe I need to modify the commands to use named volumes so that they are preserved between runs. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using Podman for my local containers recently, and I moved my local Ente development setup to use podman instead of Docker. Some notes of how I got it to work (stream of thought) in case they're useful for other folks.
Iteration 1
There is a podman compose script, but it (apparently) is not given the same love by the Podman project as podman itself, and seems to be just for for porting over trivial docker compose files, but it doesn't guarantee full docker compose emulation. In particular, the current
ente/server/compose.yamluses aconfigblock to pass configuration, andpost_startlifetime script, neither of which is currently supported by podman compose.Still, with minor changes and some manual setup I was able to make it work with podman compose.
Iteration 2
Next up, I started from scratch and tried using podman's native concept - pods. The great thing about these is that they are rootless (i.e. they don't require sudo to run).
Note that at this point, this is just an empty pod, no containers are running inside it.
Warning
This is NOT FOR PRODUCTION USE. Do not deploy this. This is only for creating local development environment. e.g. notice how I don't bother where the volume (postgres data) goes, which obviously is not what we'd want in a real deployment. Same goes for the other things I talk of here.
podman exec -w /data minio mc mb -p b2-eu-cenmuseum.yamlwith the following contents:podman run --detach --replace --pod ente-server --name museum -v `pwd`/museum.yaml:/museum.yaml:Z ente-server-museumThat's it.
$ curl localhost:8080/ping {"id":"8fa63ba9fb2d38599a0c28f334e21a5ec3a6ea67","message":"pong"}Iteration next
This is kind of nice - no dealing with socat etc to forward ports. It is spread out across multiple commands though, but I think there will be ways to deal with that nicely (using a script or
podman play).Planning to use the current setup a bit more, and see if there is some thing we can add upstream in Ente's server directory itself to make it quick and easy.
Beta Was this translation helpful? Give feedback.
All reactions