RACKSDB(1)

πŸ“¦ version 0.7.0, in alpine 3.24

πŸ’… RACKSDB(1) β€” the racksdb page, but make it make sense

okay so. bestie. listen. racksdb is the little CLI that lets you explore a YAML database of datacenter infrastructures ✨ like, all the racks and nodes and rooms and tags, all up in there, and you get to poke at it. no cap. she's giving infrastructure main character energy πŸ‘‘


🌸 SYNOPSIS 🌸

racksdb [GENERAL OPTIONS] COMMAND [COMMAND OPTIONS]

literally that's the whole shape of it: general options, then a command, then whatever options belong to that command. periodt.


✨ GENERAL OPTIONS ✨

these are the global girlies β€” they work no matter which command you're running 🫢

  • -h, --help β€” show this help message and exit. classic, iconic, always there for you.
  • -v, --version β€” show the RacksDB version number and exit. a little "hi, this is me" moment πŸ’–
  • --debug β€” enable debug mode, which means more messages in the output. like she's texting you her every thought. good for when something's acting sus.
  • -b, --db=DB β€” path to the database. both files and directories paths are accepted β€” yes, both, she's flexible πŸ’… if the path is a directory, all YAML files in this directory are loaded, recursively. if the path does not exist, an error is reported. default value is the /var/lib/racksdb/ directory or the environment variable RACKSDB_DB if that's set.
  • -s, --schema=SCHEMA β€” path to the RacksDB schema YAML file. if the file does not exist, an error is reported (she will not be quiet about it). default value is /usr/share/racksdb/schemas/racksdb.yml or the environment variable RACKSDB_SCHEMA if set.
  • -e, --ext=EXT β€” path to optional RacksDB schema extensions. and here's the vibe difference: if the file does not exist, it is silently ignored by RacksDB. no drama, no error, she just moves on. default value is /etc/racksdb/extensions.yml or the environment variable RACKSDB_EXTENSIONS if set.

πŸ¦‹ COMMANDS πŸ¦‹

every single command accepts -h, --help so you can get the tea on the options for that particular command, e.g. racksdb nodes --help. the commands are grouped by functional purpose, and inside each group they're listed in lexicographical order (alphabetical, bestie, she's organised ✨).

πŸŽ€ Analysis commands

  • dump β€” dump raw data loaded from the database on standard output. and the generated output can be reloaded by RackDB. round-trip queen πŸ”₯
  • schema β€” dump the schema, including optional extensions, on standard output. the whole blueprint, no filter.

πŸ” Search commands

these commands are named after the entities you search for in the database. so like, nodes searches nodes. iykyk πŸ’…

all search commands accept the following options:

  • --fold β€” fold ranges of objects and names. by default ranges of objects and names are expanded; this option produces more concise results. short and cute instead of a whole wall of text πŸ’–
  • --format=FORMAT β€” select an alternative format for the command output. possible values are yaml and json. the default value is yaml except when the -l, --list option is enabled (see right below πŸ‘‡).
  • -l, --list β€” list names of the selected entities, without detailed information. when this option is enabled, the default output format is the raw list of names, one name per line. an alternative format can be selected with the --format option (above), and the list can also be folded with --fold (also above). yes, they stack, she's generous 🫢
  • --with-objects-types β€” add object types names in detailed dumps. this option has no effect with -l, --list. just so you know, no surprises.

the search commands available are the following:

datacenters

dump information about datacenters. this command accepts the following options:

  • --name=NAME β€” name of the datacenter to search.
  • --tags=TAG [TAG] β€” select the datacenters labelled with these tags. yep, multiple tags, she takes a list πŸ’…

infrastructures

dump information about infrastructures. this command accepts the following options:

  • --name=NAME β€” name of the infrastructure to search.
  • --tags=TAG [TAG] β€” select the infrastructures labelled with these tags.

nodes

dump information about nodes. this command accepts the following options:

  • --infrastructure=INFRASTRUCTURE β€” select the nodes in this infrastructure.
  • --name=NAME β€” name of the node to search.
  • --tags=TAG [TAG] β€” select the nodes labelled with these tags.

racks

dump information about racks. this command accepts the following options:

  • --name=NAME β€” name of the rack to search.

tags

get associated to object in database. this command accepts the following options:

  • --node=NODE β€” get tags associated to a specific node.
  • --infrastructure=INFRASTRUCTURE β€” get tags associated to a specific infrastructure. with --on-nodes, get the tags associated to nodes in this infrastructure.
  • --datacenter=DATACENTER β€” get tags associated to a specific datacenter. with --on-racks, get the tags associated to racks in this datacenter.
  • --on-nodes β€” with --infrastructure, get tags associated to nodes in an infrastructure.
  • --on-racks β€” with --datacenter, get tags associated to racks in a datacenter.
🚨 okay important: either --node, --infrastructure or --datacenter argument is required. she needs at least one of them, she's not doing the mind-reading thing today.

🌈 Examples

$ racksdb datacenters

dump information about all the datacenters with their rooms and racks in YAML format.

$ racksdb datacenters --tags tier2 --format json

dump information about all the datacenters that have the tier2 tag in JSON format.

$ racksdb infrastructures

dump information about all the infrastructures with their parts and equipments.

$ racksdb infrastructures --tags hpc cluster

dump information about all the infrastructures that have both the hpc and cluster tags.

$ racksdb infrastructures --list

list names of all infrastructures in database.

$ racksdb nodes --name cn001

dump information node named cn001.

$ racksdb nodes --tags compute

dump information of all nodes that have the compute tag.

$ racksdb nodes --tags compute --list --fold

folded names of all nodes that have the compute tag.

$ racksdb nodes --infrastructure tiger --tags server --list --format json

list of names of all nodes in tiger infrastructure that also have the server tag in JSON format.

$ racksdb racks

dump information about all racks with their equipments.

$ racksdb racks --name R7-06 --fold

dump information about rack R7-A06 with folded node range.

$ racksdb tags --node cn001

get all tags associated to node cn001.

$ racksdb tags --infrastructure tiger

get all tags associated to infrastructure tiger.

$ racksdb tags --infrastructure tiger --on-nodes

get all tags associated to nodes in infrastructure tiger.

$ racksdb tags --datacenter paris

get all tags associated to datacenter paris.

$ racksdb tags --datacenter paris --on-racks

get all tags associated to racks in datacenter paris.

πŸ–ΌοΈ Draw commands

the draw command is used to generate an image file with graphical representations of database entities. and it's used in combination with a sub-command to indicate the type of database entity β€” so it's draw + the thing you're drawing. duo energy πŸ’…βœ¨

this command accepts the following options:

  • --name=NAME β€” name of the entity to represent. this option is required. no name, no art, she will not guess 🫠
  • --format=FORMAT β€” file format of the generated image file. possible values are png, svg and pdf. default value is png.
  • --parameters=PARAMETERS β€” path to a YAML drawing parameters file. with the special value -, drawing parameters are read on standard input. yes, the little dash is doing a lot of work here πŸ’–
  • --drawings-schema=DRAWINGS_SCHEMA β€” path to the drawing parameters schema YAML file. default value is /usr/share/racksdb/drawings.yml.
  • -c, --coordinates=COORDINATES β€” dump pixel coordinates of equipment and racks in the graphical representations into an additional file. the value of the option is the path of the generated coordinates file. this value is optional β€” when this option is used without a value, coordinates are dumped into a file named coordinates.FORMAT where FORMAT is the coordinates format (ex: json).
  • --coordinates-format=COORDINATES_FORMAT β€” format of coordinates files. possible values are json and yaml. default value is json.

the following sub-commands are available:

infrastructure

draw the racks of an infrastructure, grouped by rows. the front side of the racks are represented with the equipments of the infrastructure. like a little portrait of your infra πŸŽ€

room

draw a datacenter room map with its racks. the room is represented from the top view, with rows and racks at their position in this room. birds-eye slay πŸ¦‹

🌈 Examples

$ racksdb draw room --name=atlas

generate the map of datacenter room atlas with all its racks in PNG image file atlas.png.

$ racksdb draw infrastructure --name=tiger --format=svg

generate SVG image file tiger.svg with racks and equipments used in tiger infrastructure.

$ racksdb draw infrastructure --name=tiger --format=pdf --parameters=custom.yaml

generate PDF image file tiger.pdf with racks and equipments used in tiger infrastructure with custom drawing parameters defined in custom.yaml.

$ racksdb draw room --name=noisy --parameters=- < custom.yaml

generate the map of datacenter room noisy with custom drawing parameters read on standard input fed with content of custom.yaml.

$ racksdb draw infrastructure --name=mercury --coordinates

generate a graphical representation of mercury infrastructure and dump coordinates of equipment in JSON format in a file named coordinates.json.

$ racksdb draw infrastructure --name=tiger --coordinates --coordinates-format yaml

generate a graphical representation of tiger infrastructure and dump coordinates of equipment in YAML format in a file named coordinates.yaml.

$ racksdb draw room --name=noisy --coordinates=noisy-coordinates.json

generate a graphical representation of noisy datacenter room and dump coordinates of racks in JSON format in a file named noisy-coordinates.json.


🧚 ENVIRONMENT VARIABLES 🧚

when a command-line option above is omitted, racksdb uses the following environment variables if they are set to a non-empty value (empty means nope, she's not fooled πŸ™ˆ):

  • RACKSDB_SCHEMA β€” path to the RacksDB schema YAML file.
  • RACKSDB_EXTENSIONS β€” path to optional schema extensions.
  • RACKSDB_DB β€” path to the database.
πŸ’€ and remember, bestie: command-line options always override environment variables. the CLI is the main character here, the env vars are the supporting cast. no cap.

⭐ EXIT STATUS ⭐

  • 0 β€” racksdb has processed command with success. slay πŸŽ‰
  • 1 β€” racksdb encountered an error. 😭 it happens to the best of us.

🌈 RESOURCES 🌈

RacksDB web site: https://github.com/rackslab/racksdb β€” go look, she's iconic πŸ‘‘


πŸ’œ COPYING πŸ’œ

Copyright Β© 2022-2023 Rackslab: https://rackslab.io.

RacksDB is distributed under the terms of the GNU General Public License v3.0 or later (GPLv3+).


πŸ‘‘ AUTHOR πŸ‘‘

Rackslab: https://rackslab.io


πŸ“ ok that's the whole page!! this was RacksDB 0.7.0, dated 2026-08-20 β€” RACKSDB(1), the manual, the moment, the legend. mwah πŸ’‹ go fold some ranges, bestie πŸ’–βœ¨πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from