Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions imageroot/systemd/user/api.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=controller.service vpn.service timescale.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/api.pid %t/api.ctr-id
Expand All @@ -21,14 +21,14 @@ ExecStart=/usr/bin/podman run \
--volume api-secrets:/nethsecurity-api/secrets/:z \
--volumes-from=vpn \
--network=host \
--env-file=%S/state/network.env \
--env-file=%S/state/secret.env \
--env-file=%S/state/config.env \
--env-file=%S/state/promtail.env \
--env-file=%S/state/subscription.env \
--env-file=%S/state/db.env \
--env-file=%S/state/platform.env \
--env-file=%S/state/api.env \
--env-file=%E/state/network.env \
--env-file=%E/state/secret.env \
--env-file=%E/state/config.env \
--env-file=%E/state/promtail.env \
--env-file=%E/state/subscription.env \
--env-file=%E/state/db.env \
--env-file=%E/state/platform.env \
--env-file=%E/state/api.env \
${NETHSECURITY_API_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/api.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/api.ctr-id
Expand Down
6 changes: 3 additions & 3 deletions imageroot/systemd/user/controller.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Description=Podman controller.service
Requires=vpn.service api.service ui.service proxy.service promtail.service loki.service prometheus.service grafana.service webssh.service timescale.service
Before=vpn.service api.service ui.service proxy.service promtail.service loki.service prometheus.service grafana.service webssh.service timescale.service
ConditionPathExists=%S/state/environment
ConditionPathExists=%S/state/network.env
ConditionPathExists=%E/state/environment
ConditionPathExists=%E/state/network.env

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/controller.pid %t/controller.pod-id
Expand Down
10 changes: 5 additions & 5 deletions imageroot/systemd/user/grafana.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=loki.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/grafana.pid %t/grafana.ctr-id
Expand All @@ -18,11 +18,11 @@ ExecStart=/usr/bin/podman run \
--pod-id-file %t/controller.pod-id \
--replace -d --name grafana \
--volume grafana-data:/var/lib/grafana:z \
--volume=%S/state/grafana.yml:/etc/grafana/provisioning/datasources/local.yml:z \
--volume=%S/etc/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml:z \
--volume=%S/etc/dashboards/:/etc/grafana/dashboards:z \
--volume=%E/state/grafana.yml:/etc/grafana/provisioning/datasources/local.yml:z \
--volume=%E/etc/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml:z \
--volume=%E/etc/dashboards/:/etc/grafana/dashboards:z \
--network=host \
--env-file=%S/state/grafana.env \
--env-file=%E/state/grafana.env \
${GRAFANA_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/grafana.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/grafana.ctr-id
Expand Down
6 changes: 3 additions & 3 deletions imageroot/systemd/user/loki.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Before=promtail.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/loki.pid %t/loki.ctr-id
Expand All @@ -16,9 +16,9 @@ ExecStart=/usr/bin/podman run \
--pod-id-file %t/controller.pod-id \
--replace -d --name loki \
--volume=loki-data:/loki \
--volume %S/etc/loki.yaml:/etc/loki/local-config.yaml:z \
--volume %E/etc/loki.yaml:/etc/loki/local-config.yaml:z \
--network=host \
--env-file=%S/state/loki.env \
--env-file=%E/state/loki.env \
${LOKI_IMAGE} \
-config.expand-env=true \
-config.file=/etc/loki/local-config.yaml \
Expand Down
10 changes: 5 additions & 5 deletions imageroot/systemd/user/prometheus.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ After=vpn.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%S/state/prometheus.env
WorkingDirectory=%S/state
EnvironmentFile=%E/state/environment
EnvironmentFile=%E/state/prometheus.env
WorkingDirectory=%E/state
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/prometheus.pid %t/prometheus.ctr-id
Expand All @@ -18,8 +18,8 @@ ExecStart=/usr/bin/podman run \
--cgroups=no-conmon \
--pod-id-file %t/controller.pod-id \
--replace -d --name prometheus \
--volume=%S/state/prometheus.yml:/prometheus/prometheus.yml:z \
--volume=%S/state/web.yml:/prometheus/web.yml:z \
--volume=%E/state/prometheus.yml:/prometheus/prometheus.yml:z \
--volume=%E/state/web.yml:/prometheus/web.yml:z \
--volume=prometheus-data:/prometheus:z \
--network=host \
${PROMETHEUS_IMAGE} --web.listen-address=127.0.0.1:${PROMETHEUS_PORT} --web.external-url=${PROMETHEUS_PATH} --storage.tsdb.retention.time=${PROMETHEUS_RETENTION} --web.config.file=/prometheus/web.yml
Expand Down
8 changes: 4 additions & 4 deletions imageroot/systemd/user/promtail.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=vpn.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/promtail.pid %t/promtail.ctr-id
Expand All @@ -15,10 +15,10 @@ ExecStart=/usr/bin/podman run \
--cgroups=no-conmon \
--pod-id-file %t/controller.pod-id \
--replace -d --name promtail \
--volume %S/etc/promtail.yml:/etc/promtail/config.yml:z \
--volume %E/etc/promtail.yml:/etc/promtail/config.yml:z \
--network=host \
--env-file=%S/state/promtail.env \
--env-file=%S/state/config.env \
--env-file=%E/state/promtail.env \
--env-file=%E/state/config.env \
${PROMTAIL_IMAGE} \
-config.expand-env=true -config.file=/etc/promtail/config.yml
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/promtail.ctr-id -t 10
Expand Down
4 changes: 2 additions & 2 deletions imageroot/systemd/user/proxy.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires=api.service vpn.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/.pid %t/proxy.ctr-id
Expand All @@ -19,7 +19,7 @@ ExecStart=/usr/bin/podman run \
--replace -d --name proxy \
--volumes-from=vpn \
--network=host \
--env-file=%S/state/network.env \
--env-file=%E/state/network.env \
${NETHSECURITY_PROXY_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/proxy.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/proxy.ctr-id
Expand Down
10 changes: 5 additions & 5 deletions imageroot/systemd/user/timescale.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Wants=controller.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%S/state/secret.env
EnvironmentFile=%S/state/db.env
WorkingDirectory=%S/state
EnvironmentFile=%E/state/environment
EnvironmentFile=%E/state/secret.env
EnvironmentFile=%E/state/db.env
WorkingDirectory=%E/state
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/timescale.pid %t/timescale.ctr-id
Expand All @@ -19,7 +19,7 @@ ExecStart=/usr/bin/podman run \
--pod-id-file %t/controller.pod-id \
--replace -d --name timescale \
--volume=timescale-data:/var/lib/postgresql/data \
--env-file=%S/state/db.env \
--env-file=%E/state/db.env \
--network=host \
${TIMESCALEDB_IMAGE} -p ${POSTGRES_PORT} -h 127.0.0.1
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/timescale.ctr-id -t 10
Expand Down
4 changes: 2 additions & 2 deletions imageroot/systemd/user/ui.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires=api.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/.pid %t/ui.ctr-id
Expand All @@ -18,7 +18,7 @@ ExecStart=/usr/bin/podman run \
--pod-id-file %t/controller.pod-id \
--replace -d --name ui \
--network=host \
--env-file=%S/state/network.env \
--env-file=%E/state/network.env \
${NETHSECURITY_UI_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/ui.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/ui.ctr-id
Expand Down
6 changes: 3 additions & 3 deletions imageroot/systemd/user/vpn.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=controller.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%E/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/vpn.pid %t/vpn.ctr-id
Expand All @@ -16,8 +16,8 @@ ExecStart=/usr/bin/podman run \
--pod-id-file %t/controller.pod-id \
--replace -d --name vpn \
-v vpn-data:/etc/openvpn/:z \
--env-file=%S/state/network.env \
--env-file=%S/state/config.env \
--env-file=%E/state/network.env \
--env-file=%E/state/config.env \
--network=host --device /dev/net/tun \
--security-opt label=disable \
${NETHSECURITY_VPN_IMAGE}
Expand Down
4 changes: 2 additions & 2 deletions imageroot/systemd/user/webssh.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ After=vpn.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=%S/state/environment
EnvironmentFile=%S/state/network.env
EnvironmentFile=%E/state/environment
EnvironmentFile=%E/state/network.env
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/.pid %t/webssh.ctr-id
Expand Down
Loading