feat: Add comprehensive documentation structure with farming, mycelium, and cloud guides
This commit is contained in:
183
docs/farming/buy-node.md
Normal file
183
docs/farming/buy-node.md
Normal file
@@ -0,0 +1,183 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Buy or Build Your Node
|
||||
|
||||
You have two main paths to becoming a ThreeFold farmer: buying a pre-configured node or building your own from hardware you already have or source yourself.
|
||||
|
||||
## Option 1: Buy a Pre-Built Node (Easiest)
|
||||
|
||||
### Why Buy Pre-Built?
|
||||
|
||||
✅ **Plug-and-play** - Arrives ready to farm
|
||||
✅ **Vendor support** - Help when you need it
|
||||
✅ **Optimized hardware** - Tested configurations
|
||||
✅ **Warranty** - Peace of mind
|
||||
✅ **Quick start** - Farming within hours
|
||||
|
||||
### Where to Buy
|
||||
|
||||
Several vendors offer certified ThreeFold nodes:
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
**📦 Node Vendors**
|
||||
|
||||
Check the official ThreeFold channels for current list of certified node providers:
|
||||
- [ThreeFold Shop](https://threefold.io) - Official vendor listings
|
||||
- [Telegram Community](https://t.me/threefoldfarmers) - Vendor recommendations
|
||||
- [Forum Marketplace](https://forum.threefold.io) - Community sales
|
||||
|
||||
</div>
|
||||
|
||||
### What to Look For
|
||||
|
||||
When buying a pre-built node, consider:
|
||||
|
||||
- **Capacity Size** - Storage, RAM, and CPU cores
|
||||
- **Power Efficiency** - Lower electricity costs
|
||||
- **Warranty & Support** - Vendor backing
|
||||
- **Price vs. ROI** - Balance cost with earning potential
|
||||
- **Shipping & Import Fees** - Total landed cost
|
||||
|
||||
### Typical Node Configurations
|
||||
|
||||
**Entry Level (~$500-1000)**
|
||||
- 4-8 CPU cores
|
||||
- 16GB RAM
|
||||
- 500GB-1TB SSD
|
||||
- Low power consumption (~50W)
|
||||
|
||||
**Mid Range (~$1000-2500)**
|
||||
- 8-16 CPU cores
|
||||
- 32-64GB RAM
|
||||
- 1-2TB SSD
|
||||
- Balanced performance (~100W)
|
||||
|
||||
**High Performance (~$2500+)**
|
||||
- 16+ CPU cores
|
||||
- 64-128GB+ RAM
|
||||
- 2TB+ SSD (multi-drive)
|
||||
- Maximum capacity (~150-200W)
|
||||
|
||||
## Option 2: Build Your Own Node
|
||||
|
||||
### Why Build Your Own?
|
||||
|
||||
✅ **Lower cost** - Use existing hardware
|
||||
✅ **Flexibility** - Choose your own specs
|
||||
✅ **Learning experience** - Understand the system
|
||||
✅ **Upgrade existing gear** - Repurpose hardware
|
||||
|
||||
### Hardware Requirements
|
||||
|
||||
**Minimum Configuration:**
|
||||
```
|
||||
CPU: Any 64-bit processor (Intel/AMD)
|
||||
Multi-core recommended (4+ cores)
|
||||
RAM: 8GB minimum (16GB+ recommended)
|
||||
Storage: 500GB SSD minimum (1TB+ recommended)
|
||||
Additional HDDs for more capacity
|
||||
Network: Gigabit Ethernet (wired connection)
|
||||
Boot: USB drive (16GB+) for Zero-OS
|
||||
```
|
||||
|
||||
**Recommended Configuration:**
|
||||
```
|
||||
CPU: Modern multi-core processor (8+ cores)
|
||||
RAM: 32GB+ for better capacity utilization
|
||||
Storage: 1TB+ NVMe SSD for high-performance
|
||||
Additional SSDs or HDDs for capacity
|
||||
Network: Gigabit Ethernet (1Gbps+)
|
||||
Power: Efficient PSU (80+ certified)
|
||||
```
|
||||
|
||||
### Compatible Hardware
|
||||
|
||||
**Processors:**
|
||||
- Intel Core i5/i7/i9 (6th gen or newer)
|
||||
- AMD Ryzen 5/7/9
|
||||
- Intel Xeon
|
||||
- AMD EPYC (for larger deployments)
|
||||
|
||||
**Storage:**
|
||||
- Any SATA/NVMe SSD
|
||||
- HDDs for additional capacity
|
||||
- RAID controllers supported
|
||||
|
||||
**Network:**
|
||||
- Standard Ethernet adapters
|
||||
- Wired connection strongly recommended
|
||||
|
||||
### Where to Source Hardware
|
||||
|
||||
- **Repurpose** - Old servers or workstations
|
||||
- **Consumer Market** - Build from PC components
|
||||
- **Used Enterprise** - eBay, server resellers
|
||||
- **Local Dealers** - Computer hardware stores
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 💡 Pro Tip
|
||||
|
||||
Old enterprise servers (Dell PowerEdge, HP ProLiant) can make excellent farming nodes at low cost. Check eBay and local liquidators.
|
||||
|
||||
</div>
|
||||
|
||||
## Cost Considerations
|
||||
|
||||
### Initial Investment
|
||||
|
||||
| Item | Pre-Built | DIY |
|
||||
|------|-----------|-----|
|
||||
| Hardware | $500-3000+ | $200-2000+ |
|
||||
| Setup Time | 1-2 hours | 2-8 hours |
|
||||
| Technical Skill | Minimal | Moderate |
|
||||
| Support | Vendor | Community |
|
||||
|
||||
### Operating Costs
|
||||
|
||||
**Monthly expenses to factor in:**
|
||||
|
||||
- ⚡ **Electricity** - Varies by location and node size
|
||||
- Small node (~50W): $5-15/month
|
||||
- Medium node (~100W): $10-30/month
|
||||
- Large node (~200W): $20-60/month
|
||||
|
||||
- 🌐 **Internet** - Usually existing connection
|
||||
- Recommend dedicated connection for serious farming
|
||||
- Business-grade for maximum uptime
|
||||
|
||||
- 🔧 **Maintenance** - Occasional hardware replacement
|
||||
- Budget for failed drives, power supplies
|
||||
- Usually minimal with quality hardware
|
||||
|
||||
## Making Your Decision
|
||||
|
||||
### Choose Pre-Built If:
|
||||
|
||||
- 👍 You want the easiest path
|
||||
- 👍 You value vendor support
|
||||
- 👍 You prefer plug-and-play
|
||||
- 👍 Time is more valuable than cost savings
|
||||
|
||||
### Choose DIY If:
|
||||
|
||||
- 👍 You have existing hardware
|
||||
- 👍 You enjoy technical projects
|
||||
- 👍 You want to minimize costs
|
||||
- 👍 You're comfortable with system building
|
||||
|
||||
## What's Next?
|
||||
|
||||
Once you have your hardware (or know what you'll buy), move on to:
|
||||
|
||||
**[Setup Your Node](/farming/setup)** - Configure and connect to the grid
|
||||
|
||||
---
|
||||
|
||||
:::tip Need Help Deciding?
|
||||
|
||||
Ask the community! The [ThreeFold Telegram](https://t.me/threefoldfarmers) has experienced farmers who can help you choose the right option for your situation.
|
||||
:::
|
101
docs/farming/overview.md
Normal file
101
docs/farming/overview.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# What is ThreeFold Farming?
|
||||
|
||||
ThreeFold Farming lets you contribute to the decentralized internet while earning rewards for providing storage, compute, and network capacity.
|
||||
|
||||
## How It Works
|
||||
|
||||
As a **ThreeFold Farmer**, you:
|
||||
|
||||
1. **Deploy a Node (3Node)** - Connect standard server hardware to the ThreeFold Grid
|
||||
2. **Run Zero-OS** - Our self-healing operating system manages everything automatically
|
||||
3. **Provide Capacity** - Your node offers storage, compute, and network resources
|
||||
4. **Earn Rewards** - Get compensated for capacity and utilization
|
||||
|
||||
## Why Become a Farmer?
|
||||
|
||||
### 🌱 Simple & Autonomous
|
||||
|
||||
- Deploy once and let it run
|
||||
- Minimal maintenance required
|
||||
- Self-healing Zero-OS handles operations
|
||||
- No complex system administration needed
|
||||
|
||||
### 💰 Multiple Revenue Streams
|
||||
|
||||
- **Capacity Rewards** - Earn for available resources
|
||||
- **Utilization Rewards** - Earn when your capacity is used
|
||||
- **Growing Demand** - More workloads = more income potential
|
||||
|
||||
### 🌍 Make an Impact
|
||||
|
||||
- Support a decentralized internet infrastructure
|
||||
- Provide alternatives to centralized cloud providers
|
||||
- Contribute to digital sovereignty and data privacy
|
||||
- Build the peer-to-peer internet of the future
|
||||
|
||||
## What You Need
|
||||
|
||||
### Hardware Requirements
|
||||
|
||||
**Minimum Specs:**
|
||||
- Modern server or workstation
|
||||
- Multi-core processor (4+ cores recommended)
|
||||
- 8GB+ RAM (16GB+ recommended)
|
||||
- 500GB+ SSD storage
|
||||
- Reliable network connection
|
||||
|
||||
**OR Buy a Pre-Built Node:**
|
||||
- Various vendors offer ready-to-deploy 3Nodes
|
||||
- Plug-and-play solution for easy entry
|
||||
- Professional support available
|
||||
|
||||
### Other Requirements
|
||||
|
||||
- ⚡ Reliable power supply
|
||||
- 🌐 Stable internet connection (wired recommended)
|
||||
- 📍 Physical space for hardware
|
||||
- 🔧 Basic technical comfort (if building your own)
|
||||
|
||||
## Getting Started
|
||||
|
||||
Ready to become a farmer? Here's your path:
|
||||
|
||||
1. **[Buy or Build a Node](/farming/buy-node)** - Choose your hardware option
|
||||
2. **[Set Up Your Node](/farming/setup)** - Get your 3Node connected to the grid
|
||||
3. **Monitor & Earn** - Track your node via the ThreeFold Dashboard
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 💡 First Time?
|
||||
|
||||
Start with a pre-built node from a trusted vendor. This gives you the easiest path to farming while you learn the ecosystem.
|
||||
|
||||
</div>
|
||||
|
||||
## The Farmer Journey
|
||||
|
||||
ThreeFold farmers have been the backbone of the grid for years. You'll join a global community of:
|
||||
|
||||
- Individual enthusiasts running nodes at home
|
||||
- Small businesses providing local capacity
|
||||
- Data center operators scaling infrastructure
|
||||
- Community initiatives building regional networks
|
||||
|
||||
Every farmer plays a vital role in creating a truly decentralized internet.
|
||||
|
||||
## Resources
|
||||
|
||||
- **Dashboard**: [dashboard.grid.tf](https://dashboard.grid.tf) - Manage your farm
|
||||
- **Manual**: [manual.grid.tf/farmers](https://manual.grid.tf/farmers) - Detailed technical docs
|
||||
- **Community**: [t.me/threefoldfarmers](https://t.me/threefoldfarmers) - Get help from farmers
|
||||
- **Forum**: [forum.threefold.io](https://forum.threefold.io) - Discussions and updates
|
||||
|
||||
---
|
||||
|
||||
:::tip Next Step
|
||||
Ready to get your node? Check out **[Buy or Build a Node](/farming/buy-node)** to explore your options.
|
||||
:::
|
229
docs/farming/setup.md
Normal file
229
docs/farming/setup.md
Normal file
@@ -0,0 +1,229 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Set Up Your Node
|
||||
|
||||
This guide walks you through the basic steps to get your 3Node connected to the ThreeFold Grid and start farming.
|
||||
|
||||
## Overview
|
||||
|
||||
Setting up a node involves:
|
||||
|
||||
1. Creating a ThreeFold account
|
||||
2. Creating a farm on the dashboard
|
||||
3. Downloading and booting Zero-OS
|
||||
4. Verifying your node is online
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you begin:
|
||||
|
||||
- ✅ Hardware ready (purchased or built)
|
||||
- ✅ Reliable network connection (wired Ethernet)
|
||||
- ✅ Power supply connected
|
||||
- ✅ USB drive (16GB+) for Zero-OS boot image
|
||||
|
||||
## Step 1: Create Your ThreeFold Account
|
||||
|
||||
### Get a Wallet
|
||||
|
||||
You'll need a ThreeFold Connect wallet:
|
||||
|
||||
1. Download **ThreeFold Connect** app:
|
||||
- iOS: [App Store](https://apps.apple.com)
|
||||
- Android: [Google Play](https://play.google.com)
|
||||
|
||||
2. Create a new account
|
||||
3. **Save your seed phrase securely** - This is critical!
|
||||
4. Complete the setup wizard
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 🔐 Security Warning
|
||||
|
||||
Your seed phrase is the **only** way to recover your account. Write it down and store it safely offline. Never share it with anyone.
|
||||
|
||||
</div>
|
||||
|
||||
## Step 2: Create Your Farm
|
||||
|
||||
### Access the Dashboard
|
||||
|
||||
1. Go to [dashboard.grid.tf](https://dashboard.grid.tf)
|
||||
2. Connect with your ThreeFold Connect wallet
|
||||
3. Select the appropriate network (usually **mainnet**)
|
||||
|
||||
### Register Your Farm
|
||||
|
||||
1. Navigate to **Farms** section
|
||||
2. Click **Create Farm**
|
||||
3. Fill in farm details:
|
||||
- **Farm Name** - Choose a unique name
|
||||
- **Pricing Policy** - Usually default is fine
|
||||
- **Certification** - Select appropriate level
|
||||
4. Save your farm
|
||||
|
||||
You'll receive a **Farm ID** - save this number, you'll need it for the next step.
|
||||
|
||||
## Step 3: Download Zero-OS
|
||||
|
||||
### Create Boot Image
|
||||
|
||||
1. In the dashboard, go to your farm
|
||||
2. Click **Bootstrap Image**
|
||||
3. Select options:
|
||||
- **Network**: Choose your network interface
|
||||
- **Format**: USB or ISO (USB for most cases)
|
||||
4. Download the image
|
||||
|
||||
The image is customized with your Farm ID, so your node will automatically connect to your farm.
|
||||
|
||||
### Write to USB Drive
|
||||
|
||||
**On Linux/Mac:**
|
||||
```bash
|
||||
# Find your USB device
|
||||
lsblk
|
||||
|
||||
# Write the image (replace /dev/sdX with your USB device)
|
||||
sudo dd if=zero-os-farm-XXXX.img of=/dev/sdX bs=4M status=progress
|
||||
sync
|
||||
```
|
||||
|
||||
**On Windows:**
|
||||
- Use [Rufus](https://rufus.ie/) or [balenaEtcher](https://www.balena.io/etcher/)
|
||||
- Select the downloaded image
|
||||
- Select your USB drive
|
||||
- Click Write/Flash
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### ⚠️ Warning
|
||||
|
||||
Double-check you're writing to the correct device. The dd command will overwrite whatever device you specify!
|
||||
|
||||
</div>
|
||||
|
||||
## Step 4: Boot Your Node
|
||||
|
||||
### BIOS/UEFI Configuration
|
||||
|
||||
Before first boot, configure your node's BIOS:
|
||||
|
||||
1. **Boot Order**
|
||||
- Set USB as first boot device
|
||||
- Enable boot from USB
|
||||
|
||||
2. **Virtualization**
|
||||
- Enable Intel VT-x / AMD-V
|
||||
- Enable VT-d / AMD-Vi (if available)
|
||||
|
||||
3. **Network Boot** (optional)
|
||||
- Can enable PXE for future use
|
||||
- Not required for USB boot
|
||||
|
||||
4. **Power Management**
|
||||
- Disable deep sleep modes
|
||||
- Enable "restore on AC/power loss" for automatic recovery
|
||||
|
||||
### First Boot
|
||||
|
||||
1. Insert the USB drive with Zero-OS
|
||||
2. Power on the node
|
||||
3. Select USB boot (or it should auto-boot)
|
||||
4. Zero-OS will start loading
|
||||
|
||||
**What to expect:**
|
||||
- Initial boot takes 2-5 minutes
|
||||
- Node will download latest Zero-OS version
|
||||
- Screen will show node information
|
||||
- After setup, displays Farm ID and Node ID
|
||||
|
||||
## Step 5: Verify Your Node
|
||||
|
||||
### Check Dashboard
|
||||
|
||||
1. Go to [dashboard.grid.tf](https://dashboard.grid.tf)
|
||||
2. Navigate to your Farm
|
||||
3. You should see your node listed
|
||||
4. Check status shows **Online**
|
||||
|
||||
### Node Information
|
||||
|
||||
Your node displays:
|
||||
- **Node ID** - Unique identifier
|
||||
- **Farm ID** - Your farm
|
||||
- **Status** - Should be "Up"
|
||||
- **Resources** - CPU, RAM, Storage capacity
|
||||
- **Uptime** - Connection time
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Node not appearing?**
|
||||
- Wait 5-10 minutes for initial sync
|
||||
- Check network cable connection
|
||||
- Verify farm ID on boot screen matches dashboard
|
||||
- Check firewall isn't blocking connections
|
||||
|
||||
**Node shows offline?**
|
||||
- Check power and network
|
||||
- Verify BIOS settings
|
||||
- Ensure USB drive is properly inserted
|
||||
- Check Zero-OS boot logs on screen
|
||||
|
||||
## Step 6: Monitor & Maintain
|
||||
|
||||
### Regular Monitoring
|
||||
|
||||
Check your node periodically via the dashboard:
|
||||
- Uptime percentage
|
||||
- Capacity utilization
|
||||
- Rewards accumulation
|
||||
- Network connectivity
|
||||
|
||||
### Maintenance Tasks
|
||||
|
||||
**Monthly:**
|
||||
- Verify node is online
|
||||
- Check reward accumulation
|
||||
- Monitor uptime statistics
|
||||
|
||||
**As Needed:**
|
||||
- Update Zero-OS (usually automatic)
|
||||
- Replace failed drives
|
||||
- Clean dust from hardware
|
||||
- Verify network connectivity
|
||||
|
||||
### Maximize Uptime
|
||||
|
||||
For best rewards:
|
||||
- Keep node powered 24/7
|
||||
- Use reliable network connection
|
||||
- Monitor for hardware issues
|
||||
- Join farmer community for alerts
|
||||
|
||||
## What's Next?
|
||||
|
||||
🎉 **Congratulations!** Your node is now farming on the ThreeFold Grid.
|
||||
|
||||
### Advanced Topics
|
||||
|
||||
For more details, check the advanced manual:
|
||||
- Multiple node management
|
||||
- Advanced networking setup
|
||||
- GPU farming
|
||||
- Farmerbot automation
|
||||
|
||||
**Resources:**
|
||||
- [Manual](https://manual.grid.tf/farmers) - Comprehensive farming guide
|
||||
- [Dashboard](https://dashboard.grid.tf) - Manage your farm
|
||||
- [Telegram](https://t.me/threefoldfarmers) - Community support
|
||||
- [Forum](https://forum.threefold.io) - Discussions and updates
|
||||
|
||||
---
|
||||
|
||||
:::tip Growing Your Farm
|
||||
|
||||
Once you're comfortable with one node, you can add more nodes to your farm to increase capacity and earning potential!
|
||||
:::
|
98
docs/intro.md
Normal file
98
docs/intro.md
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
slug: /
|
||||
---
|
||||
|
||||
# Welcome to ThreeFold
|
||||
|
||||
Welcome to your **gateway to ThreeFold** - a decentralized, sustainable internet platform built by and for the people.
|
||||
|
||||
We're not a typical Web3 project. We're not here to chase hype or speculation. We are here to **build a better internet** — one that's truly decentralized, sustainable, and owned by its users.
|
||||
|
||||
## What You'll Do Here
|
||||
|
||||
This guide will help you:
|
||||
|
||||
1. **🌾 Become a Farmer** - Deploy a node and earn rewards for contributing capacity
|
||||
2. **🔗 Use Mycelium Network** - Connect your devices securely with our IPv6 overlay network
|
||||
3. **☁️ Deploy on Mycelium Cloud** - Run Kubernetes clusters on the decentralized ThreeFold Grid
|
||||
|
||||
## Why ThreeFold?
|
||||
|
||||
### Real Technology, Real Impact
|
||||
|
||||
- **7+ years** of development - this is not vaporware
|
||||
- **Open-source** technology you can verify: [threefold.info/tech](https://threefold.info/tech)
|
||||
- **Working infrastructure** serving real workloads today
|
||||
- **Decentralized cloud** that empowers individuals and communities
|
||||
|
||||
### Sustainable Economics
|
||||
|
||||
- **1 billion token** fixed supply
|
||||
- **10% of all revenue burned** - making TFT scarcer over time
|
||||
- **Dual-token model**: TFT (tradable) + Cloud Credits (stable utility)
|
||||
- **Real product adoption**, not promises
|
||||
|
||||
### Our Mission
|
||||
|
||||
We're building a decentralized cloud infrastructure that:
|
||||
|
||||
- Protects user privacy and data sovereignty
|
||||
- Reduces environmental impact through efficient hardware use
|
||||
- Empowers communities with local compute and storage
|
||||
- Creates economic opportunities for infrastructure providers (farmers)
|
||||
|
||||
## Getting Started
|
||||
|
||||
Choose your path:
|
||||
|
||||
<div className="cta-box">
|
||||
|
||||
### 🚀 Ready to Join?
|
||||
|
||||
<div className="cta-links">
|
||||
<a href="/farming/overview" className="cta-link">🌾 Start Farming</a>
|
||||
<a href="/mycelium-network/overview" className="cta-link">🔗 Install Mycelium</a>
|
||||
<a href="/mycelium-cloud/overview" className="cta-link">☁️ Deploy Cloud</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## What Makes Us Different
|
||||
|
||||
### We Acknowledge Reality
|
||||
|
||||
- The current TFT token doesn't yet fully reflect our long-term vision
|
||||
- Building a real decentralized cloud from scratch takes time
|
||||
- We're now in the final stages of **TFGrid 4.0**
|
||||
|
||||
### We're Committed to Success
|
||||
|
||||
- **Launch of TFGrid 4.0**: Q1 2026
|
||||
- **Target**: Over 1 million nodes within 5 years
|
||||
- **Partnerships** with enterprises and governments who share our mission
|
||||
- **Continuous improvement** in communication, documentation, and community support
|
||||
|
||||
### What We Don't Promise
|
||||
|
||||
- ❌ No "get rich quick" schemes
|
||||
- ❌ No guaranteed CEX listings
|
||||
- ❌ No hype - just real products solving real problems
|
||||
- ✅ We'll make mistakes - but we'll learn, improve, and persist
|
||||
|
||||
## Community
|
||||
|
||||
Join thousands of ThreeFold farmers and users:
|
||||
|
||||
- **💬 Telegram**: [t.me/threefoldfarmers](https://t.me/threefoldfarmers)
|
||||
- **💬 Forum**: [forum.threefold.io](https://forum.threefold.io)
|
||||
- **📞 Community Calls**: [bit.ly/tfcommunitycall](https://bit.ly/tfcommunitycall)
|
||||
|
||||
---
|
||||
|
||||
**With gratitude,**
|
||||
The ThreeFold Team
|
||||
|
||||
:::tip Next Steps
|
||||
Start with [Farming](/farming/overview) to deploy your first node, or jump to [Mycelium Network](/mycelium-network/overview) to connect your devices.
|
||||
:::
|
340
docs/mycelium-cloud/getting-started.md
Normal file
340
docs/mycelium-cloud/getting-started.md
Normal file
@@ -0,0 +1,340 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Getting Started with Mycelium Cloud
|
||||
|
||||
Deploy your first Kubernetes cluster on the ThreeFold Grid in just a few steps.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you begin, make sure you have:
|
||||
|
||||
- ✅ **Mycelium installed** - Required for cluster access ([Installation guide](/mycelium-network/install))
|
||||
- ✅ **SSH key pair** - For node access
|
||||
- ✅ **kubectl installed** - For managing your cluster ([Install kubectl](https://kubernetes.io/docs/tasks/tools/))
|
||||
- ✅ **Credits** - To fund your deployment
|
||||
|
||||
## Step 1: Create Your Account
|
||||
|
||||
### Sign Up
|
||||
|
||||
1. Go to [vdc.grid.tf/sign-up](https://vdc.grid.tf/sign-up)
|
||||
2. Fill in your details:
|
||||
- Email address
|
||||
- Password
|
||||
- Confirm password
|
||||
3. Click **Sign Up**
|
||||
|
||||
### Verify Email
|
||||
|
||||
1. Check your email inbox
|
||||
2. Click the verification link
|
||||
3. Your account is now active
|
||||
|
||||
## Step 2: Set Up Your Account
|
||||
|
||||
### Add Credits
|
||||
|
||||
1. Log in to your dashboard
|
||||
2. Navigate to **Credits** or **Billing** section
|
||||
3. Add funds to your account
|
||||
- Choose payment method
|
||||
- Enter amount
|
||||
- Complete payment
|
||||
|
||||
Your credits will be used to pay for cluster resources (CPU, RAM, storage, time).
|
||||
|
||||
### Add SSH Key
|
||||
|
||||
1. Navigate to **SSH Keys** section (or **Add SSH** card)
|
||||
2. Click **Add SSH Key**
|
||||
3. Paste your **public key** (usually `~/.ssh/id_rsa.pub`)
|
||||
4. Give it a name
|
||||
5. Save
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 🔐 Need an SSH Key?
|
||||
|
||||
If you don't have one:
|
||||
|
||||
```bash
|
||||
# Generate a new SSH key pair
|
||||
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
||||
|
||||
# View your public key
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
|
||||
Copy the output and paste it into the dashboard.
|
||||
|
||||
</div>
|
||||
|
||||
## Step 3: Deploy Your First Cluster
|
||||
|
||||
### Access Deployment Page
|
||||
|
||||
1. From your dashboard, click **Deploy Cluster** or **New Cluster**
|
||||
2. You'll see the cluster configuration wizard
|
||||
|
||||
### Configure Your Cluster
|
||||
|
||||
#### Basic Settings
|
||||
|
||||
- **Cluster Name**: Give your cluster a unique name
|
||||
- **Description**: Optional description of the cluster purpose
|
||||
|
||||
#### Master Nodes
|
||||
|
||||
Configure your control plane nodes:
|
||||
|
||||
- **Count**: Number of master nodes
|
||||
- 1 for development/testing
|
||||
- 3 for production (high availability)
|
||||
- **CPU**: Number of cores per master (2-4 recommended)
|
||||
- **RAM**: Memory per master (4-8GB recommended)
|
||||
- **Storage**: Disk space per master (20-50GB)
|
||||
|
||||
#### Worker Nodes
|
||||
|
||||
Configure your workload nodes:
|
||||
|
||||
- **Count**: Number of worker nodes (1-10+)
|
||||
- **CPU**: Cores per worker (based on workload)
|
||||
- **RAM**: Memory per worker (based on workload)
|
||||
- **Storage**: Disk space per worker (based on workload)
|
||||
|
||||
**Example Configuration (Starter):**
|
||||
```
|
||||
Masters: 1 node (2 CPU, 4GB RAM, 25GB storage)
|
||||
Workers: 2 nodes (2 CPU, 4GB RAM, 50GB storage each)
|
||||
```
|
||||
|
||||
### Select Nodes
|
||||
|
||||
1. The system will show available ThreeFold Grid nodes
|
||||
2. Select nodes for your deployment
|
||||
- Choose based on location, specs, and availability
|
||||
- System may auto-select optimal nodes
|
||||
3. Review your selections
|
||||
|
||||
### Review & Deploy
|
||||
|
||||
1. Review your configuration:
|
||||
- Node counts and specs
|
||||
- Selected grid nodes
|
||||
- Estimated cost
|
||||
2. Confirm you have sufficient credits
|
||||
3. Click **Deploy**
|
||||
|
||||
The deployment process will begin. This typically takes 5-15 minutes.
|
||||
|
||||
## Step 4: Access Your Cluster
|
||||
|
||||
Once deployed, you can access your cluster in two ways: kubectl and SSH.
|
||||
|
||||
### Method 1: kubectl Access
|
||||
|
||||
#### Download kubeconfig
|
||||
|
||||
1. Go to **Dashboard** → **Clusters**
|
||||
2. Find your cluster
|
||||
3. Click the download icon (⬇️) or **Get Config**
|
||||
4. Save the file (e.g., `mycluster-config.yaml`)
|
||||
|
||||
#### Configure kubectl
|
||||
|
||||
```bash
|
||||
# Set kubeconfig for this session
|
||||
export KUBECONFIG=/path/to/mycluster-config.yaml
|
||||
|
||||
# Or copy to default location
|
||||
mkdir -p ~/.kube
|
||||
cp mycluster-config.yaml ~/.kube/config
|
||||
|
||||
# Test connection
|
||||
kubectl get nodes
|
||||
```
|
||||
|
||||
You should see your cluster nodes listed!
|
||||
|
||||
```
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
master-1 Ready control-plane,master 10m v1.26.0+k3s1
|
||||
worker-1 Ready <none> 9m v1.26.0+k3s1
|
||||
worker-2 Ready <none> 9m v1.26.0+k3s1
|
||||
```
|
||||
|
||||
### Method 2: SSH Access
|
||||
|
||||
#### Start Mycelium
|
||||
|
||||
If not already running, start Mycelium on your local machine:
|
||||
|
||||
```bash
|
||||
sudo mycelium --peers \
|
||||
tcp://188.40.132.242:9651 \
|
||||
quic://185.69.166.8:9651 \
|
||||
tcp://185.69.166.7:9651 \
|
||||
quic://65.21.231.58:9651
|
||||
```
|
||||
|
||||
#### Get Node IPs
|
||||
|
||||
From your dashboard:
|
||||
1. Go to your cluster details
|
||||
2. Find the **Mycelium IPs** for each node
|
||||
3. Note them down (e.g., `400:1234:5678:abcd::1`)
|
||||
|
||||
#### SSH to Nodes
|
||||
|
||||
```bash
|
||||
# SSH to master node
|
||||
ssh root@400:1234:5678:abcd::1
|
||||
|
||||
# SSH to worker node
|
||||
ssh root@400:1234:5678:abcd::2
|
||||
```
|
||||
|
||||
You're now connected to your cluster node!
|
||||
|
||||
## Step 5: Deploy Your First Application
|
||||
|
||||
Let's deploy a simple web application to test your cluster.
|
||||
|
||||
### Create a Deployment
|
||||
|
||||
```bash
|
||||
# Create an nginx deployment
|
||||
kubectl create deployment hello-web --image=nginx:latest
|
||||
|
||||
# Check deployment status
|
||||
kubectl get deployments
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
### Expose the Service
|
||||
|
||||
```bash
|
||||
# Expose as a service
|
||||
kubectl expose deployment hello-web --port=80 --type=ClusterIP
|
||||
|
||||
# Check service
|
||||
kubectl get services
|
||||
```
|
||||
|
||||
### Access the Service
|
||||
|
||||
```bash
|
||||
# Port forward to your local machine
|
||||
kubectl port-forward service/hello-web 8080:80
|
||||
```
|
||||
|
||||
Open `http://localhost:8080` in your browser. You should see the nginx welcome page!
|
||||
|
||||
## Step 6: Monitor Your Cluster
|
||||
|
||||
### Using Dashboard
|
||||
|
||||
Your Mycelium Cloud dashboard shows:
|
||||
- Cluster status (running, stopped, etc.)
|
||||
- Resource usage
|
||||
- Cost tracking
|
||||
- Node health
|
||||
|
||||
### Using kubectl
|
||||
|
||||
```bash
|
||||
# View cluster info
|
||||
kubectl cluster-info
|
||||
|
||||
# Check node status
|
||||
kubectl get nodes
|
||||
|
||||
# View all resources
|
||||
kubectl get all --all-namespaces
|
||||
|
||||
# Check cluster events
|
||||
kubectl get events
|
||||
```
|
||||
|
||||
## Managing Your Cluster
|
||||
|
||||
### Scale Workers
|
||||
|
||||
Add more worker nodes:
|
||||
1. Go to cluster details in dashboard
|
||||
2. Click **Scale** or **Add Nodes**
|
||||
3. Configure new worker nodes
|
||||
4. Deploy
|
||||
|
||||
### Delete Resources
|
||||
|
||||
```bash
|
||||
# Delete the test deployment
|
||||
kubectl delete deployment hello-web
|
||||
kubectl delete service hello-web
|
||||
```
|
||||
|
||||
### Stop/Start Cluster
|
||||
|
||||
From the dashboard:
|
||||
- **Stop**: Pause cluster (saves costs)
|
||||
- **Start**: Resume cluster
|
||||
- **Delete**: Permanently remove (frees all resources)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Can't Connect with kubectl
|
||||
|
||||
1. **Check kubeconfig**: Ensure KUBECONFIG is set correctly
|
||||
2. **Verify Mycelium**: Make sure Mycelium is running
|
||||
3. **Check cluster status**: Ensure cluster is running in dashboard
|
||||
4. **Test network**: Try pinging cluster nodes via Mycelium IPs
|
||||
|
||||
```bash
|
||||
# Test Mycelium connectivity
|
||||
ping6 <cluster-node-mycelium-ip>
|
||||
```
|
||||
|
||||
### Can't SSH to Nodes
|
||||
|
||||
1. **Mycelium running**: Ensure Mycelium daemon is active
|
||||
2. **SSH key added**: Verify your public key is in dashboard
|
||||
3. **Correct IP**: Double-check Mycelium IP from dashboard
|
||||
4. **Network access**: Test with `ping6` first
|
||||
|
||||
### Pods Not Starting
|
||||
|
||||
```bash
|
||||
# Check pod status
|
||||
kubectl describe pod <pod-name>
|
||||
|
||||
# Check node resources
|
||||
kubectl top nodes
|
||||
|
||||
# Check events
|
||||
kubectl get events --sort-by='.lastTimestamp'
|
||||
```
|
||||
|
||||
## What's Next?
|
||||
|
||||
Now that you have a cluster running, explore more:
|
||||
|
||||
- **[Tutorial](/mycelium-cloud/tutorial)** - Deploy real applications
|
||||
- **[Kubernetes Concepts](https://codescalers.github.io/www_kubecloud/kubernetes-concepts)** - Learn K8s fundamentals
|
||||
- **[FAQ](https://codescalers.github.io/www_kubecloud/faq)** - Common questions
|
||||
|
||||
## Resources
|
||||
|
||||
- **Dashboard**: [vdc.grid.tf](https://vdc.grid.tf)
|
||||
- **Kubernetes Docs**: [kubernetes.io/docs](https://kubernetes.io/docs/)
|
||||
- **kubectl Cheat Sheet**: [kubernetes.io/docs/reference/kubectl/cheatsheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)
|
||||
- **Community**: [Telegram](https://t.me/threefoldfarmers)
|
||||
|
||||
---
|
||||
|
||||
:::tip Cluster Running Successfully?
|
||||
Great! Now try the **[Tutorial](/mycelium-cloud/tutorial)** to deploy more complex applications.
|
||||
:::
|
195
docs/mycelium-cloud/overview.md
Normal file
195
docs/mycelium-cloud/overview.md
Normal file
@@ -0,0 +1,195 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# What is Mycelium Cloud?
|
||||
|
||||
Mycelium Cloud lets you deploy and manage **Kubernetes clusters** on the decentralized ThreeFold Grid infrastructure.
|
||||
|
||||
Run your containerized workloads on distributed, cost-effective infrastructure with built-in security and global availability.
|
||||
|
||||
## How It Works
|
||||
|
||||
Mycelium Cloud provides a complete platform for cloud-native applications:
|
||||
|
||||
1. **Sign up** for an account
|
||||
2. **Add credits** to fund your deployments
|
||||
3. **Deploy clusters** with custom configurations
|
||||
4. **Manage workloads** using standard Kubernetes tools
|
||||
|
||||
All running on the ThreeFold Grid's decentralized infrastructure.
|
||||
|
||||
## Why Use Mycelium Cloud?
|
||||
|
||||
### 🌍 Decentralized Infrastructure
|
||||
|
||||
- Deploy on ThreeFold Grid's distributed network
|
||||
- No dependency on centralized cloud providers
|
||||
- Global node distribution
|
||||
- True infrastructure sovereignty
|
||||
|
||||
### 📦 Full Kubernetes Management
|
||||
|
||||
- **K3s clusters** - Lightweight, production-ready Kubernetes
|
||||
- **Multi-master support** - High availability configurations
|
||||
- **Standard tooling** - Use kubectl, Helm, and your favorite tools
|
||||
- **Complete control** - Full cluster access
|
||||
|
||||
### 🔐 Secure by Default
|
||||
|
||||
- **Mycelium networking** - Encrypted peer-to-peer connections
|
||||
- **No public IPs needed** - Access via Mycelium overlay network
|
||||
- **End-to-end encryption** - All traffic secured
|
||||
- **Private by design** - Your infrastructure, your control
|
||||
|
||||
### 💰 Cost Effective
|
||||
|
||||
- **Competitive pricing** on decentralized infrastructure
|
||||
- **Pay for what you use** - Flexible resource allocation
|
||||
- **No vendor lock-in** - Standard Kubernetes portability
|
||||
- **Global availability** - Deploy where you need
|
||||
|
||||
## Key Features
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **K3s Kubernetes** | Lightweight, certified Kubernetes distribution |
|
||||
| **Mycelium Networking** | IPv6 overlay with encrypted P2P connections |
|
||||
| **High Availability** | Multi-master clusters for production workloads |
|
||||
| **Global Nodes** | Deploy across worldwide ThreeFold Grid locations |
|
||||
| **Standard APIs** | Use kubectl, Helm, and all Kubernetes tools |
|
||||
| **Web Dashboard** | Manage clusters through intuitive UI |
|
||||
| **SSH Access** | Direct node access for debugging and management |
|
||||
| **Flexible Sizing** | Custom CPU, RAM, and storage configurations |
|
||||
|
||||
## Architecture
|
||||
|
||||
Mycelium Cloud uses peer-to-peer networking for direct access:
|
||||
|
||||
```
|
||||
┌────────────────┐
|
||||
│ Your Machine │
|
||||
│ (kubectl) │
|
||||
└───────┬────────┘
|
||||
│
|
||||
│ Mycelium Network
|
||||
│ (encrypted P2P)
|
||||
│
|
||||
┌───────▼────────────────────────────────┐
|
||||
│ Kubernetes Cluster │
|
||||
│ ┌──────────┐ ┌──────────┐ │
|
||||
│ │ Master │ │ Worker │ │
|
||||
│ │ Node │ │ Node │ ... │
|
||||
│ └──────────┘ └──────────┘ │
|
||||
└────────────────────────────────────────┘
|
||||
ThreeFold Grid Infrastructure
|
||||
```
|
||||
|
||||
**Network Flow:**
|
||||
- Your machine connects via Mycelium network
|
||||
- Each cluster node has unique Mycelium IPv6 address
|
||||
- All communication encrypted end-to-end
|
||||
- Direct node access - no gateways or proxies
|
||||
|
||||
## Common Use Cases
|
||||
|
||||
### Development & Testing
|
||||
|
||||
- Spin up test clusters quickly
|
||||
- Experiment with Kubernetes features
|
||||
- CI/CD pipeline testing
|
||||
- Multi-environment development
|
||||
|
||||
### Production Workloads
|
||||
|
||||
- Web applications and APIs
|
||||
- Microservices architectures
|
||||
- Databases and stateful services
|
||||
- Background processing jobs
|
||||
|
||||
### Decentralized Applications
|
||||
|
||||
- P2P services
|
||||
- Distributed computing
|
||||
- Edge computing deployments
|
||||
- Privacy-focused applications
|
||||
|
||||
### Learning Kubernetes
|
||||
|
||||
- Hands-on practice
|
||||
- Tutorial environments
|
||||
- Training clusters
|
||||
- Safe experimentation
|
||||
|
||||
## Technology Stack
|
||||
|
||||
**Kubernetes:** K3s v1.26+ (production-ready, lightweight)
|
||||
**Networking:** Mycelium CNI with IPv6 support
|
||||
**Infrastructure:** ThreeFold Grid decentralized nodes
|
||||
**Management:** Web dashboard + API + kubectl
|
||||
|
||||
## What You Get
|
||||
|
||||
When you deploy a cluster:
|
||||
|
||||
- ✅ **Fully configured K3s cluster** - Ready to use
|
||||
- ✅ **Mycelium networking** - Secure connectivity
|
||||
- ✅ **kubeconfig file** - Standard kubectl access
|
||||
- ✅ **SSH access** - Direct node management
|
||||
- ✅ **Dashboard monitoring** - Cluster status and metrics
|
||||
- ✅ **Flexible scaling** - Add/remove nodes as needed
|
||||
|
||||
## Getting Started
|
||||
|
||||
Ready to deploy your first cluster? Here's the path:
|
||||
|
||||
1. **[Getting Started](/mycelium-cloud/getting-started)** - Create account and deploy
|
||||
2. **[Tutorial](/mycelium-cloud/tutorial)** - Deploy your first application
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 💡 Prerequisites
|
||||
|
||||
You should have:
|
||||
- **Mycelium installed** - For network access ([Install guide](/mycelium-network/install))
|
||||
- **kubectl installed** - For cluster management ([Install kubectl](https://kubernetes.io/docs/tasks/tools/))
|
||||
- **SSH key** - For node access
|
||||
- **Credits** - To fund your deployments
|
||||
|
||||
</div>
|
||||
|
||||
## Pricing
|
||||
|
||||
Pricing is based on resource usage:
|
||||
- CPU cores
|
||||
- RAM allocation
|
||||
- Storage capacity
|
||||
- Deployment duration
|
||||
|
||||
Check the dashboard for current rates. The decentralized infrastructure typically offers competitive pricing compared to traditional cloud providers.
|
||||
|
||||
## Resources
|
||||
|
||||
- **Dashboard**: [vdc.grid.tf](https://vdc.grid.tf) - Deploy and manage clusters
|
||||
- **Documentation**: [Mycelium Cloud Docs](https://codescalers.github.io/www_kubecloud/)
|
||||
- **Kubernetes Docs**: [kubernetes.io](https://kubernetes.io/docs/)
|
||||
- **Community**: [ThreeFold Telegram](https://t.me/threefoldfarmers)
|
||||
- **GitHub**: [kubecloud repository](https://github.com/codescalers/kubecloud)
|
||||
|
||||
## Comparison to Traditional Cloud
|
||||
|
||||
| Aspect | Mycelium Cloud | Traditional Cloud |
|
||||
|--------|----------------|-------------------|
|
||||
| Infrastructure | Decentralized | Centralized |
|
||||
| Control | Full sovereignty | Vendor-controlled |
|
||||
| Networking | P2P encrypted | Public IPs, gateways |
|
||||
| Pricing | Competitive | Often expensive |
|
||||
| Lock-in | None (standard K8s) | Vendor-specific services |
|
||||
| Privacy | High | Varies by provider |
|
||||
| Setup | Quick & simple | Can be complex |
|
||||
|
||||
---
|
||||
|
||||
:::tip Next Step
|
||||
Ready to deploy? Start with the **[Getting Started Guide](/mycelium-cloud/getting-started)** to create your first cluster.
|
||||
:::
|
579
docs/mycelium-cloud/tutorial.md
Normal file
579
docs/mycelium-cloud/tutorial.md
Normal file
@@ -0,0 +1,579 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Deployment Tutorials
|
||||
|
||||
Learn by example with these practical deployment tutorials for Mycelium Cloud.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before starting these tutorials, ensure you have:
|
||||
|
||||
- ✅ Deployed cluster with kubectl access
|
||||
- ✅ Mycelium running for network access
|
||||
- ✅ kubectl configured with your cluster
|
||||
|
||||
```bash
|
||||
# Verify your setup
|
||||
kubectl get nodes
|
||||
|
||||
# Should show your cluster nodes
|
||||
```
|
||||
|
||||
## Tutorial 1: Hello World with Nginx
|
||||
|
||||
Deploy a simple web server to verify your cluster is working.
|
||||
|
||||
### Step 1: Create the Deployment
|
||||
|
||||
Save as `hello-world-deploy.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hello-world
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hello-world
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hello-world
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.21
|
||||
ports:
|
||||
- containerPort: 80
|
||||
```
|
||||
|
||||
Apply it:
|
||||
|
||||
```bash
|
||||
kubectl apply -f hello-world-deploy.yaml
|
||||
```
|
||||
|
||||
### Step 2: Expose the Service
|
||||
|
||||
Save as `hello-world-svc.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hello-world-service
|
||||
spec:
|
||||
selector:
|
||||
app: hello-world
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
```
|
||||
|
||||
Apply it:
|
||||
|
||||
```bash
|
||||
kubectl apply -f hello-world-svc.yaml
|
||||
```
|
||||
|
||||
### Step 3: Access Your Application
|
||||
|
||||
```bash
|
||||
# Port forward to local machine
|
||||
kubectl port-forward service/hello-world-service 8080:80
|
||||
```
|
||||
|
||||
Open `http://localhost:8080` - you should see the Nginx welcome page!
|
||||
|
||||
### Cleanup
|
||||
|
||||
```bash
|
||||
kubectl delete -f hello-world-deploy.yaml
|
||||
kubectl delete -f hello-world-svc.yaml
|
||||
```
|
||||
|
||||
## Tutorial 2: Python Servers with Load Balancing
|
||||
|
||||
Deploy multiple Python HTTP servers to demonstrate load balancing.
|
||||
|
||||
### Step 1: Create the Deployments
|
||||
|
||||
Save as `python-servers.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: python-server-1
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python-server
|
||||
server-id: "1"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python-server
|
||||
server-id: "1"
|
||||
spec:
|
||||
containers:
|
||||
- name: python-server
|
||||
image: python:3.9-slim
|
||||
command: ["python", "-c"]
|
||||
args:
|
||||
- |
|
||||
import http.server, socketserver, json
|
||||
class Handler(http.server.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'application/json')
|
||||
self.end_headers()
|
||||
response = {"server": "Python Server 1", "pod": "$(hostname)"}
|
||||
self.wfile.write(json.dumps(response).encode())
|
||||
with socketserver.TCPServer(("", 8000), Handler) as httpd:
|
||||
httpd.serve_forever()
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: python-server-2
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python-server
|
||||
server-id: "2"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python-server
|
||||
server-id: "2"
|
||||
spec:
|
||||
containers:
|
||||
- name: python-server
|
||||
image: python:3.9-slim
|
||||
command: ["python", "-c"]
|
||||
args:
|
||||
- |
|
||||
import http.server, socketserver, json
|
||||
class Handler(http.server.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'application/json')
|
||||
self.end_headers()
|
||||
response = {"server": "Python Server 2", "pod": "$(hostname)"}
|
||||
self.wfile.write(json.dumps(response).encode())
|
||||
with socketserver.TCPServer(("", 8000), Handler) as httpd:
|
||||
httpd.serve_forever()
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: python-server-3
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python-server
|
||||
server-id: "3"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python-server
|
||||
server-id: "3"
|
||||
spec:
|
||||
containers:
|
||||
- name: python-server
|
||||
image: python:3.9-slim
|
||||
command: ["python", "-c"]
|
||||
args:
|
||||
- |
|
||||
import http.server, socketserver, json
|
||||
class Handler(http.server.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'application/json')
|
||||
self.end_headers()
|
||||
response = {"server": "Python Server 3", "pod": "$(hostname)"}
|
||||
self.wfile.write(json.dumps(response).encode())
|
||||
with socketserver.TCPServer(("", 8000), Handler) as httpd:
|
||||
httpd.serve_forever()
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
```
|
||||
|
||||
### Step 2: Create Load Balancing Service
|
||||
|
||||
Save as `python-lb-service.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: python-lb
|
||||
spec:
|
||||
selector:
|
||||
app: python-server
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
type: ClusterIP
|
||||
```
|
||||
|
||||
### Step 3: Deploy Everything
|
||||
|
||||
```bash
|
||||
kubectl apply -f python-servers.yaml
|
||||
kubectl apply -f python-lb-service.yaml
|
||||
|
||||
# Wait for pods to be ready
|
||||
kubectl get pods -l app=python-server
|
||||
```
|
||||
|
||||
### Step 4: Test Load Balancing
|
||||
|
||||
```bash
|
||||
# Port forward the service
|
||||
kubectl port-forward service/python-lb 8080:80
|
||||
|
||||
# In another terminal, test the load balancing
|
||||
for i in {1..10}; do
|
||||
curl http://localhost:8080
|
||||
done
|
||||
```
|
||||
|
||||
You'll see responses from different servers and pods, showing the load balancing in action!
|
||||
|
||||
### Cleanup
|
||||
|
||||
```bash
|
||||
kubectl delete -f python-servers.yaml
|
||||
kubectl delete -f python-lb-service.yaml
|
||||
```
|
||||
|
||||
## Tutorial 3: Stateful Application with Persistent Storage
|
||||
|
||||
Deploy a simple application that persists data.
|
||||
|
||||
### Step 1: Create Persistent Volume Claim
|
||||
|
||||
Save as `storage.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
```
|
||||
|
||||
### Step 2: Create Stateful Deployment
|
||||
|
||||
Save as `stateful-app.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: data-app
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: data-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: data-app
|
||||
spec:
|
||||
containers:
|
||||
- name: app
|
||||
image: busybox:latest
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo "Starting data application..."
|
||||
while true; do
|
||||
date >> /data/log.txt
|
||||
echo "Written at $(date)" >> /data/log.txt
|
||||
sleep 10
|
||||
done
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: data-pvc
|
||||
```
|
||||
|
||||
### Step 3: Deploy and Verify
|
||||
|
||||
```bash
|
||||
kubectl apply -f storage.yaml
|
||||
kubectl apply -f stateful-app.yaml
|
||||
|
||||
# Wait for pod to be ready
|
||||
kubectl get pods -l app=data-app
|
||||
|
||||
# Check the logs being written
|
||||
kubectl exec -it $(kubectl get pod -l app=data-app -o name) -- cat /data/log.txt
|
||||
```
|
||||
|
||||
### Step 4: Test Persistence
|
||||
|
||||
```bash
|
||||
# Delete the pod
|
||||
kubectl delete pod -l app=data-app
|
||||
|
||||
# Wait for new pod to start
|
||||
kubectl get pods -l app=data-app
|
||||
|
||||
# Check data persisted
|
||||
kubectl exec -it $(kubectl get pod -l app=data-app -o name) -- cat /data/log.txt
|
||||
```
|
||||
|
||||
The data from before the pod deletion should still be there!
|
||||
|
||||
### Cleanup
|
||||
|
||||
```bash
|
||||
kubectl delete -f stateful-app.yaml
|
||||
kubectl delete -f storage.yaml
|
||||
```
|
||||
|
||||
## Tutorial 4: Multi-Tier Application
|
||||
|
||||
Deploy a simple web app with a database backend.
|
||||
|
||||
### Step 1: Deploy Redis Database
|
||||
|
||||
Save as `redis.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
type: ClusterIP
|
||||
```
|
||||
|
||||
### Step 2: Deploy Frontend Application
|
||||
|
||||
Save as `frontend.yaml`:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: frontend
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: REDIS_HOST
|
||||
value: "redis"
|
||||
- name: REDIS_PORT
|
||||
value: "6379"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
selector:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
```
|
||||
|
||||
### Step 3: Deploy and Access
|
||||
|
||||
```bash
|
||||
kubectl apply -f redis.yaml
|
||||
kubectl apply -f frontend.yaml
|
||||
|
||||
# Wait for all pods
|
||||
kubectl get pods
|
||||
|
||||
# Port forward to access frontend
|
||||
kubectl port-forward service/frontend 8080:80
|
||||
```
|
||||
|
||||
Open `http://localhost:8080` to access your multi-tier application.
|
||||
|
||||
### Cleanup
|
||||
|
||||
```bash
|
||||
kubectl delete -f frontend.yaml
|
||||
kubectl delete -f redis.yaml
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Resource Limits
|
||||
|
||||
Always set resource limits:
|
||||
|
||||
```yaml
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
```
|
||||
|
||||
### Health Checks
|
||||
|
||||
Add liveness and readiness probes:
|
||||
|
||||
```yaml
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
```
|
||||
|
||||
### Labels and Annotations
|
||||
|
||||
Use descriptive labels:
|
||||
|
||||
```yaml
|
||||
metadata:
|
||||
labels:
|
||||
app: myapp
|
||||
version: v1.0
|
||||
environment: production
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Pods Not Starting
|
||||
|
||||
```bash
|
||||
# Check pod status
|
||||
kubectl describe pod <pod-name>
|
||||
|
||||
# Check logs
|
||||
kubectl logs <pod-name>
|
||||
|
||||
# Check events
|
||||
kubectl get events --sort-by='.lastTimestamp'
|
||||
```
|
||||
|
||||
### Service Not Accessible
|
||||
|
||||
```bash
|
||||
# Check service
|
||||
kubectl describe service <service-name>
|
||||
|
||||
# Check endpoints
|
||||
kubectl get endpoints <service-name>
|
||||
|
||||
# Test from within cluster
|
||||
kubectl run -it --rm debug --image=alpine --restart=Never -- sh
|
||||
# Then: wget -O- http://service-name
|
||||
```
|
||||
|
||||
### Resource Issues
|
||||
|
||||
```bash
|
||||
# Check node resources
|
||||
kubectl top nodes
|
||||
|
||||
# Check pod resources
|
||||
kubectl top pods
|
||||
|
||||
# Check resource requests/limits
|
||||
kubectl describe nodes
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Now that you've completed these tutorials:
|
||||
|
||||
- Deploy your own applications
|
||||
- Explore [Helm](https://helm.sh/) for package management
|
||||
- Learn about [Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress/) for advanced routing
|
||||
- Study [StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) for databases
|
||||
- Explore [ConfigMaps and Secrets](https://kubernetes.io/docs/concepts/configuration/) for configuration management
|
||||
|
||||
## Resources
|
||||
|
||||
- **Kubernetes Documentation**: [kubernetes.io/docs](https://kubernetes.io/docs/)
|
||||
- **kubectl Cheat Sheet**: [kubernetes.io/docs/reference/kubectl/cheatsheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)
|
||||
- **Mycelium Cloud FAQ**: [codescalers.github.io/www_kubecloud/faq](https://codescalers.github.io/www_kubecloud/faq)
|
||||
- **Community**: [Telegram](https://t.me/threefoldfarmers)
|
||||
|
||||
---
|
||||
|
||||
:::tip Keep Learning
|
||||
|
||||
These tutorials cover the basics. The real power of Kubernetes comes from combining these concepts to build complex, scalable applications on the ThreeFold Grid!
|
||||
:::
|
229
docs/mycelium-network/install.md
Normal file
229
docs/mycelium-network/install.md
Normal file
@@ -0,0 +1,229 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Install Mycelium
|
||||
|
||||
Get Mycelium running on your system in just a few steps.
|
||||
|
||||
## Linux Installation
|
||||
|
||||
### Using Pre-built Binaries (Recommended)
|
||||
|
||||
1. **Download the latest release:**
|
||||
```bash
|
||||
wget https://github.com/threefoldtech/mycelium/releases/latest/download/mycelium-linux-x64.tar.gz
|
||||
```
|
||||
|
||||
2. **Extract and install:**
|
||||
```bash
|
||||
tar -xzf mycelium-linux-x64.tar.gz
|
||||
chmod +x mycelium
|
||||
sudo mv mycelium /usr/local/bin/
|
||||
```
|
||||
|
||||
3. **Verify installation:**
|
||||
```bash
|
||||
mycelium --version
|
||||
```
|
||||
|
||||
### Building from Source
|
||||
|
||||
If you prefer to build from source:
|
||||
|
||||
```bash
|
||||
# Install Rust if you haven't already
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
||||
# Clone and build
|
||||
git clone https://github.com/threefoldtech/mycelium.git
|
||||
cd mycelium/myceliumd
|
||||
cargo build --release
|
||||
|
||||
# Install binary
|
||||
sudo mv target/release/myceliumd /usr/local/bin/mycelium
|
||||
```
|
||||
|
||||
## macOS Installation
|
||||
|
||||
### Using Pre-built Binaries
|
||||
|
||||
1. **Download the latest release:**
|
||||
```bash
|
||||
wget https://github.com/threefoldtech/mycelium/releases/latest/download/mycelium-macos-x64.tar.gz
|
||||
```
|
||||
|
||||
2. **Extract and install:**
|
||||
```bash
|
||||
tar -xzf mycelium-macos-x64.tar.gz
|
||||
chmod +x mycelium
|
||||
sudo mv mycelium /usr/local/bin/
|
||||
```
|
||||
|
||||
3. **Verify installation:**
|
||||
```bash
|
||||
mycelium --version
|
||||
```
|
||||
|
||||
### Using Homebrew (if available)
|
||||
|
||||
```bash
|
||||
brew install threefoldtech/mycelium/mycelium
|
||||
```
|
||||
|
||||
## Windows Installation
|
||||
|
||||
### Using the Installer
|
||||
|
||||
1. **Download the installer:**
|
||||
- Go to [releases page](https://github.com/threefoldtech/mycelium/releases)
|
||||
- Download `mycelium_installer.msi`
|
||||
|
||||
2. **Run the installer:**
|
||||
- Double-click the downloaded `.msi` file
|
||||
- Follow the installation wizard
|
||||
|
||||
3. **Verify installation:**
|
||||
Open Command Prompt and run:
|
||||
```cmd
|
||||
mycelium --version
|
||||
```
|
||||
|
||||
### Manual Installation
|
||||
|
||||
1. Download `mycelium-windows-x64.zip` from the releases page
|
||||
2. Extract to a folder (e.g., `C:\Program Files\Mycelium\`)
|
||||
3. Add the folder to your PATH environment variable
|
||||
4. Open a new Command Prompt and verify with `mycelium --version`
|
||||
|
||||
## Mobile Installation
|
||||
|
||||
### iOS
|
||||
|
||||
Mycelium runs as a mobile app on iOS devices:
|
||||
|
||||
- Available through the project's mobile directory
|
||||
- Requires developer tools for installation
|
||||
- Operates in TUN-only mode for overlay networking
|
||||
|
||||
**Note:** iOS version may have limitations compared to desktop versions due to platform restrictions.
|
||||
|
||||
### Android
|
||||
|
||||
Mycelium has full support on Android:
|
||||
|
||||
- Build from source using the mobile directory
|
||||
- Full TUN interface support
|
||||
- Complete overlay networking functionality
|
||||
|
||||
Check the [GitHub repository](https://github.com/threefoldtech/mycelium) for the latest mobile installation instructions.
|
||||
|
||||
## Docker Installation
|
||||
|
||||
Run Mycelium in a container:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name mycelium \
|
||||
--cap-add NET_ADMIN \
|
||||
--device /dev/net/tun \
|
||||
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
|
||||
threefoldtech/mycelium:latest \
|
||||
--peers tcp://188.40.132.242:9651
|
||||
```
|
||||
|
||||
## Verify Installation
|
||||
|
||||
After installing, verify Mycelium is working:
|
||||
|
||||
```bash
|
||||
mycelium --help
|
||||
```
|
||||
|
||||
You should see the help output with available commands and options.
|
||||
|
||||
## System Requirements
|
||||
|
||||
### Minimum Requirements
|
||||
|
||||
- **OS**: Linux, macOS, Windows (64-bit)
|
||||
- **RAM**: 50MB
|
||||
- **Disk**: 20MB
|
||||
- **Network**: IPv6 support (enabled by default on most systems)
|
||||
|
||||
### Network Requirements
|
||||
|
||||
- Internet connection
|
||||
- IPv6 capable network stack (standard on modern systems)
|
||||
- No special firewall configuration needed (works with NAT)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Command not found" Error
|
||||
|
||||
If you get a "command not found" error:
|
||||
|
||||
**Linux/macOS:**
|
||||
- Ensure `/usr/local/bin` is in your PATH
|
||||
- Try running with full path: `/usr/local/bin/mycelium`
|
||||
- Check file permissions: `ls -l /usr/local/bin/mycelium`
|
||||
|
||||
**Windows:**
|
||||
- Verify the installation directory is in your PATH
|
||||
- Open a new Command Prompt after installation
|
||||
- Try full path: `"C:\Program Files\Mycelium\mycelium.exe"`
|
||||
|
||||
### Permission Denied
|
||||
|
||||
If you get permission errors when running:
|
||||
|
||||
**Linux/macOS:**
|
||||
```bash
|
||||
# Make the binary executable
|
||||
chmod +x /usr/local/bin/mycelium
|
||||
|
||||
# Run with sudo if needed for network operations
|
||||
sudo mycelium --peers tcp://188.40.132.242:9651
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
- Run Command Prompt as Administrator
|
||||
- Check Windows Firewall settings
|
||||
|
||||
### IPv6 Not Available
|
||||
|
||||
Mycelium requires IPv6. If you get IPv6 errors:
|
||||
|
||||
**Linux:**
|
||||
```bash
|
||||
# Check if IPv6 is enabled
|
||||
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
|
||||
|
||||
# Enable if needed (0 = enabled)
|
||||
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
||||
```
|
||||
|
||||
**macOS:**
|
||||
IPv6 is enabled by default. Check System Preferences > Network.
|
||||
|
||||
**Windows:**
|
||||
IPv6 is enabled by default. Check Network Adapter properties.
|
||||
|
||||
## What's Next?
|
||||
|
||||
Now that Mycelium is installed, let's connect to the network:
|
||||
|
||||
**[Quick Start Guide](/mycelium-network/quick-start)** - Connect in 5 minutes
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- **Full User Guide**: [threefoldtech.github.io/www_myceliumguide](https://threefoldtech.github.io/www_myceliumguide/)
|
||||
- **GitHub Repository**: [github.com/threefoldtech/mycelium](https://github.com/threefoldtech/mycelium)
|
||||
- **Technical Docs**: Available in the repository
|
||||
- **Get Help**: [Telegram Community](https://t.me/threefoldfarmers)
|
||||
|
||||
---
|
||||
|
||||
:::tip Ready to Connect?
|
||||
Installation complete! Continue to the **[Quick Start](/mycelium-network/quick-start)** guide to join the network.
|
||||
:::
|
165
docs/mycelium-network/overview.md
Normal file
165
docs/mycelium-network/overview.md
Normal file
@@ -0,0 +1,165 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# What is Mycelium Network?
|
||||
|
||||
Mycelium is an **IPv6 overlay network** that creates secure, encrypted connections between your devices anywhere in the world.
|
||||
|
||||
Think of it as your own private internet layer - but without the complexity of VPNs, port forwarding, or NAT traversal.
|
||||
|
||||
## How It Works
|
||||
|
||||
Mycelium creates a **peer-to-peer mesh network** where:
|
||||
|
||||
- 🌐 Each device gets its own unique IPv6 address
|
||||
- 🔐 All traffic is automatically encrypted end-to-end
|
||||
- 🚀 Smart routing finds the fastest path between devices
|
||||
- 🔄 Network adapts automatically as devices join or leave
|
||||
|
||||
No central servers. No configuration complexity. Just secure connectivity.
|
||||
|
||||
## Why Use Mycelium?
|
||||
|
||||
### 🌍 Global Connectivity
|
||||
|
||||
Connect devices across the world as if they were on the same local network:
|
||||
- Home server to laptop while traveling
|
||||
- Multiple offices without complicated VPN setups
|
||||
- IoT devices across different locations
|
||||
- Development environments and remote services
|
||||
|
||||
### 🔒 Secure by Default
|
||||
|
||||
- **End-to-end encryption** - Traffic is encrypted between devices
|
||||
- **No trust required** - No central authority can intercept
|
||||
- **Automatic security** - No manual key exchange needed
|
||||
- **Private by design** - Only you control your network
|
||||
|
||||
### 🚀 Smart & Fast
|
||||
|
||||
- **Automatic routing** - Finds optimal paths
|
||||
- **NAT traversal** - Works behind firewalls
|
||||
- **Resilient** - Routes around failures
|
||||
- **Low overhead** - Minimal performance impact
|
||||
|
||||
### 📱 Cross-Platform
|
||||
|
||||
Works everywhere:
|
||||
- Linux (all distributions)
|
||||
- macOS
|
||||
- Windows
|
||||
- iOS
|
||||
- Android
|
||||
|
||||
## Common Use Cases
|
||||
|
||||
### Remote Access
|
||||
|
||||
Access your home server or services from anywhere without opening ports or configuring complex VPNs.
|
||||
|
||||
```bash
|
||||
# At home: Run Mycelium on your server
|
||||
# Address: 5c4:c176:bf44:b2ab:5e7e:f6a:b7e2:11ca
|
||||
|
||||
# Traveling: Access your server via its Mycelium address
|
||||
ssh user@5c4:c176:bf44:b2ab:5e7e:f6a:b7e2:11ca
|
||||
```
|
||||
|
||||
### Private Networks
|
||||
|
||||
Create secure connections between multiple locations:
|
||||
- Link office networks
|
||||
- Connect distributed teams
|
||||
- Secure IoT deployments
|
||||
- Private cloud infrastructure
|
||||
|
||||
### Development & Testing
|
||||
|
||||
Build distributed applications with real-world networking:
|
||||
- Test across geographic locations
|
||||
- Develop P2P applications
|
||||
- Simulate network topologies
|
||||
- Remote debugging
|
||||
|
||||
### ThreeFold Grid Access
|
||||
|
||||
Connect to services on the ThreeFold Grid:
|
||||
- Access deployed workloads
|
||||
- Manage your infrastructure
|
||||
- Use decentralized services
|
||||
- Build on the grid
|
||||
|
||||
## Key Features
|
||||
|
||||
| Feature | Benefit |
|
||||
|---------|---------|
|
||||
| **Zero Configuration** | Works out of the box |
|
||||
| **IPv6 Native** | Future-proof addressing |
|
||||
| **P2P Mesh** | No single point of failure |
|
||||
| **Automatic Encryption** | Secure without complexity |
|
||||
| **NAT Traversal** | Works behind firewalls |
|
||||
| **Smart Routing** | Optimal path selection |
|
||||
| **Low Latency** | Direct connections when possible |
|
||||
| **Cross-Platform** | Run anywhere |
|
||||
|
||||
## How Is It Different?
|
||||
|
||||
### vs Traditional VPNs
|
||||
|
||||
- ✅ **No central server** - Peer-to-peer mesh
|
||||
- ✅ **Automatic routing** - No manual configuration
|
||||
- ✅ **Lower latency** - Direct connections
|
||||
- ✅ **Simpler setup** - Just run and connect
|
||||
|
||||
### vs Other Overlay Networks
|
||||
|
||||
- ✅ **IPv6 native** - Not limited to IPv4 address space
|
||||
- ✅ **Production ready** - Used in ThreeFold infrastructure
|
||||
- ✅ **Active development** - Continuous improvements
|
||||
- ✅ **Open source** - Transparent and auditable
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
```
|
||||
┌──────────────┐ Encrypted Tunnel ┌──────────────┐
|
||||
│ Device A │◄────────────────────────────►│ Device B │
|
||||
│ Mycelium IP │ Over Internet │ Mycelium IP │
|
||||
└──────────────┘ └──────────────┘
|
||||
│ │
|
||||
└────────────── Mesh Network ───────────────┘
|
||||
(via Public Peers)
|
||||
```
|
||||
|
||||
- Devices run Mycelium daemon
|
||||
- Connect to public or private peers
|
||||
- Build encrypted tunnels automatically
|
||||
- Route traffic efficiently
|
||||
|
||||
## Getting Started
|
||||
|
||||
Ready to try Mycelium? Here's your path:
|
||||
|
||||
1. **[Install Mycelium](/mycelium-network/install)** - Set up on your system
|
||||
2. **[Quick Start](/mycelium-network/quick-start)** - Connect to the network
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 💡 5-Minute Setup
|
||||
|
||||
Most users are connected to the global Mycelium network within 5 minutes of starting installation.
|
||||
|
||||
</div>
|
||||
|
||||
## Resources
|
||||
|
||||
- **Documentation**: [Mycelium Guide](https://threefoldtech.github.io/www_myceliumguide/)
|
||||
- **Source Code**: [GitHub Repository](https://github.com/threefoldtech/mycelium)
|
||||
- **Community**: [ThreeFold Telegram](https://t.me/threefoldfarmers)
|
||||
- **Forum**: [forum.threefold.io](https://forum.threefold.io)
|
||||
|
||||
---
|
||||
|
||||
:::tip Next Step
|
||||
Install Mycelium on your system: **[Installation Guide](/mycelium-network/install)**
|
||||
:::
|
219
docs/mycelium-network/quick-start.md
Normal file
219
docs/mycelium-network/quick-start.md
Normal file
@@ -0,0 +1,219 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Quick Start
|
||||
|
||||
Get connected to the Mycelium network in under 5 minutes.
|
||||
|
||||
## Step 1: Connect to Public Peers
|
||||
|
||||
Start your Mycelium node and connect to the global network:
|
||||
|
||||
**Linux/macOS:**
|
||||
```bash
|
||||
sudo mycelium --peers tcp://188.40.132.242:9651 quic://185.69.166.8:9651
|
||||
```
|
||||
|
||||
**Windows (as Administrator):**
|
||||
```cmd
|
||||
mycelium --peers tcp://188.40.132.242:9651 quic://185.69.166.8:9651
|
||||
```
|
||||
|
||||
You should see output indicating Mycelium is starting and connecting to peers.
|
||||
|
||||
<div className="info-box">
|
||||
|
||||
### 🔐 Why sudo/Administrator?
|
||||
|
||||
Mycelium needs elevated privileges to create a network interface. This is standard for networking tools.
|
||||
|
||||
</div>
|
||||
|
||||
## Step 2: Get Your IPv6 Address
|
||||
|
||||
Open a **new terminal** (keep Mycelium running in the first one) and check your node info:
|
||||
|
||||
```bash
|
||||
mycelium inspect --json
|
||||
```
|
||||
|
||||
You'll see output like:
|
||||
```json
|
||||
{
|
||||
"publicKey": "abd16194646defe7ad2318a0f0a69eb2e3fe939c3b0b51cf0bb88bb8028ecd1d",
|
||||
"address": "5c4:c176:bf44:b2ab:5e7e:f6a:b7e2:11ca"
|
||||
}
|
||||
```
|
||||
|
||||
**Save your address** - this is your unique Mycelium IPv6 address that others will use to reach you.
|
||||
|
||||
## Step 3: Test Connectivity
|
||||
|
||||
Ping one of the public peers to verify connectivity:
|
||||
|
||||
```bash
|
||||
ping6 54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907
|
||||
```
|
||||
|
||||
If you see responses, congratulations! You're connected to the Mycelium network.
|
||||
|
||||
```
|
||||
PING 54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907(54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907) 56 data bytes
|
||||
64 bytes from 54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907: icmp_seq=1 ttl=64 time=28.5 ms
|
||||
64 bytes from 54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907: icmp_seq=2 ttl=64 time=27.8 ms
|
||||
```
|
||||
|
||||
## Public Peers List
|
||||
|
||||
Connect to these stable public peers for reliable connectivity:
|
||||
|
||||
| Region | IPv4 | IPv6 | TCP/QUIC Port | Mycelium IP |
|
||||
|--------|------|------|---------------|-------------|
|
||||
| Germany | 188.40.132.242 | 2a01:4f8:221:1e0b::2 | 9651 | 54b:83ab:6cb5:7b38:44ae:cd14:53f3:a907 |
|
||||
| Germany | 136.243.47.186 | 2a01:4f8:212:fa6::2 | 9651 | 40a:152c:b85b:9646:5b71:d03a:eb27:2462 |
|
||||
| Belgium | 185.69.166.7 | 2a02:1802:5e:0:ec4:7aff:fe51:e80d | 9651 | 597:a4ef:806:b09:6650:cbbf:1b68:cc94 |
|
||||
| Belgium | 185.69.166.8 | 2a02:1802:5e:0:ec4:7aff:fe51:e36b | 9651 | 549:8bce:fa45:e001:cbf8:f2e2:2da6:a67c |
|
||||
| Finland | 65.21.231.58 | 2a01:4f9:6a:1dc5::2 | 9651 | 410:2778:53bf:6f41:af28:1b60:d7c0:707a |
|
||||
| Finland | 65.109.18.113 | 2a01:4f9:5a:1042::2 | 9651 | 488:74ac:8a31:277b:9683:c8e:e14f:79a7 |
|
||||
| US East | 209.159.146.190 | 2604:a00:50:17b:9e6b:ff:fe1f:e054 | 9651 | 4ab:a385:5a4e:ef8f:92e0:1605:7cb6:24b2 |
|
||||
| US West | 5.78.122.16 | 2a01:4ff:1f0:8859::1 | 9651 | 4de:b695:3859:8234:d04c:5de6:8097:c27c |
|
||||
| Singapore | 5.223.43.251 | 2a01:4ff:2f0:3621::1 | 9651 | 5eb:c711:f9ab:eb24:ff26:e392:a115:1c0e |
|
||||
| India | 142.93.217.194 | 2400:6180:100:d0::841:2001 | 9651 | 445:465:fe81:1e2b:5420:a029:6b0:9f61 |
|
||||
|
||||
## Connect to Multiple Peers
|
||||
|
||||
For better reliability and performance, connect to multiple peers:
|
||||
|
||||
```bash
|
||||
sudo mycelium --peers \
|
||||
tcp://188.40.132.242:9651 \
|
||||
quic://185.69.166.8:9651 \
|
||||
tcp://185.69.166.7:9651 \
|
||||
quic://65.21.231.58:9651
|
||||
```
|
||||
|
||||
This creates redundant paths and improves network resilience.
|
||||
|
||||
## Keep Mycelium Running
|
||||
|
||||
Mycelium needs to stay running to maintain your network connection.
|
||||
|
||||
### Run in Background
|
||||
|
||||
**Linux/macOS:**
|
||||
```bash
|
||||
# Using nohup
|
||||
nohup sudo mycelium --peers tcp://188.40.132.242:9651 quic://185.69.166.8:9651 &
|
||||
```
|
||||
|
||||
**Better: Use systemd (Linux):**
|
||||
|
||||
Create `/etc/systemd/system/mycelium.service`:
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Mycelium Network
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/mycelium --peers tcp://188.40.132.242:9651 quic://185.69.166.8:9651
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Enable and start:
|
||||
```bash
|
||||
sudo systemctl enable mycelium
|
||||
sudo systemctl start mycelium
|
||||
sudo systemctl status mycelium
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
- Use Task Scheduler to run at startup
|
||||
- Or run in a Command Prompt window kept open
|
||||
|
||||
## Basic Usage Examples
|
||||
|
||||
### SSH to Another Device
|
||||
|
||||
If you have SSH running on another device with Mycelium:
|
||||
|
||||
```bash
|
||||
ssh user@5c4:c176:bf44:b2ab:5e7e:f6a:b7e2:11ca
|
||||
```
|
||||
|
||||
### Access a Web Service
|
||||
|
||||
```bash
|
||||
curl http://[5c4:c176:bf44:b2ab:5e7e:f6a:b7e2:11ca]:8080
|
||||
```
|
||||
|
||||
Note: IPv6 addresses must be in brackets for URLs.
|
||||
|
||||
### Connect Two Locations
|
||||
|
||||
Run Mycelium on devices at both locations:
|
||||
- They'll automatically find each other through the mesh
|
||||
- Use their Mycelium IPs to communicate
|
||||
- All traffic is encrypted end-to-end
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Can't Connect to Peers
|
||||
|
||||
1. **Check internet connection** - Verify you're online
|
||||
2. **Firewall issues** - Mycelium should work behind NAT, but try temporarily disabling firewall
|
||||
3. **IPv6 support** - Ensure IPv6 is enabled on your system
|
||||
4. **Try different peers** - Some may be temporarily down
|
||||
|
||||
### Can't Ping Other Nodes
|
||||
|
||||
1. **Wait a few minutes** - Network discovery takes time
|
||||
2. **Check peer connections** - Ensure you're connected to peers
|
||||
3. **Verify the address** - Make sure you're pinging a valid Mycelium address
|
||||
4. **Check logs** - Look for errors in the Mycelium output
|
||||
|
||||
### Permission Errors
|
||||
|
||||
- **Linux/macOS**: Must run with `sudo`
|
||||
- **Windows**: Must run Command Prompt as Administrator
|
||||
- This is required to create the network interface
|
||||
|
||||
## What's Next?
|
||||
|
||||
Now that you're connected, explore what you can do:
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Remote Access**: Access your services from anywhere
|
||||
- **Connect Devices**: Link multiple locations securely
|
||||
- **ThreeFold Grid**: Access your grid deployments
|
||||
- **P2P Applications**: Build distributed systems
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
For more advanced setup options:
|
||||
- Custom port configuration
|
||||
- Private peer networks
|
||||
- SOCKS5 proxy setup
|
||||
- Advanced routing options
|
||||
|
||||
Check the [detailed Mycelium guide](https://threefoldtech.github.io/www_myceliumguide/) for more information.
|
||||
|
||||
## Resources
|
||||
|
||||
- **Full Documentation**: [Mycelium User Guide](https://threefoldtech.github.io/www_myceliumguide/)
|
||||
- **GitHub**: [github.com/threefoldtech/mycelium](https://github.com/threefoldtech/mycelium)
|
||||
- **Community**: [Telegram](https://t.me/threefoldfarmers)
|
||||
- **Forum**: [forum.threefold.io](https://forum.threefold.io)
|
||||
|
||||
---
|
||||
|
||||
:::tip Connected Successfully?
|
||||
|
||||
Great! You're now part of the global Mycelium network. Try deploying on **[Mycelium Cloud](/mycelium-cloud/overview)** to run workloads on the ThreeFold Grid.
|
||||
:::
|
Reference in New Issue
Block a user