Skip to content

Add Fabric-X lifecycle commands - #799

Draft
MaryamArif7 wants to merge 11 commits into
hyperledger-labs:mainfrom
MaryamArif7:feat791
Draft

Add Fabric-X lifecycle commands#799
MaryamArif7 wants to merge 11 commits into
hyperledger-labs:mainfrom
MaryamArif7:feat791

Conversation

@MaryamArif7

@MaryamArif7 MaryamArif7 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

fixes #791

What this does:

Wires up Fabric-X lifecycle commands (up, start, stop, down, reset, plus namespace list/namespace init) behind the existing fablo CLI, so a Fabric-X network can be controlled the same way classic Fabric ones already are.

  • fabric-x-docker.sh — new generated script (template lives under src/setup-docker/templates/) that drives docker compose against the generated network, plus crypto/genesis generation and namespace setup via fxconfig.
  • A small addition to fablo.sh's executeFabloCommand() and networkPrune() so it actually dispatches to the new script when present, same pattern used for fabric-docker.sh/fabric-k8s.sh.

Command logic is based on the fabric-x-samples devnet Makefile, per the issue description.

@MaryamArif7
MaryamArif7 marked this pull request as draft July 31, 2026 09:24
@MaryamArif7

MaryamArif7 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Hi, @umegbewe Id like to clarify a few things regarding this PR:

  1. The fxconfig.yaml file was initially mentioned in the scope of issue feat(fabric-x): Define the generated Fabric-X target layout and import static fixtures #789 but later marked as "not applicable" in PR #798. However, in the Fabric-X samples devnet (Makefile), it is still referenced for namespace-related commands. Could you please confirm whether namespace support is in scope for this PR?

  2. Will the network only start successfully if at least one namespace is defined, or should it be able to run without any namespaces?

  3. For "generate artifacts" and similar functions: since these are implemented as separate functions in src/setup-docker/templates/fabric-docker/scripts/base-functions-v2.sh, would it be recommended to follow the same approach for Fabric-X? I noticed there are separate implementations for v1 and v2,should Fabric-X have its own as well like
    base-functions-fabricx.sh?

Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
@umegbewe

umegbewe commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
fabricxUp() {
fabricxStart() {
fabricxStop() {
fabricxDown() {

Please use the same lifecycle names as the existing Docker scripts where possible

The fabricx prefix is redundant inside fabric-x-docker.sh

Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
Comment thread src/setup-docker/templates/fabric-x-docker.sh Outdated
@umegbewe

Copy link
Copy Markdown
Contributor

@MaryamArif7 Good work just needs some refining

The fxconfig.yaml file was initially mentioned in the scope of issue ....

My bad feel free to add a fxconfig.yaml in this PR. Only after that PR has been merged

Will the network only start successfully if at least one namespace is defined, or should it be able to run without any namespaces?

The network should be able to start without any namespaces.
fablo up should mean generate crypto/config artifacts and start the Fabric-X services. Namespace creation should be a separate commat

A namespace is needed before doing app-level submit/query work, but it should not be required just to bring up the orderer/committer stack. If Fabric-X itself later proves it cannot become healthy without a namespace, then we can revisit

For "generate artifacts" and similar functions: since these are implemented as separate functions in .....

Yes, we should have function files in fabric-X but not like classic fabric. I like this strcture:

fabric-x-docker.sh
fabric-x/
  docker-compose.yaml
  config/
  scripts/base-functions.sh
  scripts/base-help.sh

@MaryamArif7
MaryamArif7 marked this pull request as ready for review August 15, 2026 09:21
@MaryamArif7
MaryamArif7 marked this pull request as draft August 15, 2026 09:51
@MaryamArif7

MaryamArif7 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Implementation is complete, testing is still pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(fabric-x): Add Fabric-X lifecycle commands behind the existing Fablo command entrypoint

2 participants