setup-hw

module
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: MIT

README

CI

Hardware setup container

This repository contains a Dockerfile and associated tools to build a container image for configuring/monitoring server BMC and BIOS.

Specifically, the image bundles idracadm7 from OMSA for Dell servers.

Usage

Build
$ docker build -t setup-hw:latest docker
Run as a system service

The container need to be run as a system service before using idracadm7 or setup-hw.

rkt and systemd:

$ sudo mkdir -p /var/lib/setup-hw

$ sudo systemd-run --unit=setup-hw.service \
  rkt run --net=host --dns=host --hosts-entry=host --hostname=%H \
  --insecure-options=all \
  --volume dev,kind=host,source=/dev --mount volume=dev,target=/dev \
  --volume sys,kind=host,source=/sys --mount volume=sys,target=/sys \
  --volume modules,kind=host,source=/lib/modules,readOnly=true --mount volume=modules,target=/lib/modules \
  --volume neco,kind=host,source=/etc/neco,readOnly=true --mount volume=neco,target=/etc/neco \
  --volume var,kind=host,source=/var/lib/setup-hw --mount volume=var,target=/var/lib/setup-hw \
  setup-hw:latest \
    --name setup-hw \
    --caps-retain=CAP_SYS_ADMIN,CAP_SYS_CHROOT,CAP_CHOWN,CAP_FOWNER,CAP_NET_ADMIN

Docker:

$ sudo mkdir -p /var/lib/setup-hw

$ docker run -d --name=setup-hw \
  --net=host --privileged \
  -v /dev:/dev \
  -v /lib/modules:/lib/modules:ro \
  -v /etc/neco:/etc/neco:ro \
  -v /var/lib/setup-hw:/var/lib/setup-hw \
  setup-hw:latest

Docker images

Docker images are available on Quay.io

Access monitor-hw

monitor-hw is the default command of the container. When you run the container, it starts exporting hardware metrics for Prometheus. You can see the metrics from http://localhost:9105/metrics by default.

You must prepare configuration files before running monitor-hw.

Run idracadm7

rkt:

$ POD_UUID=$(sudo rkt list --full | grep running | grep setup-hw | cut -f 1)
$ sudo rkt enter $POD_UUID idracadm7 ...

Docker:

$ docker exec setup-hw idracadm7 ...
Run setup-hw

setup-hw is a tool to configure BMC and BIOS of the running server. See the document for details.

Directories

Path Synopsis
Package gabs implements a simplified wrapper around creating and parsing JSON.
Package gabs implements a simplified wrapper around creating and parsing JSON.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL