Meza commands

From Freephile Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Meza has recently added a complete audit, overhaul and expansion of its commands plus help and documentation of commands. The commands are inside meza.py. For each command, there is a markdown file in 'manual/meza-cmd/' which can be easily viewed online and are also displayed to the console via Meza's help system.

Below we share an embed of https://github.com/freephile/meza/blob/dev/manual/meza-cmd/index.md - the index file to the meza command help system.

Meza Command Reference

Meza is a comprehensive MediaWiki deployment automation platform. Use these commands to manage your MediaWiki environments.

Core Commands

Environment Management

Wiki Operations

Maintenance & Backup

  • meza backup - Create environment backups
  • meza maint - Run maintenance operations (jobs, rebuild, cleanup, encryption)
  • meza debug - Debug Ansible variables and configuration

Deployment Management

Quick Start

  1. Install Meza:

    # Download and install Meza
    # This approach does not work yet.
    curl -L https://raw.githubusercontent.com/nasa/meza/master/src/scripts/getmeza.sh | bash
    
    # Run the installer from a locally cloned repository:
    sudo bash src/scripts/getmeza.sh
    
  2. Deploy default environment:

    meza deploy monolith
    
  3. Create your first wiki:

    meza create wiki monolith
    

Common Workflows

Development Setup

# Download and install Meza first
sudo bash src/scripts/getmeza.sh
meza setup dev                    # Set up development tools
meza deploy monolith             # Deploy local environment
meza create wiki monolith        # Create test wiki

Production Deployment

meza setup env production        # Set up production environment
meza backup production           # Backup before changes
meza deploy production           # Deploy to production
meza deploy-tail production      # Monitor deployment progress

Wiki Management

meza list-wikis production       # List existing wikis
meza create wiki production      # Add new wiki
meza backup production           # Backup before deletion
meza delete wiki production      # Remove wiki

Deployment Monitoring & Control

meza deploy-check production     # Check if deployment is running
meza deploy-tail production      # Follow deployment logs in real-time
meza deploy-kill production      # Kill stuck deployment if needed
meza deploy-unlock production    # Remove deployment lock after issues

Version Management

meza update                      # List available versions
meza update 43.39.5             # Update to specific version
meza deploy production           # Deploy version changes

Maintenance Operations

meza maint run-jobs production   # Run MediaWiki job queue
meza maint rebuild production    # Rebuild search index and SMW
meza maint cleanuploadstash production  # Clean upload stash
meza maint encrypt-string production "secret"  # Encrypt sensitive data
meza maint decrypt-string production "encrypted"  # Decrypt data

Getting Help

  • Use meza <command> --help for detailed command help
  • Check /opt/meza/manual/ for additional documentation
  • See project documentation at the Meza repository

Environment Concepts

  • Environment: A complete MediaWiki deployment (e.g., "production", "development")
  • Wiki: Individual wiki within an environment
  • Monolith: Single-server environment (default for development)

Configuration

  • Public config: /opt/conf-meza/public/<environment>/
  • Secret config: /opt/conf-meza/secret/<environment>/
  • Core defaults: /opt/meza/config/defaults.yml