Commit 967e0fc
Improve: Complete File Copier & Orchestrator plugin documentation (2 of 5)
Enhanced two critical plugin types with comprehensive guides, real-world examples,
and best practices.
## 1. File Copier Plugins (73 → 975 lines, 13.4x increase) ✅
**Major Additions:**
**Complete Java Examples (600+ lines of code):**
- SFTP File Copier (250+ lines)
- JSch integration with proper authentication
- SSH key from Key Storage
- Session management and cleanup
- Chmod for executable scripts
- Error handling and timeouts
- HTTP Upload Copier (150+ lines)
- Upload to HTTP endpoint, node downloads
- HttpClient with authentication
- Unique filename generation
- Node executor integration pattern
**Complete Script Examples:**
- rsync Copier (full plugin.yaml + bash script)
- rsync with SSH integration
- Dynamic destination generation
- Executable permission handling
- S3 + wget Copier (complete working example)
- Upload to S3 bucket
- Presigned URL generation
- Node downloads via wget
- Expiry handling
**Best Practices (10 practices with code):**
- Handle destination parameter correctly
- Make scripts executable (chmod)
- Clean up temp files
- Connection failure handling
- Implement timeouts
- Validate file transfer (checksums)
- Use Key Storage for credentials
- Support large files (streaming)
- Log transfer details
- Handle platform differences (Windows vs Linux)
**Troubleshooting Section:**
- File not found on node
- Permission denied
- Transfer timeouts
- Authentication failures
- Disk space issues
**Quick Reference:**
- Return value requirements
- Three copy methods table
- Node attributes table
- Common libraries table
## 2. Orchestrator Plugins (41 → 302 lines, 7.4x increase) ✅
**Major Additions:**
**Real-World Scenarios:**
- Rolling deployments (canary, waves)
- Blue-green deployments
- Database migrations with dependencies
- Load balancer management
- Tiered architecture updates
- Percentage-based rollouts
**Complete Java Example: Wave Deployment (200+ lines):**
- Multi-wave deployment (10%, 25%, 100%)
- Configurable wave percentages
- Wait between waves for monitoring
- Stop on failure option
- Wave preparation logic
- Success/failure tracking
**How Orchestrators Work:**
- Execution flow diagram
- Key methods explanation
- Threading model (single-threaded calls, multi-threaded execution)
- Factory + Instance pattern
- Rules that must be followed
**Quick Reference:**
- Factory method signature
- Orchestrator methods table
- Common patterns (sequential, percentage-based, waiting)
## Impact Summary
**Before:**
- File Copier: 73 lines (interface only)
- Orchestrator: 41 lines (minimal)
- **Total: 114 lines**
**After:**
- File Copier: 975 lines (comprehensive guide) ✅
- Orchestrator: 302 lines (complete guide) ✅
- **Total: 1,277 lines**
**Net Increase:** +1,163 lines (11.2x average)
## Why These Matter
**File Copier Plugins:**
- Essential for remote script execution
- Required for every script step
- Works hand-in-hand with Node Executors
- Cloud/container deployments need custom copiers
**Orchestrator Plugins:**
- Controls deployment strategy
- Critical for zero-downtime updates
- Enables progressive rollouts
- Risk management for production deployments
Both docs now include production-ready code examples and real-world use cases.
Next: 3 more plugin types to complete (content-converter, file-upload, storage-converter).
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 61f8f2a commit 967e0fc
File tree
2 files changed
+1207
-44
lines changed- docs/developer
2 files changed
+1207
-44
lines changed
0 commit comments