Expand description
§Rumi2 - Deployment Management CLI
Rumi2 is a robust CLI tool for deploying web applications, servers, and blockchain nodes with seamless SSH2 integration. It simplifies the deployment process to your existing server infrastructure, ensuring secure and efficient transfers with comprehensive backup, rollback, and monitoring capabilities.
§Features
- Website Hosting: One-command deployments with automatic SSL certificate generation
- Server Management: Binary deployment with automatic service management
- Ethereum Node Deployment: Full Ethereum node setup with geth
- Backup & Recovery: Automatic backups before deployments with easy restoration
- Configuration Management: JSON-based configuration with validation
- Security & Safety: Dry-run mode, SSH key authentication, firewall management
§Quick Start
# Initialize configuration
rumi2 config init
# Add SSH connection details
rumi2 config add-ssh --name prod --host server.com --user deploy
# Deploy a website
rumi2 hosting install --name my-site --domain example.com --dist-path ./dist
§Architecture
The library is organized into several key modules:
config
- Configuration management and validationsession
- SSH session management and command executionbackup
- Backup and restore functionalitycommands
- Deployment command implementationserror
- Error types and handling
§Examples
use rumi2::{config::RumiConfig, session::RumiSession};
// Load configuration
let config_path = RumiConfig::get_config_path();
let config = RumiConfig::load_from_file(&config_path)?;
// Create SSH session
if let Some(ssh_config) = config.default_ssh {
let session = RumiSession::new(ssh_config)?;
// Execute commands safely
let result = session.execute_command("uptime")?;
println!("Server uptime: {}", result.stdout);
}
Modules§
- backup
- certbot
- commands
- config
- Configuration Management
- error
- Error Types and Handling
- nginx
- session
- ufw
- utils
Structs§
Constants§
- ETH_
GETH_ NGINX_ CONFIG_ PATH - Path for Ethereum geth nginx proxy configuration
- NGINX_
WEB_ CONFIG_ PATH - Path where nginx site configuration files are stored (available sites)
- NGINX_
WEB_ SITE_ ENABLED - Path where nginx enabled site configuration files are symlinked
- SERVER_
BIN_ PATH - Default path for server binary installations on Unix systems
- SSL_
CERTIFICATE_ KEY_ PATH - Path where Let’s Encrypt SSL certificate private keys are stored
- SSL_
CERTIFICATE_ PATH - Path where Let’s Encrypt SSL certificates are stored
- WEB_
FOLDER - Default web root directory for hosting website files