Skip to main content

Introduction to NuNet

This tutorial provides a comprehensive introduction to NuNet's decentralized compute platform and how to get started as a device provider.

What You'll Learn

  • Understanding NuNet's architecture
  • Setting up your first device
  • Running your first job
  • Managing resources and allocations
  • Earning rewards

Prerequisites

  • Completed installation guide
  • Basic understanding of Docker containers
  • Familiarity with command-line tools

NuNet Architecture Overview

NuNet consists of several key components:

Device Management Service (DMS)

The core service that manages your device's participation in the network.

Job Executor

Handles the execution of computational tasks on your device.

Resource Manager

Manages CPU, memory, and storage allocation for jobs.

Network Layer

Handles peer-to-peer communication and job distribution.

Your First Device Setup

1. Initialize Your Device

nunet-dms init --name "My Compute Node"

2. Configure Resources

Set your device's available resources:

# CPU configuration
nunet-dms config set device.cpu.cores 8
nunet-dms config set device.cpu.threads 16

# Memory configuration
nunet-dms config set device.memory.gb 32

# Storage configuration
nunet-dms config set device.storage.gb 500

3. Start the Service

nunet-dms start

Running Your First Job

1. Accept a Job

nunet-dms jobs list --available
nunet-dms jobs accept <job-id>

2. Monitor Execution

nunet-dms jobs status <job-id>
nunet-dms logs --job <job-id>

3. Complete the Job

nunet-dms jobs complete <job-id>

Resource Management

Understanding Allocations

Allocations define how resources are assigned to jobs:

# View current allocations
nunet-dms allocations list

# Create a new allocation
nunet-dms allocations create --cpu 2 --memory 4 --storage 10

Resource Limits

Set limits to prevent resource exhaustion:

nunet-dms config set limits.max-cpu-usage 80
nunet-dms config set limits.max-memory-usage 90

Earning Rewards

Payment System

NuNet uses a token-based payment system:

  • Jobs pay in NuNet tokens
  • Payments are processed automatically
  • Rewards are proportional to resource usage

Viewing Earnings

nunet-dms earnings show
nunet-dms earnings history

Best Practices

Security

  • Keep your device updated
  • Use proper firewall rules
  • Monitor resource usage

Performance

  • Optimize resource allocation
  • Monitor job performance
  • Maintain good uptime

Reliability

  • Set up monitoring
  • Configure automatic restarts
  • Keep logs for troubleshooting

Troubleshooting

Common Issues

  1. Job fails to start: Check resource availability
  2. Network connectivity: Verify firewall settings
  3. Storage issues: Check disk space and permissions

Debugging Commands

# Check service status
nunet-dms status --verbose

# View detailed logs
nunet-dms logs --level debug

# Test network connectivity
nunet-dms network test

Next Steps

Additional Resources