Skip to content

Commit 0e6e5c9

Browse files
committed
cockpit
1 parent 5405f6d commit 0e6e5c9

7 files changed

Lines changed: 39 additions & 29 deletions

File tree

node-red/justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ setup:
33
cd nodes && npm install --without=dev
44

55
setup-dev:
6-
sudo apt install -y jq --no-install-recommends
6+
sudo apt install -y dasel
77
npm install --include=dev
88
cd nodes && npm install --include=dev
99

@@ -12,9 +12,9 @@ format:
1212

1313
test:
1414
just --fmt --check --unstable
15-
jq . projects/adafruithat/flows.json 1> /dev/null
16-
jq . projects/planktoscopehat/flows.json 1> /dev/null
17-
jq . projects/dashboard/flows.json 1> /dev/null
15+
dasel validate projects/adafruithat/flows.json
16+
dasel validate projects/planktoscopehat/flows.json
17+
dasel validate projects/dashboard/flows.jso
1818
cd nodes && npm test
1919

2020
# Too many errors for now

os/caddy/Caddyfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@
2828
handle /admin/fs/* {
2929
reverse_proxy localhost:8080
3030
}
31+
32+
redir /admin/cockpit /admin/cockpit/
33+
handle /admin/cockpit/* {
34+
reverse_proxy localhost:9090
35+
}
3136
}

os/cockpit/cockpit.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[WebService]
2+
AllowUnencrypted = true
3+
# Cannot use "*://" or "*"
4+
Origins = "http://localhost http://pkscope-sponge-care http://pkscope-sponge-care-280"
5+
ProtocolHeader = "X-Forwarded-Proto"
6+
ForwardedForHeader = "X-Forwarded-For"
7+
UrlRoot = "/admin/cockpit/"

os/cockpit/install.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

os/cockpit/justfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
setup:
2+
sudo apt install -y --no-install-recommends cockpit cockpit-networkmanager cockpit-storaged cockpit-pcp
3+
sudo cp cockpit.toml /etc/cockpit/cockpit.conf
4+
# https://cockpit-project.org/guide/latest/feature-pcp
5+
sudo systemctl enable --now pmlogger
6+
sudo systemctl enable cockpit.socket
7+
sudo systemctl restart cockpit.socket
8+
# TODO consider
9+
# https://github.com/cockpit-project/cockpit-files
10+
# https://github.com/gbraad-cockpit/cockpit-tailscale
11+
# https://github.com/gbraad-cockpit/cockpit-headscale
12+
13+
setup-dev:
14+
sudo apt install -y dasel
15+
dasel validate cockpit.toml
16+
17+
format:
18+
just --fmt --unstable
19+
20+
test:
21+
just --fmt --check --unstable

os/justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ setup:
55

66
setup-dev:
77
sudo apt install -y shellcheck
8+
just --justfile cockpit/justfile setup-dev
89

910
format:
1011
just --fmt --unstable
@@ -19,3 +20,4 @@ test:
1920
just --justfile caddy/justfile test
2021
just --justfile machine-name/justfile test
2122
just --justfile ssh/justfile test
23+
just --justfile cockpit/justfile test

os/setup.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ else
5858
panic "$description"
5959
fi
6060

61-
description="install Cockpit"
62-
report_starting "$description"
63-
if "$build_scripts_root"/cockpit/install.sh; then
64-
report_finished "$description"
65-
else
66-
panic "$description"
67-
fi
68-
6961
description="set up /home/pi/PlanktoScope"
7062
report_starting "$description"
7163
if "$build_scripts_root/PlanktoScope/install.sh"; then

0 commit comments

Comments
 (0)