mgt 0.2.2

Command line tool to analyze the WildFly management model.
mgt-0.2.2 is not a library.

GitHub Actions Workflow Status Crates.io

Model Graph Tooling

mgt is a command line tool to analyze the WildFly management model. It orchestrates the pipeline of starting WildFly containers, spinning up Neo4J databases, running the Java-based analyzer, and building self-contained Neo4J images with pre-populated databases. Part of the model graph tools ecosystem.

Installation

Precompiled binaries are available for macOS, Linux, and Windows.

Brew

brew tap hpehl/tap
brew install mgt

Cargo

cargo install mgt

Build from source

  1. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh (see Install Rust and Cargo)
  2. git clone git@github.com:model-graph-tools/tooling.git
  3. cd tooling
  4. cargo build --release && cargo install --path .

This installs the mgt binary to ~/.cargo/bin/ which should be in your $PATH.

Shell Completions

mgt provides dynamic shell completions. The easiest way to set them up is:

mgt completions --install

This auto-detects your shell and installs the completion script to the standard location. You can also specify the shell explicitly:

mgt completions fish --install

To print the completion script to stdout (e.g. for manual setup or piping):

mgt completions fish

Supported shells: bash, zsh, fish, elvish, powershell.

Identifiers

Most commands accept an identifier argument. Identifiers can be WildFly versions, feature pack names, or a combination of both.

WildFly Versions

WildFly versions are specified as <major>[.<minor>] where major is >= 10 and minor is optional (0-9). You can use comma-separated lists and ranges:

Examples

  • 34 — single version
  • 26.1 — version with minor
  • 10,26.1,34 — comma-separated list
  • 20..29 — range

All supported versions can be listed with mgt versions.

Feature Packs

Feature packs are identified by their shortcut name (e.g. ai, graphql). All supported feature packs can be listed with mgt feature-packs.

Mixed

Identifiers can mix WildFly versions and feature packs:

mgt start 34,ai,graphql

Commands

[!IMPORTANT] Most commands require podman to be present with docker as a fallback.

analyze

Analyzes the management model of a WildFly instance or feature pack and builds a self-contained Neo4J image with the results. For each identifier, the command:

  1. Starts a WildFly standalone instance from quay.io/wado/wado-sa.
  2. Starts an empty Neo4J database from docker.io/neo4j.
  3. Downloads and runs the analyzer.
  4. Builds a self-contained Neo4J image published to quay.io/modelgraphtools/model.
  5. Shuts down instances and cleans up resources.
mgt analyze 34
mgt analyze ai

push

Pushes model DB images to the remote registry. Images must have been built previously with mgt analyze. Requires podman login quay.io beforehand.

mgt push 34
mgt push 34,ai,graphql
mgt push 26..29 --chunks 2

start

Starts model containers from previously built images.

mgt start 34
mgt start 34,ai,graphql

stop

Stops running model containers by identifier or all at once.

mgt stop 34
mgt stop --all

browse

Opens the Neo4J browser for running model containers.

mgt browse 34
mgt browse ai

images

Lists all locally available model images. Use --wildfly or --feature-packs to filter.

mgt images
mgt images --wildfly
mgt images --feature-packs

versions

Lists all supported WildFly versions.

mgt versions

feature-packs

Lists all supported feature packs.

mgt feature-packs

ps

Lists all running model containers.

mgt ps

completions

Generates and installs shell completions. See Shell Completions.

mgt completions --install
mgt completions fish --install
mgt completions fish

update

Updates the WildFly and feature pack configuration files used by mgt. These files are stored in ~/.config/wildfly-meta/ and contain version metadata and feature pack definitions.

mgt update