Ironlib wraps various opensource and various vendor utilities to expose a consistent set of interface methods to,
For the available methods,
Ironlib expects various vendor utilities to be made available.
TODO: define a list of utility path env vars a user can set.
Ironlib identifies the hardware and executes tooling respective to the hardware/component being queried or updated,
The list of tools that ironlib wraps around, in no particular order,
storecli
More examples can be found in the examples directory
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/metal-toolbox/ironlib"
"github.com/sirupsen/logrus"
)
func main() {
logger := logrus.New()
device, err := ironlib.New(logger)
if err != nil {
logger.Fatal(err)
}
inv, err := device.GetInventory(context.TODO())
if err != nil {
logger.Fatal(err)
}
j, err := json.MarshalIndent(inv, "", " ")
if err != nil {
logger.Fatal(err)
}
fmt.Println(string(j))
}
By default ironlib will lookup the executable path, if required the path can be overriden by exporting one or more of these environment variables
IRONLIB_UTIL_ASRR_BIOSCONTROL
IRONLIB_UTIL_RACADM7
IRONLIB_UTIL_DNF
IRONLIB_UTIL_DSU
IRONLIB_UTIL_BLKDISCARD
IRONLIB_UTIL_HDPARM
IRONLIB_UTIL_LSBLK
IRONLIB_UTIL_LSHW
IRONLIB_UTIL_MLXUP
IRONLIB_UTIL_MSECLI
IRONLIB_UTIL_MVCLI
IRONLIB_UTIL_NVME
IRONLIB_UTIL_SMARTCTL
IRONLIB_UTIL_SMC_IPMICFG
IRONLIB_UTIL_SUM
IRONLIB_UTIL_STORECLI
Check out this snippet to determine if all required dependencies are available to ironlib.
docker build -f Dockerfile -t ironlib:devel .
ironlib will attempt to execute proprietary vendor executables based on the hardware its run on,
to build docker image with executables like mvcli
, mlxup
, SMCI sum
etc follow the steps below.
S3_BUCKET_ALIAS
and S3_PATH
in the snippet below.ACCESS_KEY
, SECRET_KEY
values defined.docker build -f Dockerfile \
--build-arg INSTALL_NON_DISTRIBUTABLE=true
--build-arg S3_BUCKET_ALIAS="tools"
--build-arg S3_PATH="tools/bucket-name/path/non-dist"
--build-arg ACCESS_KEY=<>
--build-arg SECRET_KEY=<>
-t ironlib:devel-non-dist .