From ae99ffd57ece46a1a9af868548294a32fb94eab8 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 1 May 2022 21:08:18 -0700 Subject: [PATCH] using github container registry images. update documentation to enable persistence by default update docs to include influxdb --- README.md | 18 +++++++++++++----- docker/Vagrantfile | 2 ++ docker/docker-compose.yml | 3 ++- docs/INSTALL_MANUAL.md | 2 ++ docs/INSTALL_UNRAID.md | 6 +++--- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5172af6..b30f376 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ If you're using Docker, getting started is as simple as running the following co ```bash docker run -it --rm -p 8080:8080 \ + -v `pwd`/scrutiny:/scrutiny/config \ + -v `pwd`/influxdb2:/var/lib/influxdb2 \ -v /run/udev:/run/udev:ro \ --cap-add SYS_RAWIO \ --device=/dev/sda \ @@ -84,21 +86,27 @@ docker run -it --rm -p 8080:8080 \ - `--cap-add SYS_RAWIO` is necessary to allow `smartctl` permission to query your device SMART data - NOTE: If you have **NVMe** drives, you must add `--cap-add SYS_ADMIN` as well. See issue [#26](https://github.com/AnalogJ/scrutiny/issues/26#issuecomment-696817130) - `--device` entries are required to ensure that your hard disk devices are accessible within the container. -- `analogj/scrutiny` is a omnibus image, containing both the webapp server (frontend & api) as well as the S.M.A.R.T metric collector. (see below) +- `ghcr.io/analogj/scrutiny:master-omnibus` is a omnibus image, containing both the webapp server (frontend & api) as well as the S.M.A.R.T metric collector. (see below) ### Hub/Spoke Deployment In addition to the Omnibus image (available under the `latest` tag) there are 2 other Docker images available: -- `analogj/scrutiny:collector` - Contains the Scrutiny data collector, `smartctl` binary and cron-like scheduler. You can run one collector on each server. -- `analogj/scrutiny:web` - Contains the Web UI, API and Database. Only one container necessary +- `ghcr.io/analogj/scrutiny:master-collector` - Contains the Scrutiny data collector, `smartctl` binary and cron-like scheduler. You can run one collector on each server. +- `ghcr.io/analogj/scrutiny:master-web` - Contains the Web UI, API and Database. Only one container necessary ```bash -docker run -it --rm -p 8080:8080 \ +docker run --rm -p 8086:8086 \ + -v `pwd`/influxdb2:/var/lib/influxdb2 \ + --name scrutiny-web \ + influxdb:2.2 + +docker run --rm -p 8080:8080 \ + -v `pwd`/scrutiny:/scrutiny/config \ --name scrutiny-web \ ghcr.io/analogj/scrutiny:master-web -docker run -it --rm \ +docker run --rm \ -v /run/udev:/run/udev:ro \ --cap-add SYS_RAWIO \ --device=/dev/sda \ diff --git a/docker/Vagrantfile b/docker/Vagrantfile index 4efaf98..52310af 100644 --- a/docker/Vagrantfile +++ b/docker/Vagrantfile @@ -1,3 +1,5 @@ +# This vagrant file is only used for local development & testing. + Vagrant.configure("2") do |config| config.vm.guest = :freebsd config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 00e3abd..e610919 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.5' services: scrutiny: container_name: scrutiny - image: analogj/scrutiny + image: ghcr.io/analogj/scrutiny:master-omnibus cap_add: - SYS_RAWIO ports: @@ -11,6 +11,7 @@ services: volumes: - /run/udev:/run/udev:ro - ./config:/scrutiny/config + - ./influxdb:/var/lib/influxdb2 devices: - "/dev/sda" - "/dev/sdb" diff --git a/docs/INSTALL_MANUAL.md b/docs/INSTALL_MANUAL.md index e6eb846..c6d26ec 100644 --- a/docs/INSTALL_MANUAL.md +++ b/docs/INSTALL_MANUAL.md @@ -132,6 +132,8 @@ chmod +x /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 Next, we will manually trigger the collector, to populate the Scrutiny dashboard: +> NOTE: if you need to pass a config file to the scrutiny collector, you can provide it using the `--config` flag. + ``` /opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "http://localhost:8080" ``` diff --git a/docs/INSTALL_UNRAID.md b/docs/INSTALL_UNRAID.md index 7a22aaf..f8b9fe4 100644 --- a/docs/INSTALL_UNRAID.md +++ b/docs/INSTALL_UNRAID.md @@ -19,13 +19,13 @@ To install, simply click 'Install'; the configuration parameters should not need As a docker image can be created using various OS bases, the image choice is entirely the users choice. Recommendations of a specific image from a specific maintainer is beyond the scope of this guide. However, to provide some context given the number of questions posed regarding the various versions available: -- **analogj/scrutiny** +- **ghcr.io/analogj/scrutiny:master-omnibus** - `Image maintained directly by the application author` - `Debian based docker image` -- **linuxserver/scrutiny:** +- **linuxserver/scrutiny** - `Image maintained by the LinuxServer.io group` - `Alpine based docker image` -- **hotio/scrutiny:** +- **hotio/scrutiny** - `Image maintained by hotio` - `DETAILS TBD`