wheels deploy lock
Lock deployment state to prevent concurrent deployments and maintain deployment integrity.
Synopsis
Description
The wheels deploy lock
command manages deployment locks to prevent concurrent deployments, ensure deployment atomicity, and maintain system stability during critical operations. This is essential for coordinating deployments in team environments and automated systems.
Actions
acquire
- Acquire a deployment lockrelease
- Release an existing lockstatus
- Check current lock statusforce-release
- Force release a stuck lock (use with caution)list
- List all active lockswait
- Wait for lock to become available
Options
--environment, -e
- Target environment to lock (default: production)--reason
- Reason for acquiring lock (required for acquire)--duration
- Lock duration in minutes (default: 30)--wait-timeout
- Maximum time to wait for lock in seconds--force
- Force acquire lock even if already locked--owner
- Lock owner identifier (default: current user)--metadata
- Additional lock metadata as JSON
Examples
Acquire deployment lock
Check lock status
Release lock
Wait for lock availability
Force release stuck lock
List all locks
Lock Information
Locks contain the following information:
Lock ID
Environment
Owner (user/system)
Acquisition time
Expiration time
Reason
Associated deployment ID
Metadata
Lock Types
Manual locks
User-initiated locks for maintenance or manual deployments:
Automatic locks
System-acquired locks during automated deployments:
Emergency locks
High-priority locks for critical operations:
Use Cases
Maintenance window
Coordinated deployment
CI/CD integration
Lock States
Available
No active lock, deployments can proceed
Locked
Active lock in place, deployments blocked
Expired
Lock duration exceeded, can be cleaned up
Force-locked
Emergency lock overriding normal locks
Best Practices
Always provide reasons: Clear reasons help team coordination
Set appropriate durations: Don't lock longer than necessary
Release locks promptly: Release as soon as operation completes
Handle lock failures: Plan for scenarios when locks can't be acquired
Monitor stuck locks: Set up alerts for long-running locks
Use force sparingly: Only force-release when absolutely necessary
Document lock usage: Keep records of lock operations
Error Handling
Common lock errors and solutions:
Lock already exists
Lock expired during operation
Cannot release lock
Integration
The lock system integrates with:
CI/CD pipelines for automated deployments
Monitoring systems for lock alerts
Deployment tools for automatic locking
Team communication tools for notifications
See Also
deploy exec - Execute deployment
deploy status - Check deployment status
deploy rollback - Rollback deployment
Last updated
Was this helpful?