Available Commands
Ralph includes the following command-line entry points:ralph
The main production command for running Ralph.ralph.settings.prod) and provides access to all Django management commands.
Common Usage:
dev_ralph
Development version of Ralph with development-specific settings.ralph.settings.dev) which typically include:
- Debug mode enabled
- Development-specific middleware
- Verbose logging
- Development database settings
test_ralph
Test runner for Ralph with test-specific settings.ralph.settings.test) and forces their use regardless of environment variables. Test settings typically include:
- In-memory database for faster tests
- Disabled migrations
- Test-specific configurations
validate_ralph
Cross-validation tool for Ralph data integrity.- Orphaned records
- Invalid foreign key references
- Data integrity violations
- Configuration issues
Django Management Commands
Ralph is built on Django, so all Django management commands are available through the Ralph CLI.Database Commands
User Management
Static Files
Database Shell
Python Shell
Ralph-Specific Commands
Ralph extends Django with custom management commands for specific operations.LDAP Synchronization
Synchronize users from LDAP/Active Directory:- Connects to configured LDAP server
- Imports users matching filter criteria
- Updates existing user information
- Syncs group memberships
- Reports progress every 100 items
OpenStack Synchronization
Sync cloud resources from OpenStack:- Connects to configured OpenStack instances
- Downloads projects and instances
- Creates/updates Cloud Projects and Cloud Hosts in Ralph
- Deletes resources no longer in OpenStack
- Tags resources with configured tags
Data Import
Import data from various sources:Environment Variables
Ralph CLI commands respect several environment variables:string
Override the Django settings module. Default varies by command:
ralph:ralph.settings.proddev_ralph:ralph.settings.devtest_ralph:ralph.settings.test(forced)
boolean
Enable debug mode. Not recommended for production.
string
Database connection string (e.g.,
mysql://user:pass@localhost/dbname)string
Django secret key for cryptographic signing. Must be set in production.
Running in Production
Using systemd
Create a systemd service file (/etc/systemd/system/ralph.service):
Using Supervisor
Create a supervisor config (/etc/supervisor/conf.d/ralph.conf):