CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
deploy lock (Coming Soon)
This command may not work as expected. A complete and stable version is coming soon.
Lock deployment state to prevent concurrent deployments and maintain deployment integrity.
Synopsis
wheels deploy lock <action> [options]
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
wheels deploy lock acquire --reason "Deploying version 2.1.0"
Check lock status
wheels deploy lock status
Release lock
wheels deploy lock release
Wait for lock availability
wheels deploy lock wait --wait-timeout 300
Force release stuck lock
wheels deploy lock force-release --reason "Previous deployment crashed"
List all locks
wheels deploy lock list
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:
wheels deploy lock acquire --reason "Database maintenance" --duration 60
Automatic locks
System-acquired locks during automated deployments:
# Automatically acquired during deployment
wheels deploy exec
Emergency locks
High-priority locks for critical operations:
wheels deploy lock acquire --force --reason "Emergency hotfix"
Use Cases
Maintenance window
# Lock environment for maintenance
wheels deploy lock acquire \
--reason "Scheduled maintenance" \
--duration 120 \
--metadata '{"ticket": "MAINT-123"}'
# Perform maintenance...
# Release when done
wheels deploy lock release
Coordinated deployment
# Wait for lock and deploy
wheels deploy lock wait --wait-timeout 600
wheels deploy exec --auto-lock
CI/CD integration
# In CI/CD pipeline
if wheels deploy lock acquire --reason "CI/CD Deploy #${BUILD_ID}"; then
wheels deploy exec
wheels deploy lock release
else
echo "Could not acquire lock"
exit 1
fi
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
# Check who owns the lock
wheels deploy lock status
# Wait for it to be released
wheels deploy lock wait
# Or coordinate with lock owner
Lock expired during operation
# Extend lock duration if still needed
wheels deploy lock acquire --extend
Cannot release lock
# Verify you own the lock
wheels deploy lock status --verbose
# Force release if necessary
wheels deploy lock force-release --reason "Lock owner unavailable"
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
- Synopsis
- Actions
- Options
- Examples
- Acquire deployment lock
- Check lock status
- Release lock
- Wait for lock availability
- Force release stuck lock
- List all locks
- Lock Information
- Lock Types
- Manual locks
- Automatic locks
- Emergency locks
- Use Cases
- Maintenance window
- Coordinated deployment
- CI/CD integration
- Lock States
- Available
- Locked
- Expired
- Force-locked
- Best Practices
- Error Handling
- Lock already exists
- Lock expired during operation
- Cannot release lock
- Integration
- See Also