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
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh(see Install Rust and Cargo)git clone git@github.com:model-graph-tools/tooling.gitcd toolingcargo 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 version26.1— version with minor10,26.1,34— comma-separated list20..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
podmanto be present withdockeras a fallback.
analyze
Analyzes the management model of a WildFly instance or feature pack and builds a Neo4J image with the results. For each identifier, the command:
- Starts a WildFly standalone instance from quay.io/wado/wado-sa using the
standalone-full-ha.xmlconfiguration. - Starts an empty Neo4J database from docker.io/neo4j.
- Downloads and runs the analyzer.
- Builds a self-contained Neo4J image published to quay.io/modelgraphtools/model.
- Shuts down instances and cleans up resources.
mgt analyze 34
mgt analyze ai
push
Pushes Neo4J 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 Neo4J model DB containers from previously built images.
mgt start 34
mgt start 34,ai,graphql
stop
Stops running Neo4J model DB containers by identifier or all at once.
mgt stop 34
mgt stop --all
browse
Opens the Neo4J browser for running model DB containers.
mgt browse 34
mgt browse ai
images
Lists all locally available Neo4J model DB 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 Neo4J model DB 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