KrypC builds award-winning taXchain for EU tax forms new case study >

Skip to main content
Hyperledger Foundation
search
Menu
  • Learn
    • Case Studies
    • White Papers
    • Training & Certification
    • Training Partners
    • Webinars
    • Research
    • Blockchain Showcase
    • Wiki
  • Use
    • Distributed Ledgers
    • Domain-Specific
    • Libraries
    • Tools
    • Tutorials
    • Hyperledger Certified Service Providers
    • Vendor Directory
  • Participate
    • Collaboration Tools
    • Contribute to Coding
    • Academic Collaboration
    • Find a Meetup
    • Regional Communities
    • Speakers Bureau
    • Join a Community Group
    • Labs
  • Events
  • News
    • Blog
    • Announcements
    • Newsletter
  • About
    • Join Hyperledger
    • Members
    • Leadership
    • Charter
    • Job Board
    • Contact Us
  • Join
  • English
    • 简体中文
    • Português
    • Français
    • Malayalam
    • 日本語
    • Español
  • search
Close Search
Tag

Fablo

Jan 18
Love0

Hyperledger Mentorship Spotlight: Enable Kubernetes Operators support for Fablo

By Great Umegbewe Nwebedu Blog, Hyperledger Fabric, Hyperledger Labs, Hyperledger Mentorship Program

What did you work on?

Project name: Enable Kubernetes Operators support for Fablo

Hello, I’m Great Umegbewe. I am currently a sophomore studying Computer Science at the University of Nigeria, Nsukka. During the fall of 2022, I had the chance to work on Fablo, a Hyperledger Lab, as part of the Hyperledger Mentorship Program. I was mentored by Jakub Dzikowski and Piotr Hejwowski and found the experience to be both valuable and enjoyable. This blog post will share some of my insights from this experience.

Fablo is a simple tool to generate a Hyperledger Fabric blockchain network from a config file and run it on Docker. Its main goal is to provide a super-easy start with Hyperledger Fabric. It uses a declarative approach to define components in a network, in a single file named fablo-config.json. This where users can define channels, chaincodes, organizations and engines (Docker or Kubernetes). Before I came in, only Docker was supported as an engine. I worked on adding support for Kubernetes.

Example of a fablo-config.json file

{
  "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/schema.json",
  "global": {
    "fabricVersion": "2.4.0",
    "tls": false,
    "engine": "kubernetes",
    "peerDevMode": false
  },
  "orgs": [
    {
      "organization": {
        "name": "Orderer",
        "domain": "orderer.example.com"
      },
      "orderers": [
        {
          "groupName": "group1",
          "type": "solo",
          "instances": 1
        }
      ],
      "tools": {}
    },
    {
      "organization": {
        "name": "Org1",
        "domain": "org1.example.com"
      },
      "peer": {
        "instances": 2,
        "db": "LevelDb"
      },
      "tools": {}
    }  ],
  "channels": [
    {
      "name": "my-channel1",
      "orgs": [
        {
          "name": "Org1",
          "peers": [
            "peer0",
            "peer1"
          ]
        }
      ]
    }
  ],
  "chaincodes": [
    {
      "name": "chaincode1",
      "version": "0.0.1",
      "lang": "node",
      "channel": "my-channel1",
      "directory": "./chaincodes/chaincode-kv-node"
    }
  ]
}

What did you learn or accomplish?

Before the mentorship, I had previous experience working with Kubernetes and Bash, but none with Hyperledger Fabric. This mentorship helped me learn about Hyperledger Fabric and its components. It also taught me a whole lot about open source software and how the work of a maintainer isn’t that easy.

Hats off to Jakob Dzikowski and Piotr Hejwowski. They are really amazing maintainers and mentors.

To contribute to Fablo, I needed to learn how Fablo worked and understand Hyperledger Fabric. Again my mentors were very helpful with this.

I initially started by defining the various components on yaml’s with the images of peers, CAs, etc. This worked in one direction, but was daunting and had several problems. Luckily, Hyperledger had a Kubernetes Operator hlf-operator with a kubectl plugin that managed all aspects from the deployments, statefulsets and persistent volumes. With this abstraction what was left is to:

  • Write the shell scripts wrapped around the operator plugin to accommodate the required components (channels, chaincodes, CAs, peers).
  • Add support for Kubernetes engine in the fablo-config.
  • Template the shell scripts.
  • Create a snapshot and unit testing.

What comes next?

This has been a valuable experience. I was really challenged and my skills have improved so much. For the foreseeable future, I will continue working on Fablo and other open source projects. Big thanks to my mentors. Hopefully, I will become a maintainer for Fablo too.

Copyright © 2022 The Linux Foundation®. All rights reserved. Hyperledger Foundation, Hyperledger, and the other Hyperledger Foundation trademarks are trademarks of The Linux Foundation. For a list of Hyperledger Foundation trademarks, please see our Trademark Usage page. Linux is a registered trademark of Linus Torvalds. Privacy Policy and Terms of Use.

Close Menu
  • Learn
    • Case Studies
    • White Papers
    • Training & Certification
    • Training Partners
    • Webinars
    • Research
    • Blockchain Showcase
    • Wiki
  • Use
    • Distributed Ledgers
    • Domain-Specific
    • Libraries
    • Tools
    • Tutorials
    • Hyperledger Certified Service Providers
    • Vendor Directory
  • Participate
    • Collaboration Tools
    • Contribute to Coding
    • Academic Collaboration
    • Find a Meetup
    • Regional Communities
    • Speakers Bureau
    • Join a Community Group
    • Labs
  • Events
  • News
    • Blog
    • Announcements
    • Newsletter
  • About
    • Join Hyperledger
    • Members
    • Leadership
    • Charter
    • Job Board
    • Contact Us
  • Join
  • English
    • 简体中文
    • Português
    • Français
    • Malayalam
    • 日本語
    • Español