variant: flatcar version: 1.0.0 # Dozzle log viewer hub. # # Aggregates container logs from the dozzle agents running on the other Flatcar # VMs (see butane/oswl_connector.yaml.tftpl) and, via the local socket, from # this host's own containers. Reachable at http://192.168.7.63:8080. # # No state is kept on disk: /data is a tmpfs, so the container is fully # disposable and there is nothing to back up. That is also why simple auth # (users.yml) is not used -- it would need a persistent /data. # # Hub <-> agent traffic is TLS, using the certificate pair baked into the # dozzle image. Every hub and agent on the same image version shares it, so # nothing needs mounting here. To move to a custom pair later, generate one # with (do not run as root, writes into $PWD): # # docker run --rm -v "$PWD":/out amir20/dozzle:v11.1.1 generate-certs \ # --cert-out /out/dozzle_cert.pem --key-out /out/dozzle_key.pem # # ...then mount it at /dozzle_cert.pem and /dozzle_key.pem (read-only) on the # hub and on every agent. Keep the key out of this file: it would end up in # plaintext in the rendered Ignition snippet on the node's storage. systemd: units: - name: dozzle.service enabled: true contents: | [Unit] Description=Dozzle log viewer hub After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 # Pulled up front so a slow first pull is not mistaken for a hung unit. ExecStartPre=/usr/bin/docker pull amir20/dozzle:v11.1.1 # Leading "-" so a missing container is not a failure. ExecStartPre=-/usr/bin/docker rm --force dozzle # Foreground (no -d) so systemd supervises the container process. ExecStart=/usr/bin/docker run --rm --name dozzle \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ --tmpfs /data \ -p 8080:8080 \ -e "DOZZLE_HOSTNAME=Oswald Logs" \ -e "DOZZLE_REMOTE_AGENT=192.168.7.60:7007|oswald-runner|Infra,192.168.7.61:7007|ai|Infra,192.168.7.62:7007|oswl-connector|Infra" \ amir20/dozzle:v11.1.1 ExecStop=/usr/bin/docker stop dozzle Restart=always RestartSec=5s [Install] WantedBy=multi-user.target