Open3
RasPi4-CO2mon

RasPi4にRaspberry Pi OS Liteをインストール
IPアドレス、SSH鍵はconfigに書いておく
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y vim
raspi-configでExpand Filesystem、I2C有効化

Screenlyをインストール
bash <(curl -sL https://www.screenly.io/install-ose.sh)
Do you still want to continue? => Yes
Would you like Anthias to manage the network for you? => Yes
Which version of Anthias would you like to install? => latest
Would you like to perform a full system upgrade as well? => Yes
インストール中

Screenlyのインストール時にDockerも一緒に入るので、モニタアプリの環境を作る。
InfluxDB2とGrafanaのコンテナを作る。
services:
influxdb:
image: influxdb:latest
container_name: influxdb-local
volumes:
- ./docker/influxdb2/data:/var/lib/influxdb2
- ./docker/influxdb2/config:/etc/influxdb2
ports:
- 8086:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=admin
- DOCKER_INFLUXDB_INIT_PASSWORD=password
- DOCKER_INFLUXDB_INIT_ORG=35ftagl.dev
- DOCKER_INFLUXDB_INIT_BUCKET=bucket
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
hostname: grafana
ports:
- 8085:3000
volumes:
- grafana_storage:/var/lib/grafana
depends_on:
- influxdb
environment:
- GF_SERVER_ROOT_URL=http://localhost:8085
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
grafana_storage: {}
コケた。Ubuntu 24.04ではインストール実績あるんだが......
co2mon@co2mon:~/dev/eiras/co2 $ docker compose up -d
[+] Running 0/1
⠼ influxdb Pulling 2.4s
no matching manifest for linux/arm/v8 in the manifest list entries
起きてることはM1 MacでMySQLが動かないとかそういうやつに似ている。
platformにlinux/arm64を指定してみる。
services:
influxdb:
image: influxdb:latest
platform: linux/arm64
container_name: influxdb-local
イメージはできたが、起動しない
co2mon@co2mon:~/dev/eiras/co2 $ docker compose up -d
[+] Running 11/11
✔ influxdb Pulled 4.8s
✔ aa6fbc30c84e Already exists 0.0s
✔ af8cd4147de7 Already exists 0.0s
✔ a53bc08419b6 Already exists 0.0s
✔ 538c7efb8a50 Already exists 0.0s
✔ 38a750c202e5 Already exists 0.0s
✔ 388ea13e7c08 Already exists 0.0s
✔ c2b5f9eba25f Already exists 0.0s
✔ 1bbcaac9a6f0 Already exists 0.0s
✔ 3ba728053a8f Already exists 0.0s
✔ 071a40daa097 Already exists 0.0s
[+] Running 3/3
✔ Network co2_default Created 0.2s
✔ Container influxdb-local Started 0.9s
✔ Container grafana Started 1.3s
co2mon@co2mon:~/dev/eiras/co2 $ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4abfc1b02b56 grafana/grafana:latest "/run.sh" 11 seconds ago Up 9 seconds 0.0.0.0:8085->3000/tcp, [::]:8085->3000/tcp grafana
a8173df35c33 screenly/anthias-nginx:latest-pi4 "/usr/bin/entry.sh n…" 15 hours ago Up 15 hours 0.0.0.0:80->80/tcp, :::80->80/tcp screenly-anthias-nginx-1
69de1c6be6ae screenly/anthias-celery:latest-pi4 "/usr/bin/entry.sh /…" 15 hours ago Up 15 hours screenly-anthias-celery-1
d33a9fbf9b1f screenly/anthias-viewer:latest-pi4 "/usr/bin/entry.sh b…" 15 hours ago Up 15 hours screenly-anthias-viewer-1
8b4b1756cd68 screenly/anthias-websocket:latest-pi4 "/usr/bin/entry.sh p…" 15 hours ago Up 15 hours screenly-anthias-websocket-1
dd5e55794d55 screenly/anthias-server:latest-pi4 "/usr/bin/entry.sh b…" 15 hours ago Up 15 hours screenly-anthias-server-1
eee6426d3260 screenly/anthias-redis:latest-pi4 "/usr/bin/entry.sh r…" 15 hours ago Up 15 hours 127.0.0.1:6379->6379/tcp screenly-redis-1
ほーーーん
co2mon@co2mon:~/dev/eiras/co2 $ docker run influxdb
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested