This is a podman & node monitoring stack fully based off on conda and does not require sudo permissions. It uses two prometheus exporters
- https://github.com/containers/prometheus-podman-exporter
- https://github.com/prometheus/node_exporter
Uses the following awesome dashboards
- https://grafana.com/grafana/dashboards/1860-node-exporter-full
- https://github.com/containers/prometheus-podman-exporter
This repo and stack is designed to work out of the box and provide an quick initial dashboard. It automatically sets up the exporters, configures prometheus and points grafana at it.
configure conda channels
conda config --add channels conda-forge
conda config --set channel_priority strict
install podman
conda install podman
restart your current terminal.
When it starts first, podman will have issues finding rootlessport since its not on the PATH. To fix this, Edit /home/sp/miniconda3/share/containers/containers.conf
Add the sections below
[engine]
helper_binaries_dir = [
"/home/sp/miniconda3/libexec/podman"
]
First, check what is the current network backend.
podman info | grep networkBackend
If you see cni, continue with the steps below. If you see netavark, skip this step as you already have the correct backend and pick up from enable podman socket section
The default CNI network stack does not have dns resolution. To enable this, we need to install netavark.
This method requires sudo permissions to install build dependencies. You could build for a target machine and then deploy the binaries without sudo. Alternatively you can use Option 2 if you have glibc version 2.32 and above.
Install pre-requisites
- Rustc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
- Deps
sudo apt-get install build-essential protobuf-compiler
- Clone and build netavark
git clone https://github.com/containers/netavark.git
cd netavark
make
mv bin/netavark /home/sp/miniconda3/libexec/podman/
- Clone and build aadvark-dns
git clone https://github.com/containers/aardvark-dns.git
cd aardvark-dns
make
mv bin/aardvark-dns /home/sp/miniconda3/libexec/podman/
wget https://github.com/containers/netavark/releases/download/v1.10.3/netavark.gz
gzip -d netavark.gz
chmod +x netavark
mv netavark /home/sp/miniconda3/libexec/podman/
wget wget https://github.com/containers/aardvark-dns/releases/download/v1.10.0/aardvark-dns.gz
gzip -d aardvark-dns.gz
chmod +x aardvark-dns
mv aardvark-dns /home/sp/miniconda3/libexec/podman/
edit network_engine in /home/sp/miniconda3/share/containers/containers.conf
[network]
network_backend = "netavark"
This step is destructive and removes all existing images, containers and networks. Proceed only after backups are created.
podman system reset --force
[!NOTE] Please edit the systemd files before copying them into your machine. currently the user is sp.
A socket is how the podman monitoring component communicates with the containers and images. Since podman is daemonless, we need to create this socket and give read permissions on it.
To do this, we first setup some systemd services. copy the systemd files from the folder systemd to /usr/lib/systemd/user/
sudo cp -r systemd/. /usr/lib/systemd/user/
enable the new files and enable the podman listener socket.
systemctl --user daemon-reload
systemctl --user start podman.socket
podman compose -f compose.yaml up -d
You are all done and can view the dashboard at the link below. IP_ADDRESS_OF_MAACHINE:3000