Sign inSign up

imlteam/device-aggregator

By imlteam

•Updated over 6 years ago

Docker container for device-aggregator

Image
0

5.0K

imlteam/device-aggregator repository overview

⁠device-scanner

Build Status

This repo provides:

  • a persistent daemon⁠ That holds block devices, ZFS devices, and device mounts in memory.
  • a binary⁠ that emits UEvents for block-device changes as they occur.
  • a binary⁠ that emits device mount changes as they occur.
  • a proxy⁠ that transforms the unix domain socket events to HTTPS POSTs.

⁠Architecture

┌───────────────┐ ┌───────────────┐
│  Udev Script  │ │    ZEDlet     │
└───────────────┘ └───────────────┘
        │                 │
        └────────┬────────┘
                 ▼
      ┌─────────────────────┐
      │ Unix Domain Socket  │
      └─────────────────────┘
                 │
                 ▼
   ┌───────────────────────────┐
   │   Device Scanner Daemon   │
   └───────────────────────────┘
                 │
                 ▼
      ┌─────────────────────┐
      │ Unix Domain Socket  │
      └─────────────────────┘
                 │
                 ▼
       ┌──────────────────┐
       │ Consumer Process │
       └──────────────────┘

⁠Development Dependencies

⁠Development setup

  • (Optional) Install ZFS⁠ via OS package manager
  • Install Rust deps: cargo build
⁠Building
⁠Local
  • cargo build
⁠Vagrant
  • Running vagrant up will setup a complete environment. It will build device-scanner, scanner-proxy, and device-aggregator, package them as RPMs and install them on the correct nodes.

    To interact with the device-scanner in real time the following command can be used to keep the stream open such that updates can be seen as the data changes:

    cat - | ncat -U /var/run/device-scanner.sock | jq
    

    If interaction is not required, device info can be retrieved from the device-scanner by running the following command:

    echo '"Stream"' | socat - UNIX-CONNECT:/var/run/device-scanner.sock | jq
    
⁠Testing
  • cargo test

Tag summary

Content type

Image

Digest

Size

27.6 MB

Last updated

over 6 years ago

docker pull imlteam/device-aggregator