{"id":31950675,"url":"https://github.com/nulltea/fabnctl","last_synced_at":"2026-05-17T09:43:02.844Z","repository":{"id":46794249,"uuid":"331109190","full_name":"nulltea/fabnctl","owner":"nulltea","description":"CLI for conveniently deploying Hyperledger Fabric blockchains on Kubernetes","archived":false,"fork":false,"pushed_at":"2021-09-25T11:55:59.000Z","size":51964,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T09:37:12.934Z","etag":null,"topics":["blockchain","cmd","fabric-arm","fabric-cli","fabric-utils","helm","hyperledger","hyperledger-fabric","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nulltea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-19T21:05:14.000Z","updated_at":"2023-01-18T17:48:41.000Z","dependencies_parsed_at":"2022-09-24T18:05:40.018Z","dependency_job_id":null,"html_url":"https://github.com/nulltea/fabnctl","commit_stats":null,"previous_names":["timoth-y/fabnctl","nulltea/fabnctl","timoftime/fabnctl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nulltea/fabnctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nulltea%2Ffabnctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nulltea%2Ffabnctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nulltea%2Ffabnctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nulltea%2Ffabnctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nulltea","download_url":"https://codeload.github.com/nulltea/fabnctl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nulltea%2Ffabnctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32121007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cmd","fabric-arm","fabric-cli","fabric-utils","helm","hyperledger","hyperledger-fabric","kubernetes"],"created_at":"2025-10-14T12:45:32.505Z","updated_at":"2026-04-22T04:33:31.943Z","avatar_url":"https://github.com/nulltea.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fabnctl\n\n_`fabnctl` is a developer friendly CLI for Hyperledger Fabric on your Kubernetes infrastructure._\n\n![cmd help image]\n\n[cmd help image]: https://github.com/timoth-y/fabnctl/blob/main/docs/fabnctl.png?raw=true\n\n## Intentions\n\n[Hyperledger Fabric][hyperledger fabric url] is a powerful enterprise-grade permissioned distributed ledger framework. \nIts modular architecture and unique orderer-based approach to consensus enable versatility in use cases and production-ready performance and scalability.\n\nHowever, its deployment procedure especially in the Kubernetes environment may require quite a lot of time and effort.\nHyperledger Fabric's documentation is indeed helpful though it still covers the very basics.\n\n`fabnctl` command line utility provides a straightforward and convenient way of deploying permissioned blockchain network in the Kubernetes environment.\n\nIts developer-first approach attempts to eliminate initial struggle when starting on a project with Hyperledger Fabric onboard,\nas well at further scaling and chaincode (Smart Contracts) development process.\n\nIn addition, its emoji-rich and interactive smooth logging will keep you calm and joyful throughout the entire ride into\nthe world of deterministic blockchain technology, contract-oriented development, and brave Byzantine battles.\n\n[hyperledger fabric url]: https://www.hyperledger.org/use/fabric\n\n## Foreword\n\nThis repository was derived from the [`timoth-y/chainmetric-network`][chainmetric-network],\nthe development of which required a more convenient way of its blockchain infrastructure deployment.\nConsider checking it out too.\n\n[chainmetric-network]: https://github.com/timoth-y/chainmetric-network\n\n## Requirements\n\n- Existing Kubernetes environment, ARM-based clusters, K3s, and [minikube][minikube] is also suitable\n- Configured `kubectl` with connection to your, `.kube` config is expected to be located in $HOME directory\n- Volume provisioner installed in K8s cluster, this projects intends to use [`rancher/local-path-provisioner`](https://github.com/rancher/local-path-provisioner),\n  you can use `make prepare-cluster` for this. Alternatively it is possible to modify Storage Class in `.cli-config.yaml`\n- Reverse proxy installed in K8s cluster, this projects intends to use [Traefik](https://github.com/traefik/traefik).\n  You can install it with [Helm chart](https://github.com/traefik/traefik-helm-chart) or use `make prepare-cluster` rule.\n- Docker engine installed on your local device, it's required for building chaincode images\n\n## Installation\n\nDownload the latest release:\n\n```shell\nmkdir /tmp/fabnctl\ncurl --location \"https://github.com/timoth-y/fabnctl/releases/latest/download/fabnctl-$(uname -s)-amd64.tar.gz\" \\\n | tar xz -C /tmp/fabnctl\n```\n\nFor ARM system, please change ARCH to `arm64`:\n\n```shell\nmkdir /tmp/fabnctl\ncurl --location \"https://github.com/timoth-y/fabnctl/releases/latest/download/fabnctl-$(uname -s)-arm64.tar.gz\" \\\n | tar xz -C /tmp/fabnctl\n```\n\nInstall tool:\n\n```shell\ncd /tmp/fabnctl \u0026\u0026 make install\n```\n\n## Usage\n\n### Cluster preparation\n\nBefore starting deploying Fabric on your cluster, check if all requirements met. \nYou can use `prepare-cluster` rule to install all required charts on your cluster:\n\n```shell\nmake prepare-cluster\n```\n\n### Network configuration\n\nNow when we sure cluster is ready to go, first thing to do is fill the network configuration based on your needs:\n\n```shell\nnano network-config.yaml # See network-config-example.yaml for example\n```\n\n### Generate artifacts\n\nOkay, one more thing before deploying an actual Fabric components is to generate crypto-materials and channel artifacts:\n\n```shell\nfabnctl gen artifacts --arch=arm64 --domain=example.network -f ./network-config.yaml\n```\n\n![gen artifacts gif]\n\nThis will generate all required artifacts based on configuration in `network-config.yaml` in shared persistent volume,\nas well as download it in your local device to the following directories: `.channel-artifacts.$DOMAIN` and `.crypto-config.$DOMAIN`.\n\n### Deploy orderer\n\nThe essential components of Hyperledger Fabric blockchain is of course [Ordering Service][orderer],\nwhich is responsible for ensuring data consistency and enables performance at scale while preserving privacy.\n\nThough, its deployment is actually a piece of cake:\n\n```shell\nfabnctl deploy orderer --arch=arm64 --domain=example.network\n```\n\n![deploy orderer gif]\n\n\u003e Hyperledger foundation does not provide official images for ARM-based systems.\n\u003e Instead this project currently use alternative images found on DockerHub.\n\u003e It's planned to build and source own images latter on to keep up with Fabric releases.\n\u003e Unless of course Hyperledger decides to include support for ARM, which may indeed be highly possibly since the rise of\n\u003e single-board ARM based computers such as Raspberry Pi and others.\n\n### Deploy organization peers\n\nGreat, moving on to [organizations][organization] and [peers][peer] owned by them,\nwhich will store a copy of ledger and perform read/write operations on it.\n\nTo deploy peer for certain organization use following command:\n\n```shell\nfabnctl deploy peer --arch=arm64 --domain=example.network --org=org1 --peer=peer0\n```\n\n![deploy peer gif]\n\nAlong with peer this command will deploy `cli.$peer.$org.$domain` pod, `ca.$org.$domain` (can be skipped with `--withCA=false`),\nand `couchdb.$peer.$org.$domain` in case that state database is specified in the `network-config.yaml`.\n\n### Deploy and join channels\n\nNow before adding functionality to the network, which is of course Smart Contracts,\none more crucially important thing is needed to be done - provide communication between peers aka [channels][channel].\n\nDoing that also won't take much of your time and effort:\n\n```shell\nfabnctl deploy channel --domain=example.network --channel=example-channel \\\n   -o=org1 -p=peer0 \\\n   -o=org2 -p=peer0 \\\n   -o=org3 -p=peer0\n```\n\n![deploy channel gif]\n\nThat would create channel with specified name and join all given organization peers to it.\n\n### Deploy chaincodes\n\nNow we're talking! So, assuming your Smart Contract is written and ready to be tested in the distributed wilderness,\nthe following command will perform a sequence of actions to make that happened:\n\n```shell\nfabnctl deploy cc --arch=arm64 --domain=example.network --chaincode=example -C=example-channel \\\n   -o=org1 -p=peer0 \\\n   -o=org2 -p=peer0 \\\n   -o=org3 -p=peer0 \\\n   --registry=dockerhubuser ./chaincodes/example\n```\n\n![deploy cc gif]\n\nHope the gif loading haven't taken forever because this command takes some time. Under the hood it starts with building\ndocker image of the passed chaincode source code, which will then be pushed to the specified registry.\nThis step is required for deploying [chaincode as an external service][external cc], the feature that was introduced int Fabric v2.0,\nand appear to be that best suitable for Kubernetes-based infrastructures.\n\nThen the determination of the chaincode version and sequence takes place. For the initial deployment it will be v1.0, sequence 1.\nDuring every next update that numbers would be incremented, but it is also possible to specify version with according flag.\n\nThe chaincode is then packed into the [`package.tar.gz`][cc package] and sent to the cli pods for installation and further approval.\nThis step is performed for each passed organization.\n\n\u003e It is important for chaincode to be approved by all organizations which are part of the channel.\n\u003e Thus, it is recommended to execute `deploy cc` command with all orgs passed. Otherwise, the commitment phase will fail.\n\u003e However, it is possible to split the process in batches, in thus scenario chaincode will be committed when last organization will approve it\n\n### Set anchor peers on channel definition\n\nOne more thing to not forget about when deploying HLF network is to update channel to set anchor peers,\nwithout this step organization peers won't be aware where the other organizations are hosted.\n\nTo prevent this causing troubles letter use this simple command now:\n\n```shell\nfabnctl update channel --setAnchors --domain=example.network  --channel=example-channel \\\n   -o=org1 \\\n   -o=org2 \\\n   -o=org3\n```\n\n![update channel gif]\n\n### Bonus: Generate `connection.yaml`\n\nNow, when the network is ready and functional the next logical step would be test it with some application,\nwhich would require connection config.\n\nThis command line utility will gladly help you with that too:\n\n```shell\nfabnctl gen connection -f ./network-config.yaml --name application \\\n   --channel=example-channel --org=chipa-inu ./artifacts\n```\n\n![gen connection gif]\n\n[gen artifacts gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/gen_artifacts.gif?raw=true\n[deploy orderer gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/deploy_orderer.gif?raw=true\n[deploy peer gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/deploy_peer.gif?raw=true\n[deploy channel gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/deploy_channel.gif?raw=true\n[deploy cc gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/deploy_cc.gif?raw=true\n[update channel gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/update_channel.gif?raw=true\n[gen connection gif]: https://github.com/timoth-y/fabnctl/blob/main/docs/gen_connection.gif?raw=true\n\n[crypto material]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/identity/identity.html#digital-certificates\n[channel]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/glossary.html#channel\n[orderer]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/glossary.html#ordering-service\n[peer]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/glossary.html#peer\n[organization]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/glossary.html#organization\n[chaincode]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/glossary.html#smart-contract\n[external cc]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_service.html\n[cc package]: https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_service.html#packaging-chaincode\n\n## Roadmap\n\n- [x] Builds over SSH [(#12)](https://github.com/timoth-y/fabnctl/pull/12)\n- [ ] Add multiply orderers deployment support\n- [ ] Simplify interactive logging implementation\n- [ ] Source charts on [artifacthub.io](https://artifacthub.io)\n\n## Contributing\n\nContributions are always welcome! Fork this repo to get started.\n\n## Wrap up\n\nThe development of `fabnctl` utility was motivated by the need of providing more convenient and straightforward way of deploying\nHyperledger Fabric network for those who are getting started with this awesome technology\nand potentially satisfy some needs of those who are already into Fabric's DevOps processes.\n\n## License\n\nLicensed under the [Apache 2.0][license file].\n\n[license url]: https://www.apache.org/licenses/LICENSE-2.0\n\n[minikube]:  https://minikube.sigs.k8s.io/docs/\n\n[license file]: https://github.com/timoth-y/fabnctl/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulltea%2Ffabnctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnulltea%2Ffabnctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulltea%2Ffabnctl/lists"}