A comprehensive TypeScript-based framework for deploying and managing Celestia light nodes across remote infrastructure. This framework provides automated deployment pipelines, testing capabilities, and lifecycle management for Celestia blockchain nodes.
- Architecture Overview
- Documentation
- Features
- Quick Start
- Configuration
- Development
- Testing
- Monitoring & Health Checks
- Troubleshooting
- Contributing
- Support
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Celestia Deployment Framework β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β Azure DevOps β β TypeScript β β Playwright β β
β β Pipelines β β Services β β Testing β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β SSH Service β β Node Lifecycle β β Test Executor β β
β β Management β β Management β β & Reports β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β β β β
β βββββββββββββββββββββββββΌββββββββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββ β
β β Remote Celestia Node β β
β β β β
β β β’ Light Node Process β β
β β β’ Configuration Management β β
β β β’ Network Integration β β
β β β’ Health Monitoring β β
β βββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- API Documentation - Complete API reference for all services, methods, and interfaces
- Deployment Guide - Step-by-step deployment instructions for local and CI/CD environments
- Configuration Options - Comprehensive configuration guide for all components and environments
- Troubleshooting Guide - Common issues, solutions, diagnostic tools, and debugging techniques
- Architecture Diagrams - Visual system architecture, component relationships, and data flows
- Environment Variables Guide - All available configuration options
- Common Error Solutions - Quick fixes for frequent issues
- Network Configuration - Port and firewall setup
- Security Best Practices - Security recommendations and configurations
- Complete infrastructure setup and provisioning
- Automated Celestia node compilation and installation
- Environment configuration and dependency management
- Network initialization and configuration
- Node start/stop/restart operations
- Health monitoring and status checking
- Process management and cleanup
- Configuration updates and validation
- Comprehensive Playwright test suites
- End-to-end deployment workflow testing
- Node connectivity and functionality validation
- Automated test reporting and results publishing
- SSH-based secure remote operations
- Credential management and key handling
- Error handling and retry mechanisms
- Comprehensive logging and monitoring
- Node.js 24.x or higher
- SSH key pair for remote server access
- Remote Ubuntu/Debian server with sudo access
- Azure DevOps (for CI/CD pipelines)
-
Clone the repository
git clone <repository-url> cd celestia-node
-
Install dependencies
npm ci
-
Configure environment
cp .env.example .env # Edit .env with your configuration
-
Set up SSH keys
mkdir -p ~/.ssh cp your-key.pem ~/.ssh/id_rsa.pem chmod 600 ~/.ssh/id_rsa.pem
Local Development:
# Run full deployment workflow
npm run test:pipeline
# Run specific test patterns
npx playwright test --grep=@DeploymentWorkflow --project=pipeline --reporter=line --timeout=600000
# Development tasks
npm run lint # Code linting
npm run format # Code formatting
npm run check # All quality checks
Production Deployment:
# Deploy via Azure DevOps pipeline
# Pipeline automatically triggers on push to main/develop branches
# Manual deployment verification
curl http://your-server:26658/health
curl http://your-server:26659/
Create a .env
file in the project root:
# Remote Server Configuration
REMOTE_HOST=your-server-ip
REMOTE_USER=ubuntu
SSH_KEY_PATH=./keys/id_rsa.pem
# Celestia Node Configuration
CELESTIA_USER=celestia
CELESTIA_NETWORK=mocha-4
CELESTIA_VERSION=v0.23.3-mocha
NODE_TYPE=light
# Network Ports
RPC_PORT=26658
GATEWAY_PORT=26659
# Deployment Settings
LOG_LEVEL=info
CREATE_BACKUP=true
ENABLE_DEBUG=false
POOL_NAME=your-pool
Configure these variables in your Azure DevOps variable group celestial-lightning-variable-group
:
Variable | Description | Example |
---|---|---|
VM_IP_ADDRESS |
Remote server IP address | ip address |
VM_USER |
Remote server username | ubuntu |
SSH_KEY_FILE |
SSH private key filename | id_rsa.pem |
src/
βββ services/
β βββ celestia/
β β βββ lifecycle/
β β βββ NodeLifecycleService.ts
β βββ ssh/
β βββ SshService.ts
βββ tests/
β βββ CelestiaDeploymentWorkflow.spec.ts
βββ utils/
βββ PlaywrightTestListener.ts
pipeline/
βββ run.yml # Main pipeline definition
βββ stages/
β βββ cleanup/
β βββ deployment/
β βββ security/
β βββ testing/
βββ variables/
β βββ celestia.yml
βββ workflows/
βββ celestia/
βββ common/
docs/
βββ api-documentation.md
βββ deployment-guide.md
βββ configuration-options.md
βββ troubleshooting.md
βββ architecture-diagrams.md
-
Local Development
# Install dependencies npm ci # Run linting and formatting npm run lint npm run format # Run tests locally npm run test:pipeline # Check all code quality npm run check
-
Testing Workflow
# Unit tests (when available) npm test # Integration tests npm run test:pipeline # Specific test patterns npx playwright test --grep="@DeploymentWorkflow" --project=pipeline # Debug mode testing ENABLE_DEBUG=true npm run test:pipeline
-
CI/CD Integration
# Automatic deployment on push to main/develop git push origin main # Manual pipeline trigger via Azure DevOps UI # View results in pipeline dashboard
- Unit Tests: Component-level testing (planned)
- Integration Tests: Service interaction testing via Playwright
- End-to-End Tests: Full deployment workflow testing
- API Tests: Celestia node API validation and health checks
# All tests (integration + E2E)
npm run test
# Pipeline-specific tests
npm run test:pipeline
# With specific timeout and reporting
npx playwright test --grep=@DeploymentWorkflow --project=pipeline --reporter=line --timeout=600000
# Debug mode with verbose output
ENABLE_DEBUG=true npm run test:pipeline
# Generate and view HTML reports
npx playwright show-report
The framework uses Playwright with custom configuration for deployment testing:
- Timeout: 600 seconds for deployment operations
- Retries: Configurable retry logic for flaky operations
- Parallel: Single worker for deployment to avoid conflicts
- Reports: HTML and JUnit XML formats for CI/CD integration
The framework provides comprehensive health monitoring capabilities:
# Node API health check
curl http://your-server:26658/health
# Node status and sync information
curl http://your-server:26658/status
# Network information and peers
curl http://your-server:26658/net_info
# Gateway service availability
curl http://your-server:26659/
# Service status monitoring
ssh -i keys/id_rsa.pem ubuntu@server 'systemctl status celestia-light'
# Real-time log monitoring
ssh -i keys/id_rsa.pem ubuntu@server 'journalctl -u celestia-light -f'
# Resource usage monitoring
ssh -i keys/id_rsa.pem ubuntu@server 'top -b -n1 | head -20'
Application logs are available in multiple locations:
- Node Logs:
/home/celestia/celestia-light.log
- System Logs:
journalctl -u celestia-light
- Framework Logs: Console output and test reports
- Pipeline Logs: Azure DevOps pipeline interface
For production deployments, consider implementing:
- Health check monitoring (Prometheus/Grafana)
- Log aggregation (ELK stack)
- Alert notification systems (PagerDuty, Slack)
- Automated recovery procedures
For detailed troubleshooting information, see the Troubleshooting Guide.
# Windows health check script
.\scripts\health-check.ps1
# Manual connection test
ssh -i keys\id_rsa.pem ubuntu@server-ip 'echo "Connection successful"'
# Check framework dependencies
npm run check
node --version
Issue | Quick Fix |
---|---|
SSH connection refused | Test-NetConnection server-ip -Port 22 |
Permission denied | icacls keys\id_rsa.pem /inheritance:r |
Node won't start | ssh server 'sudo systemctl restart celestia-light' |
Tests timeout | Increase DEPLOYMENT_TIMEOUT in .env |
Port conflicts | ssh server 'sudo pkill -f celestia' |
# Complete service restart
ssh -i keys/id_rsa.pem ubuntu@server 'sudo systemctl restart celestia-light'
# Full framework reset (if needed)
npm ci && npm run test:pipeline
# Check service logs for errors
ssh server 'sudo journalctl -u celestia-light -n 50'
For comprehensive troubleshooting: See Troubleshooting Guide
We welcome contributions to the Celestia Deployment Framework! Here's how to get started:
-
Fork and Clone
git clone https://github.com/your-username/celestia-node.git cd celestia-node
-
Install Dependencies
npm ci
-
Set Up Environment
cp .env.example .env # Edit .env with your configuration
-
Run Tests
npm run check npm run test:pipeline
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow TypeScript best practices
- Write or update tests for new functionality
- Update documentation as needed
- Ensure code passes linting and formatting
-
Validate Changes
npm run lint # Check code style npm run format # Format code npm run check # Run all quality checks npm run test:pipeline # Run integration tests
-
Commit and Push
git add . git commit -m "feat: add your feature description" git push origin feature/your-feature-name
-
Create Pull Request
- Provide clear description of changes
- Include test results and documentation updates
- Reference any related issues
- TypeScript: Use strict TypeScript settings
- ESLint: Follow configured linting rules
- Prettier: Use for consistent code formatting
- Testing: Write comprehensive tests for new features
- Documentation: Update all relevant documentation
- Commit Messages: Use conventional commit format
All contributions must include:
- Unit tests for new functions/classes
- Integration tests for service interactions
- End-to-end tests for complete workflows
- Documentation updates for configuration changes
- Automated checks must pass (linting, formatting, tests)
- Code review by maintainers
- Documentation review for completeness
- Manual testing of deployment scenarios
- Security review for production changes
This project is licensed under the MIT License. See the LICENSE file for details.
For support and questions:
- π Documentation: Check the comprehensive docs directory
- π Issues: Create a GitHub issue for bugs or feature requests
- π¬ Community: Join the Celestia Discord community
- π§ Contact: Reach out to the development team
- API Documentation - Complete service and method reference
- Deployment Guide - Step-by-step setup instructions
- Configuration Guide - All configuration options
- Troubleshooting Guide - Common issues and solutions
- Architecture Diagrams - System architecture overview
When reporting issues, please include:
-
Environment Information
- Operating system and version
- Node.js and npm versions
- Framework version
-
Configuration Details (sanitized)
- Environment variables (remove sensitive data)
- Network settings
- Server specifications
-
Error Details
- Complete error messages
- Log files (sanitized)
- Steps to reproduce
- Expected vs actual behavior
-
Testing Results
# Run health check and include results npm run check # Include test output npm run test:pipeline 2>&1 | tee test-output.log
For new features or enhancements:
- Check existing issues to avoid duplicates
- Describe the use case and benefits
- Provide implementation suggestions if possible
- Consider contributing the feature yourself
For security-related issues:
- DO NOT create public issues
- Email security concerns privately
- Follow responsible disclosure practices
- Celestia Node: https://github.com/celestiaorg/celestia-node
- Celestia App: https://github.com/celestiaorg/celestia-app
- Celestia Docs: https://docs.celestia.org/