added dozzle hub and agents
This commit is contained in:
1 parent
679a7b9c64
commit
1b200dc009
5 files changed
+124
No files matched your search
@@ -45,3 +45,22 @@ systemd:
|
|||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
- name: dozzle-agent.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Dozzle Agent
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
ExecStartPre=-/usr/bin/docker rm --force dozzle-agent
|
||||||
|
ExecStart=/usr/bin/docker run --name dozzle-agent \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-p 7007:7007 \
|
||||||
|
amir20/dozzle:v11.1.1 agent
|
||||||
|
ExecStop=/usr/bin/docker stop dozzle-agent
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
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
|
||||||
@@ -42,6 +42,25 @@ systemd:
|
|||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
- name: dozzle-agent.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Dozzle Agent
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
ExecStartPre=-/usr/bin/docker rm --force dozzle-agent
|
||||||
|
ExecStart=/usr/bin/docker run --name dozzle-agent \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-p 7007:7007 \
|
||||||
|
amir20/dozzle:v11.1.1 agent
|
||||||
|
ExecStop=/usr/bin/docker stop dozzle-agent
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
directories:
|
directories:
|
||||||
|
|||||||
@@ -46,6 +46,25 @@ systemd:
|
|||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
- name: dozzle-agent.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Dozzle Agent
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
ExecStartPre=-/usr/bin/docker rm --force dozzle-agent
|
||||||
|
ExecStart=/usr/bin/docker run --name dozzle-agent \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-p 7007:7007 \
|
||||||
|
amir20/dozzle:v11.1.1 agent
|
||||||
|
ExecStop=/usr/bin/docker stop dozzle-agent
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
files:
|
files:
|
||||||
|
|||||||
@@ -237,6 +237,20 @@ nodes = {
|
|||||||
qemu_guest_agent = false
|
qemu_guest_agent = false
|
||||||
butane_file = "butane/oswl_connector.yaml.tftpl"
|
butane_file = "butane/oswl_connector.yaml.tftpl"
|
||||||
}
|
}
|
||||||
|
# Dozzle log viewer hub. Pulls container logs from the dozzle agents on
|
||||||
|
# the other Flatcar VMs (port 7007) plus its own local docker socket.
|
||||||
|
# Keeps no state on disk, so it is safe to rebuild at any time.
|
||||||
|
"monitor" = {
|
||||||
|
hostname = "monitor"
|
||||||
|
vmid = 213
|
||||||
|
ip = "192.168.7.63"
|
||||||
|
vlan = 7
|
||||||
|
memory = 2048
|
||||||
|
cores = 2
|
||||||
|
disk_size = 32
|
||||||
|
qemu_guest_agent = false
|
||||||
|
butane_file = "butane/monitor.yaml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
machines = {
|
machines = {
|
||||||
"grist" = {
|
"grist" = {
|
||||||
|
|||||||
Reference in new issue
Block a user