{"id":18301807,"url":"https://github.com/kfsoftware/hlf-easy","last_synced_at":"2025-04-05T14:31:18.266Z","repository":{"id":236666833,"uuid":"759878020","full_name":"kfsoftware/hlf-easy","owner":"kfsoftware","description":"HLF Easy is a tool to simplify the process of setting up Hyperledger Fabric nodes. It is designed to be used in baremetal environment.","archived":false,"fork":false,"pushed_at":"2024-02-19T14:06:11.000Z","size":515,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T05:43:08.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kfsoftware.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-19T14:05:49.000Z","updated_at":"2024-08-16T13:40:34.000Z","dependencies_parsed_at":"2024-04-28T06:15:54.176Z","dependency_job_id":null,"html_url":"https://github.com/kfsoftware/hlf-easy","commit_stats":null,"previous_names":["kfsoftware/hlf-easy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfsoftware%2Fhlf-easy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfsoftware%2Fhlf-easy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfsoftware%2Fhlf-easy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfsoftware%2Fhlf-easy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kfsoftware","download_url":"https://codeload.github.com/kfsoftware/hlf-easy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352537,"owners_count":20925285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-05T15:17:01.412Z","updated_at":"2025-04-05T14:31:13.255Z","avatar_url":"https://github.com/kfsoftware.png","language":"Go","readme":"# HLF Easy\n\nHLF Easy is a tool to simplify the process of setting up Hyperledger Fabric nodes. It is designed to be used in baremetal environment.\n\n![Easy HLF.png](./docs/images/Easy%20HLF.png)\n\n# Tutorial\n\n### Pre requisites\n- HLF Peer binaries\n- HLF Orderer binaries\n\n\n\n### Install fabric binaries\n\n```bash\ncurl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh \u0026\u0026 chmod +x install-fabric.sh\n./install-fabric.sh 2.5.5\n```\n\n### Compile the code\n```bash\ngo build -o hlf-easy ./main.go \u0026\u0026 sudo mv hlf-easy /usr/local/bin/hlf-easy   \n```\n\n### Follow the HLF meetup 2024\n\nComplete the meetup 2024 to get a running network with 2 peer organizations and 1 orderer organization.\n\nRepository: https://github.com/kfsoftware/meetup-k8s-hlf-2024\n\nYoutube: https://www.youtube.com/watch?v=8qPXaRzrFiQ\n\n### Init the certificate authority\n\nAfter initializing the certificate authority, you can inspect the certificate authority to get the certificates.\n\nAll the certificates will be saved in $HOME/hlf-easy with a custom structure.\n\n```bash\n\nhlf-easy ca init --hosts=192.168.1.36 --hosts localhost --hosts 127.0.0.1 --hosts ca.localho.st --name=ca-1\n\nhlf-easy ca inspect --name=ca-1 \u003e localorg1-ca.yaml\n\n```\n\n### Initializing the peer certificates\n\nOnce we have the certificates generated we need to initialize the peer certificates.\n\nFirst, we need to find our external IP address, this is the IP address that the network nodes will use to connect to the peer.\n\nYou can use `ifconfig` or `ip a` to find the IP address of the interface that is connected to the network.\n```bash\nexport EXTERNAL_HOST=192.168.1.36 \n```\n\nAnd then, we can initialize the peer certificates.\n```bash\nhlf-easy peer init --hosts=${EXTERNAL_HOST} --hosts localhost --hosts 127.0.0.1 --hosts peer01.localho.st --ca-name=ca-1 --id=peer1 --local=true\n\nhlf-easy peer init --hosts=${EXTERNAL_HOST} --hosts localhost --hosts 127.0.0.1 --hosts peer02.localho.st --ca-name=ca-1 --id=peer2 --local=true\n```\n\n### Starting the peers\n\n```bash\n\nhlf-easy peer start --id=peer1 --msp-id=LocalOrg1 --external-endpoint=\"${EXTERNAL_HOST}:7051\" \\\n  --listen-address=\"0.0.0.0:7051\" \\\n  --chaincode-address=\"0.0.0.0:7052\" \\\n  --events-address=\"0.0.0.0:7053\" \\\n  --operations-listen-address=\"0.0.0.0:7054\" \\\n  --mgmt-address=\"0.0.0.0:7055\"\n\n\nhlf-easy peer start --id=peer2 --msp-id=LocalOrg1 --external-endpoint=\"${EXTERNAL_HOST}:7061\" \\\n  --listen-address=\"0.0.0.0:7061\" \\\n  --chaincode-address=\"0.0.0.0:7062\" \\\n  --events-address=\"0.0.0.0:7063\" \\\n  --operations-listen-address=\"0.0.0.0:7064\" \\\n  --mgmt-address=\"0.0.0.0:7065\"\n```\n### Enroll the admin and client\n\nAfter the peer is started, we can enroll the admin and client using our local ca\n```bash\n\nhlf-easy ca enroll --name=ca-1 --local=true --type=admin --common-name=admin \u003e peer-admin.yaml\n\nhlf-easy ca enroll --name=ca-1 --local=true --type=client --common-name=client \u003e peer-client.yaml\n```\n\n### Joining a network\n\nOnce the peer is started and the admin is enrolled, we can join the peer to a network, for this, we need to have a running network, the variables to get the orderer certificate and the URLs are based on the 2024 HLF workshop mentioned above. \n\n```bash\n\nkubectl get fabricorderernodes ord-node1 -o=jsonpath='{.status.tlsCert}' | sed -e \"s/^/${IDENT_8}/\" \u003e orderer0-tls.pem\n\nhlf-easy peer join --id=peer1 --channel=demo2 --identity=peer-admin.yaml --orderer-url=grpcs://orderer0-ord.localho.st:443 --orderer-tls-cert=orderer0-tls.pem\n\nhlf-easy peer join --id=peer2 --channel=demo2 --identity=peer-admin.yaml --orderer-url=grpcs://orderer0-ord.localho.st:443 --orderer-tls-cert=orderer0-tls.pem\n```\n### Setting the anchor peers\n```bash\nhlf-easy peer anchorpeers set --id=peer1 --channel=demo2 --identity=peer-admin.yaml \\\n  --orderer-url=grpcs://orderer0-ord.localho.st:443 --orderer-tls-cert=orderer0-tls.pem \\\n  --anchor-peers=\"${EXTERNAL_HOST}:7051\" --anchor-peers=\"${EXTERNAL_HOST}:7061\"\n\n\n\n```\n\n## Roadmap\n\n- [ ] Enroll using Fabric CA instead of local CA\n- [ ] Docs for setting up and joining orderers\n- [ ] Admin UI for Peer\n  - [ ] Add detail of the peer + process stats (CPU, memory, requests)\n  - [ ] Add logs\n  - [ ] Add chaincode support\n  - [ ] Add operations: restart, stop, start, upgrade, certificate renewal","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfsoftware%2Fhlf-easy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkfsoftware%2Fhlf-easy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfsoftware%2Fhlf-easy/lists"}