updates for deployment tool
This commit is contained in:
parent
9f7c2640b5
commit
5332351a06
4 changed files with 41 additions and 106 deletions
|
@ -1,29 +1,35 @@
|
|||
# Deploy-rs Integration Summary
|
||||
|
||||
## Overview
|
||||
|
||||
Successfully integrated deploy-rs into the Home Lab infrastructure as a modern, production-ready deployment method alongside the existing shell script approach.
|
||||
|
||||
## Completed Tasks ✅
|
||||
|
||||
### Task 1: Add deploy-rs input to flake.nix ✅
|
||||
|
||||
- Added `deploy-rs.url = "github:serokell/deploy-rs"` to flake inputs
|
||||
- Exposed deploy-rs in outputs function parameters
|
||||
- Validated with `nix flake check`
|
||||
|
||||
### Task 2: Create basic deploy-rs configuration ✅
|
||||
|
||||
- Configured all 4 machines in `deploy.nodes` section
|
||||
- Used Tailscale hostnames for reliable connectivity
|
||||
- Set up proper SSH users and activation paths
|
||||
|
||||
### Task 3: Add deploy-rs health checks ✅
|
||||
|
||||
- Configured activation timeouts: 180s (local), 240s (VPS)
|
||||
- Set confirm timeouts: 30s for all machines
|
||||
- Enabled autoRollback and magicRollback for safety
|
||||
|
||||
### Task 4: Test deploy-rs on sleeper-service ✅
|
||||
|
||||
**Status**: Successfully completed on June 15, 2025
|
||||
|
||||
**Results**:
|
||||
|
||||
- ✅ Dry-run deployment successful
|
||||
- ✅ Actual deployment successful
|
||||
- ✅ Service management (transmission.service restart)
|
||||
|
@ -33,14 +39,17 @@ Successfully integrated deploy-rs into the Home Lab infrastructure as a modern,
|
|||
- ✅ Tailscale connectivity working perfectly
|
||||
|
||||
### Task 5: Integrate deploy-rs with lab tool ✅
|
||||
|
||||
**Status**: Successfully completed on June 15, 2025
|
||||
|
||||
**New Commands Added**:
|
||||
|
||||
- `lab deploy-rs <machine> [--dry-run]` - Modern deployment with automatic rollback
|
||||
- `lab update-flake` - Update package versions and validate configuration
|
||||
- `lab hybrid-update [target] [--dry-run]` - Combined flake update + deploy-rs deployment
|
||||
|
||||
**Features**:
|
||||
|
||||
- Hybrid approach combining package updates with deployment safety
|
||||
- Maintains existing legacy deployment commands for compatibility
|
||||
- Comprehensive help documentation with examples
|
||||
|
@ -60,6 +69,7 @@ Successfully integrated deploy-rs into the Home Lab infrastructure as a modern,
|
|||
## Usage Examples
|
||||
|
||||
### Basic Deploy-rs Usage
|
||||
|
||||
```bash
|
||||
# Deploy with automatic rollback protection
|
||||
lab deploy-rs sleeper-service
|
||||
|
@ -69,6 +79,7 @@ lab deploy-rs sleeper-service --dry-run
|
|||
```
|
||||
|
||||
### Hybrid Update Usage (Recommended)
|
||||
|
||||
```bash
|
||||
# Update packages and deploy to specific machine
|
||||
lab hybrid-update sleeper-service
|
||||
|
@ -82,6 +93,7 @@ lab update-flake
|
|||
```
|
||||
|
||||
### Legacy Usage (Still Available)
|
||||
|
||||
```bash
|
||||
# Traditional deployment method
|
||||
lab deploy sleeper-service boot
|
||||
|
@ -91,6 +103,7 @@ lab update boot
|
|||
## Technical Implementation
|
||||
|
||||
### Deploy-rs Configuration
|
||||
|
||||
```nix
|
||||
deploy.nodes = {
|
||||
sleeper-service = {
|
||||
|
@ -112,30 +125,25 @@ deploy.nodes = {
|
|||
```
|
||||
|
||||
### Lab Tool Integration
|
||||
|
||||
The lab tool now provides three deployment approaches:
|
||||
|
||||
1. **Legacy**: Reliable SSH + rsync method (existing workflow)
|
||||
2. **Modern**: Direct deploy-rs usage with safety features
|
||||
3. **Hybrid**: Automated package updates + deploy-rs deployment
|
||||
|
||||
## Pending Tasks
|
||||
## Next Steps
|
||||
|
||||
### Completed Tasks ✅
|
||||
- ✅ **Task 6**: Test deploy-rs on all machines (grey-area, reverse-proxy, congenital-optimist) - **COMPLETED**
|
||||
### Pending Tasks
|
||||
|
||||
**Results:**
|
||||
- **grey-area**: ✅ Deploy-rs deployment successful (both dry-run and actual)
|
||||
- **reverse-proxy**: ✅ Deploy-rs deployment successful (dry-run completed)
|
||||
- **congenital-optimist**: ✅ Deploy-rs deployment successful (both dry-run and actual)
|
||||
- **Infrastructure improvements**: Added `sma` user to local machine, created shared shell aliases module
|
||||
- **User management**: Resolved shell alias conflicts with user-specific aliases
|
||||
|
||||
### Remaining Tasks
|
||||
- **Task 6**: Test deploy-rs on all machines (grey-area, reverse-proxy, congenital-optimist)
|
||||
- **Task 7**: Add deploy-rs status monitoring to lab tool
|
||||
- **Task 8**: Create deployment workflow documentation
|
||||
- **Task 9**: Optimize deploy-rs for home lab network
|
||||
- **Task 10**: Implement emergency rollback procedures
|
||||
|
||||
### Recommendations
|
||||
|
||||
1. Use **hybrid-update** for regular maintenance (combines updates + safety)
|
||||
2. Use **deploy-rs** for quick configuration changes
|
||||
3. Keep **legacy deploy** as fallback method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue