mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
added readme
This commit is contained in:
parent
8547618f06
commit
b3d417bc9b
2 changed files with 218 additions and 0 deletions
141
learn/README.md
Normal file
141
learn/README.md
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
# Hyperledger Fabric Mastery Roadmap 🚀
|
||||
|
||||
Welcome to the **Hyperledger Fabric (HLF) Mastery Roadmap**! This guide will take you from **beginner** to **expert**, enabling you to **deploy, modify, debug, and scale an HLF network** like a pro. Follow this **day-wise roadmap** to become proficient in building **production-ready blockchain networks** using Hyperledger Fabric and Golang.
|
||||
|
||||
## 📌 Roadmap Overview
|
||||
|
||||
- **📅 Duration:** 30 Days (Hands-on Learning)
|
||||
- **🚀 Goal:** Build, deploy, and manage a **custom Hyperledger Fabric network**
|
||||
- **⚡ Topics Covered:**
|
||||
- HLF **architecture & internals**
|
||||
- **Network setup & expansion**
|
||||
- Writing & deploying **smart contracts** (Chaincode in Golang)
|
||||
- Managing **organizations, peers, orderers, and channels**
|
||||
- Scaling with **Kubernetes** & **Cloud deployment**
|
||||
- Debugging & **real-world troubleshooting**
|
||||
|
||||
---
|
||||
|
||||
# 🏁 **Phase 1: Foundation (Day 1 - Day 5)**
|
||||
|
||||
### **Day 1: Introduction to Hyperledger Fabric**
|
||||
- 📖 Read about HLF's **architecture & components**
|
||||
- 🎯 Understand **Orderers, Peers, MSPs, Chaincode, Channels**
|
||||
- 📌 Learn about **Transaction Flow** in Fabric
|
||||
- 🔍 Explore **CouchDB vs LevelDB**
|
||||
- ✅ **Deliverable:** Document key concepts in your own words
|
||||
|
||||
### **Day 2: Setting Up a Basic HLF Network**
|
||||
- 🛠 Install **Fabric Binaries & Docker dependencies**
|
||||
- 🔥 Run the **test-network** (`fabric-samples/test-network`)
|
||||
- 🔎 Explore generated **artifacts & logs**
|
||||
- ✅ **Deliverable:** Deploy & teardown the test network
|
||||
|
||||
### **Day 3: Building a Custom Fabric Network (From Scratch)**
|
||||
- 📌 Generate crypto materials using **cryptogen**
|
||||
- 🔧 Configure **configtx.yaml** for multiple organizations
|
||||
- 🚀 Create **orderers & peers** manually using Docker
|
||||
- ✅ **Deliverable:** A minimal custom network with 2 Orgs, 2 Peers, and 1 Orderer
|
||||
|
||||
### **Day 4: Creating & Managing Channels**
|
||||
- 📌 Create a **new channel**
|
||||
- 🔗 Join peers to a channel
|
||||
- 🔄 Fetch and update **channel configurations**
|
||||
- ✅ **Deliverable:** Fully working channel with multiple peers
|
||||
|
||||
### **Day 5: Debugging & Logs**
|
||||
- 📖 Learn to debug using **peer logs** & **orderer logs**
|
||||
- 🔍 Explore **Docker logs** for HLF containers
|
||||
- ✅ **Deliverable:** Identify issues & restart network components
|
||||
|
||||
---
|
||||
|
||||
# 🚀 **Phase 2: Expanding the Network (Day 6 - Day 10)**
|
||||
|
||||
### **Day 6: Adding New Peers & Organizations**
|
||||
- 📌 Create a **new organization**
|
||||
- 🔗 Join it to an **existing network**
|
||||
- ✅ **Deliverable:** New org successfully participating in the network
|
||||
|
||||
### **Day 7: Modifying the Network in Production**
|
||||
- 🛠 Fetch, modify & update **channel configurations** dynamically
|
||||
- ✅ **Deliverable:** Modify and update running network configs
|
||||
|
||||
### **Day 8: Writing & Deploying Chaincode (Smart Contracts in Golang)**
|
||||
- 📜 Write a **basic asset management chaincode**
|
||||
- 🚀 Deploy & interact with the **chaincode using CLI**
|
||||
- ✅ **Deliverable:** Functional chaincode deployed on the network
|
||||
|
||||
### **Day 9: Implementing Private Data Collections (PDCs)**
|
||||
- 🔒 Define **private data** in `collections_config.json`
|
||||
- 🛠 Modify chaincode to use **private transactions**
|
||||
- ✅ **Deliverable:** Secure private transactions in your network
|
||||
|
||||
### **Day 10: Chaincode Development Best Practices**
|
||||
- 🎯 Implement **access control policies**
|
||||
- 🔥 Optimize **chaincode performance & error handling**
|
||||
- ✅ **Deliverable:** Well-structured, optimized chaincode
|
||||
|
||||
---
|
||||
|
||||
# 🌍 **Phase 3: Advanced Fabric Network Operations (Day 11 - Day 20)**
|
||||
|
||||
### **Day 11-12: Chaincode Lifecycle Management**
|
||||
- 📌 Upgrade & manage **chaincode versions**
|
||||
- 🔍 Understand **chaincode endorsement policies**
|
||||
- ✅ **Deliverable:** Upgrade chaincode without network downtime
|
||||
|
||||
### **Day 13-14: Deploying Fabric on Kubernetes**
|
||||
- 📦 Convert **Docker Compose setup** to **K8s manifests**
|
||||
- 🚀 Deploy Fabric network in **Kubernetes cluster**
|
||||
- ✅ **Deliverable:** HLF running in Kubernetes
|
||||
|
||||
### **Day 15-16: Using Hyperledger Fabric SDK in Golang**
|
||||
- 🎯 Connect a **Go application** to Fabric
|
||||
- 🚀 Submit transactions via the **Fabric SDK**
|
||||
- ✅ **Deliverable:** A working **Golang app** interacting with HLF
|
||||
|
||||
### **Day 17-18: Implementing Custom Identity Management**
|
||||
- 🔐 Use **external CA (e.g., HashiCorp Vault)** for identity management
|
||||
- 🔄 Implement **dynamic identity revocation**
|
||||
- ✅ **Deliverable:** Secure identity management in your network
|
||||
|
||||
### **Day 19-20: Debugging & Performance Optimization**
|
||||
- 🔥 Monitor **orderers & peers** using Prometheus + Grafana
|
||||
- 🚀 Optimize **block & transaction processing**
|
||||
- ✅ **Deliverable:** Performance-tuned Fabric network
|
||||
|
||||
---
|
||||
|
||||
# 🏆 **Phase 4: Real-World Production Deployment (Day 21 - Day 30)**
|
||||
|
||||
### **Day 21-22: Deploying Fabric on Cloud (AWS/GCP/Azure)**
|
||||
- 🚀 Use **Managed Kubernetes (EKS, GKE, AKS)**
|
||||
- ✅ **Deliverable:** HLF running in cloud environment
|
||||
|
||||
### **Day 23-24: Implementing CI/CD for Chaincode Deployment**
|
||||
- ⚡ Automate chaincode **deployment & testing**
|
||||
- ✅ **Deliverable:** CI/CD pipeline for HLF chaincode
|
||||
|
||||
### **Day 25-26: Scaling the Fabric Network**
|
||||
- 📌 Add more **orderers & peers** dynamically
|
||||
- ✅ **Deliverable:** Scalable production-ready Fabric network
|
||||
|
||||
### **Day 27-28: Handling Real-World Issues & Debugging**
|
||||
- 🔥 Identify & resolve **common errors**
|
||||
- ✅ **Deliverable:** Documented **troubleshooting guide**
|
||||
|
||||
### **Day 29-30: Final Project - Build a Real-World Use Case**
|
||||
- 🚀 Implement a **real-world decentralized application (DApp)**
|
||||
- ✅ **Deliverable:** Fully working enterprise-level blockchain solution
|
||||
|
||||
---
|
||||
|
||||
## 🎯 **What You’ll Achieve**
|
||||
✅ Deploy & manage **production-ready Hyperledger Fabric networks**
|
||||
✅ Become a **Fabric network architect & smart contract developer**
|
||||
✅ Modify, scale, debug, and optimize HLF networks **at any time**
|
||||
✅ Build **real-world blockchain applications** using Golang & Fabric
|
||||
|
||||
🚀 **Ready? Let’s start!** 🚀
|
||||
|
||||
77
learn/day1/day1.md
Normal file
77
learn/day1/day1.md
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# Hyperledger Fabric Mastery Roadmap
|
||||
|
||||
Welcome to the **Hyperledger Fabric (HLF) Mastery Roadmap**! This guide is designed to take you from beginner to expert in HLF by implementing real-world scenarios.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Day 1: Understanding Hyperledger Fabric & Setting Up the Network
|
||||
|
||||
### 🎯 Objectives:
|
||||
- Understand **Hyperledger Fabric architecture** (Orderers, Peers, MSPs, Channels, Chaincode, CouchDB vs LevelDB, etc.).
|
||||
- Set up a minimal **Fabric network** using `fabric-samples/test-network`.
|
||||
- Deploy a **custom Fabric network** using `cryptogen` and `configtxgen`.
|
||||
|
||||
### 📂 Folder Structure
|
||||
Your repository will have the following structure:
|
||||
```plaintext
|
||||
hlf/
|
||||
├── fabric-samples/ # Fabric sample network
|
||||
├── day1/ # Documentation for Day 1 progress
|
||||
│ ├── day1.md # Steps, commands, and explanations for Day 1
|
||||
│ ├── assets/ # Diagrams or images for understanding HLF
|
||||
```
|
||||
|
||||
### 📖 Learning & Implementation Steps
|
||||
#### 1️⃣ Understanding Hyperledger Fabric Architecture
|
||||
- Read **Fabric Docs**: [Hyperledger Fabric Docs](https://hyperledger-fabric.readthedocs.io/en/latest/)
|
||||
- Key Components:
|
||||
- **Orderers**: Maintain transaction order.
|
||||
- **Peers**: Maintain the ledger and execute chaincode.
|
||||
- **MSP (Membership Service Provider)**: Handles identity & authentication.
|
||||
- **Channels**: Private communication pathways.
|
||||
- **Chaincode**: Smart contracts running on peers.
|
||||
- **Databases**: CouchDB (rich queries) vs LevelDB (key-value store).
|
||||
|
||||
#### 2️⃣ Setting Up Fabric Samples Network
|
||||
- Clone **Fabric Samples** and install prerequisites:
|
||||
```bash
|
||||
git clone https://github.com/hyperledger/fabric-samples.git
|
||||
cd fabric-samples/test-network
|
||||
./network.sh up createChannel -ca
|
||||
```
|
||||
- Verify network:
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
#### 3️⃣ Bootstrapping a Custom Fabric Network
|
||||
- Generate crypto material using **cryptogen**:
|
||||
```bash
|
||||
cryptogen generate --config=./crypto-config.yaml --output=crypto-config/
|
||||
```
|
||||
- Create **configtx.yaml** and generate genesis block:
|
||||
```bash
|
||||
configtxgen -profile OrdererGenesis -channelID sys-channel -outputBlock ./genesis.block
|
||||
```
|
||||
- Start network using Docker Compose:
|
||||
```bash
|
||||
docker-compose -f docker-compose.yaml up -d
|
||||
```
|
||||
- Verify network logs:
|
||||
```bash
|
||||
docker logs peer0.org1.example.com
|
||||
```
|
||||
|
||||
### ✅ Tasks for Day 1
|
||||
✔ Clone **fabric-samples** and explore test network.
|
||||
✔ Understand Fabric network components and configurations.
|
||||
✔ Create `day1.md` and document all steps with issues faced.
|
||||
✔ Bootstrap a **custom Fabric network**.
|
||||
✔ Push updates to GitHub repository under `day1/` folder.
|
||||
|
||||
---
|
||||
|
||||
💡 **Next Steps:** Proceed to **Day 2 - Creating and Managing Channels** 🚀
|
||||
|
||||
Let me know if you need more details! 🎯
|
||||
|
||||
Loading…
Reference in a new issue