fxconfig Playbooks¶
The fxconfig playbooks prepare and submit Fabric-X configuration transactions, including namespace creation. fxconfig is a control-plane tool that uses generated artifacts, endorser information from the inventory, and runtime endpoints.
Playbooks flow¶
flowchart LR
BIN[binaries] --> CONFIGS[configs]
CONFIGS --> CREATE[create_namespaces]
CREATE -. cleanup .-> WIPE[wipe]
binaries.yaml¶
binaries.yaml prepares the fxconfig CLI used for configuration transactions. It handles control-node install/build decisions first, then ensures remote hosts that declare fxconfig_use_bin: true have the binary available by transfer, local build, or install.
Properties:
- Target hosts:
localhostfor control-node build/install decisions, thenallby default for remote binary setup. - Binary activation: only hosts with
fxconfig_use_bin: truerun the remote binary setup step. - Build location: set
bin_build_on_control_node: truewithfxconfig_build_bin: trueto build on the control node and transfer the result to remote hosts. In that case,gomust be installed on the control node. Iffxconfig_build_bin: trueis set withoutbin_build_on_control_node, the build happens on each remote binary host andgois needed there.
configs.yaml¶
configs.yaml renders and transfers fxconfig configuration for hosts that declare namespace and user data. It selects the endorser identity, discovers the orderer router, committer query service, and committer sidecar endpoints, and writes the local configuration that later namespace operations use.
Properties:
- Target hosts:
allby default. - Nuance: run this during setup after core crypto and genesis/config artifacts exist and before namespace creation.
create_namespaces.yaml¶
create_namespaces.yaml first lists the namespaces already committed to the Fabric-X network together with their current on-chain version, then compares each declared namespace's policy against a fingerprint recorded from the last run to decide whether it needs to be created, updated, or left alone. It groups inventory definitions, creates or updates unsigned transactions on the control node, asks the relevant organizations to endorse them, merges the endorsements, submits the finalized transactions, and records the applied fingerprint.
Properties:
- Target hosts:
allby default, with transaction construction and submission coordinated by thefxconfigrole. - Reconciliation: a namespace absent from the chain is created. A namespace already on chain whose recorded fingerprint does not exactly match its declared policy — including having no recorded fingerprint at all — is updated, using the namespace's current on-chain version as the compare-and-swap token fxconfig requires. This is how changing a namespace's
policyin the inventory and re-running this playbook applies the change, and it also means the very first run against a namespace that already existed on chain before this reconciliation was in place submits one update for it. Noversionfield is needed in the inventory. - Idempotency: a namespace whose declared policy still matches its recorded fingerprint is skipped across creation, endorsement, merge, and submission.
- Known limitation: a namespace policy changed out-of-band (not through this playbook) is not detected, since reconciliation compares against the last fingerprint this playbook recorded, not the actual on-chain policy bytes.
Warning
Run this after the network is started and the required committer endpoints are reachable. Running it too early fails by design because namespace transactions must be endorsed and submitted through live Fabric-X endpoints.
wipe.yaml¶
wipe.yaml removes generated fxconfig files from targeted hosts so namespace/configuration artifacts can be rebuilt cleanly during another setup or debug cycle.
Properties:
- Target hosts:
allby default. - Nuance: removes generated
fxconfigfiles so namespace/configuration artifacts can be rebuilt cleanly.