You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running pingora in a container, and am trying to figure out how to do upgrades in a containerized environment. In this case docker, that being my dev environment.
Run systemd in the container
I could run systemd in the container and use that to run pingora, and systemd for pingora already has an example. Then use docker exec commands to tell systemd what to do. But running systemd inside of the container has problems. There's also the small problem of upgrading the binary on a running container. (update - docker cp will probably work)
write my own bash script
Write a bash script or some other language that does the few simple things that we need systemd to do, which would be
Make -u idempotent. (why isn't it now? If you run -u with no existing pingora process it quietly exits after 5 seconds. Why not just run pingora as normal if there's no existing process?)
send the correct signals to the pingora processes
Scan for some outside signal to perform the upgrade
Also has the problem of upgrading the binary on a running container (update - docker cp will probably work)
mount the upgrade socket on host and upgrade by starting a new container
Removes the problem of upgrading the binary on a running container, but if there are any
global host resources assigned to the container (such as port maps), this won't work, you can't
run two containers at once with the same global host resource.
Also has problem with the lack of idempotence in the -u flag
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm running pingora in a container, and am trying to figure out how to do upgrades in a containerized environment. In this case docker, that being my dev environment.
Run systemd in the container
I could run systemd in the container and use that to run pingora, and systemd for pingora already has an example. Then use
docker exec
commands to tell systemd what to do. But running systemd inside of the container has problems. There's also the small problem of upgrading the binary on a running container. (update -docker cp
will probably work)write my own bash script
Write a bash script or some other language that does the few simple things that we need systemd to do, which would be
-u
idempotent. (why isn't it now? If you run-u
with no existing pingora process it quietly exits after 5 seconds. Why not just run pingora as normal if there's no existing process?)Also has the problem of upgrading the binary on a running container (update -
docker cp
will probably work)mount the upgrade socket on host and upgrade by starting a new container
Removes the problem of upgrading the binary on a running container, but if there are any
global host resources assigned to the container (such as port maps), this won't work, you can't
run two containers at once with the same global host resource.
Also has problem with the lack of idempotence in the
-u
flagSome other method I haven't thought of
ideas?
Beta Was this translation helpful? Give feedback.
All reactions