Skip to content

Pocklabs/ArcDeploy

Repository files navigation

ArcDeploy

Universal Cloud-Init Deployment for ArcBlock Blocklet Server

License: MIT Cloud-Init Production Ready

Deploy a production-ready ArcBlock Blocklet Server to any cloud provider in under 10 minutes using cloud-init. Simple, secure, and reliable.

πŸš€ Quick Start

# 1. Clone repository
git clone https://github.com/Pocklabs/ArcDeploy.git
cd ArcDeploy

# 2. Add your SSH public key to cloud-init.yaml
nano cloud-init.yaml

# 3. Deploy to your cloud provider using the cloud-init.yaml file

✨ Features

  • πŸ”’ Security-First: SSH key authentication, custom ports, firewall protection
  • ⚑ High Performance: Native installation without container overhead
  • 🌐 Universal: Works with any cloud provider that supports cloud-init
  • πŸ› οΈ Production Ready: Auto-monitoring, SSL support, service integration
  • πŸ“¦ Zero Dependencies: Single cloud-init file deployment
  • πŸš€ Enhanced Deployment: Advanced scripts with retry logic and validation
  • πŸ›‘οΈ Security Hardening: Fail2ban, modern SSH ciphers, system optimization

πŸ“‹ Requirements

Server Specifications

  • Minimum: 4 vCPUs, 8GB RAM, 80GB SSD
  • Recommended: 8 vCPUs, 16GB RAM, 160GB SSD
  • OS: Ubuntu 22.04 LTS (x86_64)

Network Ports

  • 2222: SSH access
  • 8080: HTTP web interface
  • 8443: HTTPS web interface

🎯 Deployment Steps

πŸ€– Automated Deployment (Recommended)

For the fastest and easiest deployment, use our automated scripts:

Standard Deployment

Quick deployment with basic features:

# 1. Validate your setup
./check-setup.sh

# 2. Quick deploy with optimal defaults
export HETZNER_TOKEN="your-hetzner-cloud-api-token"
./quick-deploy.sh

# 3. Access your server (after 5-10 minutes)
ssh -p 2222 arcblock@YOUR_SERVER_IP
open http://YOUR_SERVER_IP:8080

Features:

  • βœ… Automatic server creation and configuration
  • βœ… Built-in validation and error checking
  • βœ… Real-time deployment monitoring
  • βœ… SSH connectivity testing
  • βœ… One-command cleanup

Enhanced Deployment (New!)

Advanced deployment with improved security and monitoring:

# 1. Use enhanced script with validation
export HETZNER_TOKEN="your-hetzner-cloud-api-token"
./scripts/deploy-test-server-enhanced.sh --verbose my-server

# 2. Preview deployment (dry-run mode)
./scripts/deploy-test-server-enhanced.sh --dry-run my-server large ash

# 3. Manage servers
./scripts/deploy-test-server-enhanced.sh --list
./scripts/deploy-test-server-enhanced.sh --status my-server
./scripts/deploy-test-server-enhanced.sh --delete my-server

Enhanced Features:

  • βœ… API retry logic with rate limit handling
  • βœ… Real-time server type validation
  • βœ… Cloud-init size and syntax validation
  • βœ… Advanced security hardening
  • βœ… Automated health monitoring
  • βœ… Dry-run mode for testing
  • βœ… Verbose logging for troubleshooting

See DEPLOYMENT.md for detailed automation documentation and docs/enhanced-features.md for enhanced feature documentation.

πŸ“‹ Manual Deployment

If you prefer manual deployment or need to use a different cloud provider:

Step 1: Prepare SSH Key

Generate an SSH key pair if you don't have one:

ssh-keygen -t ed25519 -C "your-email@example.com"
cat ~/.ssh/id_ed25519.pub

Step 2: Configure cloud-init.yaml

Edit the cloud-init.yaml file and replace the SSH key placeholder with your actual public key:

ssh_authorized_keys:
  - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIYourActualPublicKeyHere your-email@example.com

Step 3: Deploy to Cloud Provider

Use your cloud provider's interface to create a new server with cloud-init:

Hetzner Cloud

  1. Create new server (CX31 or higher)
  2. Select Ubuntu 22.04 LTS
  3. Paste cloud-init.yaml content in "Cloud config" section
  4. Create server

AWS EC2

  1. Launch new EC2 instance (t3.large or higher)
  2. Select Ubuntu 22.04 LTS AMI
  3. In "Advanced Details" β†’ "User data", paste cloud-init.yaml content
  4. Configure security groups for ports 2222, 8080, 8443

Google Cloud Platform

  1. Create new Compute Engine instance (e2-standard-4 or higher)
  2. Select Ubuntu 22.04 LTS
  3. In "Management" β†’ "Automation", paste cloud-init.yaml content
  4. Configure firewall rules for required ports

DigitalOcean

  1. Create new Droplet (4GB or higher)
  2. Select Ubuntu 22.04 LTS
  3. Check "User data" and paste cloud-init.yaml content
  4. Configure firewall for required ports

Step 4: Access Your Server

Wait 5-10 minutes for installation to complete, then access your server:

# SSH access
ssh -p 2222 arcblock@YOUR_SERVER_IP

# Web interface
open http://YOUR_SERVER_IP:8080

# Admin panel
open http://YOUR_SERVER_IP:8080/.well-known/server/admin/

πŸ”§ Post-Deployment

Verify Installation

# Check deployment status
ssh -p 2222 arcblock@YOUR_SERVER_IP
sudo cloud-init status --long
sudo systemctl status blocklet-server

Initial Setup

  1. Access Admin Panel: Visit http://YOUR_SERVER_IP:8080/.well-known/server/admin/
  2. Complete Setup Wizard: Follow the on-screen instructions
  3. Configure SSL (optional): Set up Let's Encrypt certificates
  4. Install Blocklets: Browse and install your desired blocklets

πŸ€– Automation Tools

This project includes powerful automation scripts for easy testing and deployment:

Quick Commands

# Validate setup before deployment
./check-setup.sh

# Deploy with sensible defaults
./quick-deploy.sh

# Deploy different configurations
./quick-deploy.sh small    # Minimal server (cx11)
./quick-deploy.sh large    # High-performance (cx41)
./quick-deploy.sh us       # Deploy to US location

# Manage test servers
./quick-deploy.sh list            # List all test servers
./quick-deploy.sh delete my-test  # Clean up when done

Full Control

# Custom deployment with all options
./deploy-test-server.sh my-server cx31 fsn1

# Advanced server management
./deploy-test-server.sh --delete my-server

For complete automation documentation, see DEPLOYMENT.md

πŸ›‘οΈ Security Features

  • SSH Hardening: Key-only authentication on port 2222
  • Firewall Protection: UFW configured with minimal attack surface
  • Intrusion Prevention: Fail2ban monitoring and blocking
  • Automatic Updates: Security patches applied automatically
  • Process Isolation: Services run as non-root user

πŸ“š Documentation

πŸ”— Development Tools

For advanced users, developers, and contributors, comprehensive development tools are available in the ArcDeploy-Dev repository:

  • Testing Framework: Comprehensive test suites with 100+ scenarios
  • Debug Tools: Advanced debugging and diagnostic utilities
  • Failure Injection: Resilience testing with 31 failure scenarios
  • Performance Benchmarking: System performance analysis tools
  • Mock Infrastructure: Development and testing environments

πŸ†˜ Troubleshooting

Common Issues

Can't connect via SSH:

# Check if port 2222 is open
telnet YOUR_SERVER_IP 2222

# Verify SSH key is correct
ssh -p 2222 -v arcblock@YOUR_SERVER_IP

Blocklet Server not responding:

# Check service status
ssh -p 2222 arcblock@YOUR_SERVER_IP
sudo systemctl status blocklet-server
sudo journalctl -u blocklet-server -f

Cloud-init failed:

# Check cloud-init logs
sudo tail -f /var/log/cloud-init-output.log
sudo cloud-init status --long

🀝 Contributing

We welcome contributions! Please see our contribution guidelines.

For development-related contributions, please use the ArcDeploy-Dev repository.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support


Deploy with confidence. Scale with ease. πŸš€

About

ArcDeploy - Deploy smarter, not harder.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Languages