Support UI update for podman

Description

We need to support UI update for podman instances

How to test

Run PMM with podman as systemd

[Unit] Description=pmm-server Wants=network-online.target After=network-online.target After=nss-user-lookup.target nss-lookup.target After=time-sync.target [Service] EnvironmentFile=/home/admin/.config/systemd/user/pmm-server.env Restart=on-failure RestartSec=20 ExecStart=/usr/bin/podman run \ --volume /home/admin/.config/systemd/user/:/home/pmm/update/ \ --rm --replace=true --name %N \ --env-file=/home/admin/.config/systemd/user/pmm-server.env \ --net pmm_default \ --cap-add=net_admin,net_raw \ --userns=keep-id:uid=1000,gid=1000 \ -p 443:8443/tcp --ulimit=host ${PMM_IMAGE} ExecStop=/usr/bin/podman stop -t 10 %N [Install] WantedBy=default.target

Create environment file to keep PMM_IMAGE environment variable

PMM_WATCHTOWER_HOST=http://watchtower:8080 PMM_WATCHTOWER_TOKEN=123 PMM_IMAGE=docker.io/perconalab/pmm-server-fb:PR-3682-c87ed27

Environment file should be mounted into PMM container in the path /home/pmm/update/pmm-server.env and used in the service above in line 9.

Run watchtower in the same network

[Unit] Description=watchtower Wants=network-online.target After=network-online.target After=nss-user-lookup.target nss-lookup.target After=time-sync.target [Service] Restart=on-failure RestartSec=20 Environment=WATCHTOWER_HTTP_API_UPDATE=1 Environment=WATCHTOWER_HTTP_API_TOKEN=123 Environment=WATCHTOWER_NO_RESTART=1 Environment=WATCHTOWER_DEBUG=1 ExecStart=/usr/bin/podman run --rm --replace=true --name %N \ -v ${XDG_RUNTIME_DIR}/podman/podman.sock:/var/run/docker.sock \ -e WATCHTOWER_HTTP_API_UPDATE=${WATCHTOWER_HTTP_API_UPDATE} \ -e WATCHTOWER_HTTP_API_TOKEN=${WATCHTOWER_HTTP_API_TOKEN} \ -e WATCHTOWER_NO_RESTART=${WATCHTOWER_NO_RESTART} \ -e WATCHTOWER_DEBUG=${WATCHTOWER_DEBUG} \ --net pmm_default \ --cap-add=net_admin,net_raw \ docker.io/perconalab/watchtower:PMM-12573-podman ExecStop=/usr/bin/podman stop -t 10 %N [Install] WantedBy=default.target

WATCHTOWER_NO_RESTART=1 is important for podman UI upgrade.

 

Upgrade using UI, UI might be unresponsible for a few minutes, but will update PMM. it’s related to https://perconadev.atlassian.net/browse/PMM-13202

How to document

Steps in how to test should be documented.

Smart Checklist

hide

Activity

Nurlan Moldomurov November 4, 2024 at 10:48 AM

Let’s leave only manual upgrade in this page as whole block is called manual upgrade and move UI part to https://pmm-doc-m22e.onrender.com/install-pmm/install-pmm-server/baremetal/podman/index.html#before-you-start

Aaditya Dubey October 9, 2023 at 9:44 AM

Hi ,

Thank you for the report.

Done

Details

Assignee

Reporter

Priority

Labels

Needs QA

Yes

Needs Doc

Yes

Planned Version/s

Fix versions

Story Points

Smart Checklist Progress

Smart Checklist

Created October 6, 2023 at 11:37 AM
Updated December 2, 2024 at 3:05 PM
Resolved November 21, 2024 at 10:35 AM

Flag notifications