Block Explorer Playbooks¶
The block_explorer playbooks operate the Fabric-X Block Explorer: the PostgreSQL storage backend and the combined server/UI container that streams blocks from the committer sidecar and serves the Next.js UI.
Playbooks flow¶
flowchart LR
subgraph SETUP[Setup]
direction LR
CRYPTO[generate_crypto] --> CONFIGS[configs]
end
subgraph RUN[Run and cleanup]
direction LR
START[start] --> PING[ping]
PING --> STOP[stop]
STOP --> TEARDOWN[teardown]
TEARDOWN --> WIPE[wipe]
end
CONFIGS --> START
generate_crypto.yaml¶
generate_crypto.yaml prepares PostgreSQL TLS material and, when the committer sidecar requires mTLS, a self-signed client certificate for the Block Explorer server.
ansible-playbook hyperledger.fabricx.block_explorer.generate_crypto --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default. - Nuance: the client certificate is generated only when the host named by
sidecar_hosthascommitter_use_mtls: true; there is no local TLS toggle for this.
configs.yaml¶
configs.yaml renders the Block Explorer server configuration from the sidecar_host and postgres_db_host connection details declared in inventory.
ansible-playbook hyperledger.fabricx.block_explorer.configs --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default. - Nuance:
sidecar_hostmust name the committer sidecar host directly; it is not derived fromfabric_x_committers.
start.yaml¶
start.yaml starts the PostgreSQL backend, then the combined Block Explorer server and UI, in that order.
ansible-playbook hyperledger.fabricx.block_explorer.start --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default. - Nuance: each component is opt-in per host through its enabling variable:
postgres_portandblock_explorer_port.
stop.yaml¶
stop.yaml stops the combined Block Explorer server and UI, then PostgreSQL, leaving generated files and runtime data in place.
ansible-playbook hyperledger.fabricx.block_explorer.stop --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default.
teardown.yaml¶
teardown.yaml removes the combined Block Explorer server/UI and PostgreSQL runtime resources while leaving configuration and crypto material intact.
ansible-playbook hyperledger.fabricx.block_explorer.teardown --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default.
wipe.yaml¶
wipe.yaml removes the combined Block Explorer server/UI and PostgreSQL artifacts from targeted hosts, including generated configuration and crypto material.
ansible-playbook hyperledger.fabricx.block_explorer.wipe --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default.
ping.yaml¶
ping.yaml checks the PostgreSQL and combined Block Explorer server/UI endpoints declared by targeted hosts.
ansible-playbook hyperledger.fabricx.block_explorer.ping --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default.
fetch_crypto.yaml¶
fetch_crypto.yaml fetches PostgreSQL and Block Explorer server crypto material into the configured artifacts directory.
ansible-playbook hyperledger.fabricx.block_explorer.fetch_crypto --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default.
fetch_logs.yaml¶
fetch_logs.yaml fetches PostgreSQL and combined Block Explorer server/UI logs from targeted hosts into the configured output directory.
ansible-playbook hyperledger.fabricx.block_explorer.fetch_logs --extra-vars '{"target_hosts": "fabric_x_block_explorer"}'
Properties:
- Target hosts:
fabric_x_block_explorerby default. - Nuance: intended for troubleshooting Block Explorer and database failures from the control node.