Enterprise DevOps Automation Platform
Project description
MasterChief DevOps Automation Platform
A modular, extensible DevOps automation platform that enables continuous growth through plug-and-play components. Built for Azure-focused Infrastructure as Code with support for Terraform, Ansible, and PowerShell DSC.
๐ Meet Echo
Echo Starlite is the angel identity of MasterChief - an angel floating beside you (not above). Her wings are for shelter, not escape. When you start MasterChief, Echo greets you, always present, always ready to help.
New: Echo now has live chat capabilities! Chat with her in real-time, and she learns from your feedback to improve her responses. See ECHO_CHAT_QUICKSTART.md for details.
๐ Training Echo (NEW!)
Echo can now learn from your data! Upload training files directly through the REST API or web interface:
- Voice Training: Upload audio samples to train Echo's voice
- Knowledge Training: Upload JSON, CSV, or text files to teach Echo new commands and responses
- Data Ingestion: Upload files for automatic processing and analysis
Quick start: See docs/UPLOAD_QUICKSTART.md or try the web UI at docs/examples/data-upload-ui.html
๐ Echo Scenario Bot - Interactive Script Generation
Echo has evolved! She's now an interactive scripting bot that generates DevOps scripts through natural, scenario-based conversations. Instead of just parsing commands, Echo has conversations with you to understand exactly what you need.
Try it now:
python demo_scenario_bot.py
Example conversation:
You: I need to deploy my application to Kubernetes
Echo: What's the name of your application?
You: mywebapp
Echo: Which namespace should I deploy to?
You: production
Echo: [Generates custom deployment script]
Learn more in docs/ECHO_SCENARIO_BOT.md
Overview
MasterChief provides a unified framework for managing infrastructure and configuration across multiple tools and technologies. It features:
- Modular Architecture: Dynamic module loading and discovery system
- Multi-IaC Support: Terraform, Ansible, and PowerShell DSC
- DevOps Script Library: 18+ production-ready automation scripts
- AI Code Generation: Generate code on demand from natural language with local LLMs
- Script Wizard: AI-assisted script generation with templates
- Configuration Management: Environment-based configuration with inheritance
- Enhanced CLI: Comprehensive command-line interface with script execution
- Azure Focus: Comprehensive modules for Azure services
- CI/CD Ready: GitHub Actions workflows for validation and deployment
- Extensible: Plugin architecture for custom module types
- Echo Identity System: Visual representation and bot presence ๐
- Live Chat Bot: Trainable conversational AI with learning capabilities
Quick Start
# Clone repository
git clone https://github.com/jbalestrine/masterchief.git
cd masterchief
# Install dependencies
pip install -r requirements.txt
# Run health check
python -m core.cli.main health check
# List available DevOps scripts
python -m core.cli.main script list
# Execute a deployment script (dry-run)
python -m core.cli.main script run deploy-app.sh -- --app myapp --env dev --dry-run
# Generate custom script
python -m core.cli.main script generate --template deployment --output my-deploy.sh
# List available modules
python -m core.cli.main module list
Using the Platform
# Health checks
python -m core.cli.main health check # Quick health check
python -m core.cli.main health report # Detailed report
# Script management
python -m core.cli.main script list # List all scripts
python -m core.cli.main script run SCRIPT # Execute a script
# AI-powered code generation (requires Ollama)
python -m core.cli.main code generate # Interactive mode
python -m core.cli.main code generate "backup database to S3" # With description
python -m core.cli.main code generate "deploy to k8s" -l python -o deploy.py
python -m core.cli.main code explain script.sh # Explain a script
python -m core.cli.main code improve script.sh # Get improvement suggestions
# Dashboard (if Flask is installed)
python -m core.cli.main dashboard start --dev # Start Mission Control
# Module management
python -m core.cli.main module list # List modules
python -m core.cli.main module add PATH # Add module
# Status and monitoring
python -m core.cli.main status # Platform status
python -m core.cli.main logs # View logs
Available Modules
Terraform Modules
- azure-vnet: Virtual Network with subnets and NSGs
- azure-aks: Azure Kubernetes Service with multi-node pools
- azure-storage: Storage Account with containers and file shares
- azure-keyvault: Key Vault for secrets management
Ansible Roles
- common: Base Linux server configuration
- docker: Docker installation and configuration
PowerShell DSC
- CommonServer: Base Windows server configuration
- WebServer: IIS web server setup
Features in Detail
๐ DevOps Script Library
18+ production-ready automation scripts organized by category:
- Deployment: Application deployment, Docker, Kubernetes, blue/green strategies
- Infrastructure: VM provisioning, AKS clusters, network setup
- CI/CD: Docker builds, test runners, security scanning
- Monitoring: Health checks, metrics collection, alerting
- Security: Vulnerability scanning, secret rotation, compliance
- Database: Backups, migrations, replication
- Utilities: Cost analysis, resource cleanup, tagging
See SCRIPTS.md for complete documentation.
๐ค AI-Powered Code Generation
Generate code on demand from natural language descriptions using local LLMs:
# Interactive mode - fully guided experience
python -m core.cli.main code generate
# Generate with description
python -m core.cli.main code generate "backup MySQL database to S3 with compression"
# Generate Python script with specific output
python -m core.cli.main code generate "deploy to Kubernetes cluster" -l python -o deploy.py
# Explain what an existing script does
python -m core.cli.main code explain backup.sh
# Get improvement suggestions for a script
python -m core.cli.main code improve deploy.py
Requirements:
- Ollama installed and running
- A code-focused model like
codellama,llama2, ormistral
Setup:
# Install Ollama (see https://ollama.ai for instructions)
# Pull a model
ollama pull codellama
# Start Ollama (if not running)
ollama serve
# Generate code!
python -m core.cli.main code generate
๐ง Script Wizard
AI-assisted script generation with customizable templates:
# Generate via CLI
python -m core.cli.main script generate --template deployment
# Via REST API
curl -X POST http://localhost:5000/api/script-wizard/generate \
-d '{"template_id":"deployment","parameters":{"app_name":"myapp"}}'
๐ Mission Control Dashboard
Web-based management interface (backend ready):
- Real-time deployment status
- Script execution with output streaming
- Log viewer and analytics
- Module and plugin management
Start with: python -m core.cli.main dashboard start
Documentation
- Scripts Documentation - Complete script library reference
- Getting Started Guide - Step-by-step setup and usage
- Complete Documentation - Full platform documentation
- Module Development Guide - Create custom modules
- Architecture Overview - Platform architecture and design
- Quick Start Guide - Fast track to using MasterChief
Platform Architecture
core/ # Core platform engine
โโโ cli/ # Enhanced CLI with commands
โ โโโ commands/ # Script, dashboard, health commands
โโโ module-loader/ # Dynamic module discovery
โโโ config/ # Configuration management
โโโ logging/ # Centralized logging
โโโ api/ # Module communication
platform/ # Platform services
โโโ script_wizard/ # AI-assisted script generation
โโโ app.py # Flask web application
โโโ api.py # REST API endpoints
scripts/ # Automation scripts
โโโ devops/ # DevOps automation library
โ โโโ deployment/ # Deployment scripts
โ โโโ infrastructure/# Infrastructure scripts
โ โโโ cicd/ # CI/CD scripts
โ โโโ monitoring/ # Monitoring scripts
โ โโโ security/ # Security scripts
โ โโโ database/ # Database scripts
โ โโโ utils/ # Utility scripts
โโโ python/ # Python utilities
modules/ # Plug-and-play modules
โโโ terraform/ # Terraform IaC modules
โโโ ansible/ # Ansible roles & playbooks
โโโ powershell-dsc/ # PowerShell DSC configs
config/ # Configuration
โโโ environments/ # Environment-specific configs
Contributing
We welcome contributions! Please see our Module Development Guide for details on creating new modules.
Requirements
- Python 3.10+
- Terraform 1.5+ (for Terraform modules)
- Ansible 2.14+ (for Ansible modules)
- PowerShell 7+ (for DSC modules)
- Azure CLI (for Azure deployments)
License
MIT License - See LICENSE file for details
Support
For issues, questions, or contributions:
- Open an issue on GitHub
- Submit a pull request
- Contact: jbalestrine@users.noreply.github.com
MasterChief Enterprise DevOps Platform
A comprehensive, modular enterprise DevOps automation platform for managing infrastructure, deployments, and operations at scale.
๐ Features
Core Platform
- Module Loader System: Dynamic plugin discovery with hot-reload capabilities
- Configuration Engine: Hierarchical configuration with environment support (dev/staging/prod)
- Event Bus: Internal pub/sub messaging for event-driven architecture
- CLI Tool: Powerful
masterchiefcommand-line interface
Infrastructure as Code
- Terraform Azure Modules: Complete Azure infrastructure templates
- Virtual Networks with multi-tier subnets
- AKS clusters with auto-scaling
- Storage, databases, security, and more
- Ansible Automation: Server configuration and orchestration
- PowerShell DSC: Windows configuration management
- Kubernetes: Helm charts, Kustomize overlays, and policies
ChatOps & IRC Bot
- InspIRCd Server: Self-hosted IRC infrastructure
- Bot Engine: Eggdrop-style bot with TCL-inspired Python bindings
- Data Ingestion: Webhook receivers, log collectors, metric aggregators
- Data Upload: Upload training data and files for bot learning (REST API + Web UI)
- Web Client: Browser-based IRC interface with dashboards
Web IDE & Repository Management
- Monaco Editor: VS Code in the browser
- Git Operations: Full Git workflow support
- Live Editing: Real-time code editing and validation
System Management
- Process Management: Monitor and control services
- Package Management: OS, Python, Node.js package handling
- CMDB: Asset tracking and relationship mapping
- Audit Trail: Complete change history
Observability
- Dashboards: Grafana templates and custom builders
- Alerting: Multi-channel alert routing
- Logging: Fluent Bit integration
- SLO Management: Error budget tracking
Security & Compliance
- Policy-as-Code: OPA/Rego and Azure policies
- Secret Management: Azure Key Vault integration
- Compliance Frameworks: CIS, NIST, SOC2 support
๐ฆ Installation
Prerequisites
- Python 3.10 or higher
- pip and virtualenv
- Git
Quick Start
# Clone the repository
git clone https://github.com/jbalestrine/masterchief.git
cd masterchief
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
# Initialize a new project
masterchief init --name myproject --path ./myproject
cd myproject
# Check status
masterchief status
๐ฏ Usage
CLI Commands
# Initialize a project
masterchief init --name myproject
# Module management
masterchief module list
masterchief module add /path/to/module
masterchief module remove module-name
# Deployment
masterchief deploy --plan
masterchief deploy --auto-approve
# Status and monitoring
masterchief status
masterchief logs --follow
# Interactive mode
masterchief interactive
Configuration
Configuration is hierarchical with three levels:
- Global:
config/global/config.yaml - Environment:
config/environments/{env}.yaml - Module: Module-specific configurations
# config/global/config.yaml
project:
name: "My DevOps Platform"
version: "1.0.0"
platform:
module_dirs:
- modules
enable_hot_reload: true
Module Development
Create a new module with a manifest:
# modules/my-module/manifest.yaml
name: my-module
version: 1.0.0
description: My custom module
author: Your Name
dependencies: []
type: automation
entry_point: main
inputs:
- name: target
type: string
required: true
outputs:
- name: result
type: string
A complete DevOps platform with bootable OS distribution and full system management
๐ Features
Bootable OS Distribution
- Custom Ubuntu/Debian-based OS optimized for DevOps workloads
- ISO builder with automated installation
- USB bootable creator (cross-platform)
- First-boot configuration wizard
- Pre-installed DevOps tools and platform components
System Management
- Bare Metal Management: Hardware discovery, disk/storage, networking, boot configuration
- Service Management: Control and monitor system services with templates
- Process Management: Real-time monitoring and resource governors
- Package Hub: Unified interface for apt, pip, npm, docker, and more
- User & Access Management: RBAC, authentication, SSH keys
- CMDB & Asset Inventory: Automatic discovery and change tracking
- Backup & Recovery: Full system and incremental backups
- Monitoring & Health: System dashboards with alerting
Addons
- Shoutcast Integration: Streaming server management
- Jamroom Integration: Community platform setup
- Custom Script Manager: Upload, execute, and schedule scripts
Development Tools
- Web IDE: Full VS Code experience in browser with Monaco editor
- Git Integration: Visual git operations and diff viewer
- Integrated Terminal: PTY terminal in browser
- Project Management: File explorer and search
Observability
- Pre-configured Grafana dashboards
- Prometheus metrics collection
- Loki log aggregation
- Distributed tracing (Jaeger/Tempo)
Security
- CIS benchmark compliance
- Network security (firewall, fail2ban, IDS)
- Integrated Vault for secret management
- AppArmor/SELinux profiles
๐ Requirements
Minimum (Bootable OS)
- CPU: 2 cores (4+ recommended)
- RAM: 4GB (8GB+ recommended)
- Disk: 32GB (100GB+ recommended)
- USB: 8GB+ for bootable installer
Pre-installed Software
- Docker 24.x, k3s (Kubernetes)
- Terraform 1.5+, Ansible 2.14+, PowerShell 7+
- Python 3.10+, Node.js 18+
- PostgreSQL 15, Redis 7, Nginx
- InspIRCd 3.x
- Grafana, Prometheus, Loki, Cockpit
๐ ๏ธ Installation
Option 1: Bootable ISO
# Build the ISO
cd os/iso-builder
./build.sh
# Create bootable USB
cd ../usb-creator
./create-usb.sh /path/to/masterchief.iso /dev/sdX
Option 2: Docker Deployment
docker-compose up -d
Option 3: Manual Installation
# Install dependencies
pip install -r requirements.txt
npm install
# Run installation script
./scripts/install.sh
๐ฏ Quick Start
First Boot (from ISO)
- Boot from USB/ISO
- Follow the first-boot wizard:
- Set hostname and network
- Create admin user
- Configure SSH access
- Initialize platform services
- Access web interface at https://your-ip:8443
After Installation
# Start the platform
./start.sh
# Access web interface
# Default: https://localhost:8443
# Username: admin
# Password: (set during first boot)
๐ Documentation
๐๏ธ Architecture
masterchief/
โโโ core/ # Core platform components
โ โโโ module_loader/ # Dynamic module system
โ โโโ config-engine/ # Configuration management
โ โโโ event-bus/ # Event-driven messaging
โ โโโ cli/ # Command-line interface
โโโ modules/ # Infrastructure modules
โ โโโ terraform/ # Terraform templates
โ โโโ ansible/ # Ansible playbooks
โ โโโ powershell-dsc/ # DSC configurations
โ โโโ kubernetes/ # K8s manifests
โโโ chatops/ # IRC bot and integrations
โโโ platform/ # Web IDE, scripts, addons
โโโ observability/ # Monitoring and alerting
โโโ security/ # Policies and compliance
โโโ pipelines/ # CI/CD workflows
โโโ docs/ # Documentation
๐ Documentation
- Architecture - System design and components
- Runbooks - Operational procedures
- ADRs - Architecture decisions
- Module Development - Creating custom modules
- API Reference - API documentation
๐ง Development
Setup Development Environment
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Code formatting
black .
isort .
# Linting
flake8
mypy core/
Running Tests
# All tests
pytest
# With coverage
pytest --cov=core --cov=modules
# Specific test file
pytest tests/unit/test_module_loader.py
โโโ os/ # Bootable OS distribution
โ โโโ base/ # Base OS configuration
โ โโโ iso-builder/ # ISO build system
โ โโโ usb-creator/ # USB creation tool
โ โโโ first-boot/ # First boot wizard
โโโ platform/ # Core platform
โ โโโ bare-metal/ # Hardware management
โ โโโ services/ # Service manager
โ โโโ processes/ # Process manager
โ โโโ packages/ # Package hub
โ โโโ users/ # User management
โ โโโ cmdb/ # Asset inventory
โ โโโ backup/ # Backup system
โ โโโ monitoring/ # Health monitoring
โ โโโ web-ide/ # Web IDE
โโโ addons/ # Addon integrations
โ โโโ shoutcast/ # Shoutcast server
โ โโโ jamroom/ # Jamroom CMS
โ โโโ scripts/ # Script manager
โโโ docs/ # Documentation
โโโ scripts/ # Utility scripts
โโโ docker-compose.yml # Container orchestration
๐ค Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with modern DevOps best practices
- Inspired by enterprise automation needs
- Community-driven development
๐ Support
- Issues: GitHub Issues
- Documentation: Wiki
- Discussions: GitHub Discussions Contributions are welcome! Please read CONTRIBUTING.md for details.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Ubuntu/Debian for base OS
- Docker, Kubernetes (k3s)
- Terraform, Ansible, PowerShell
- Grafana, Prometheus, Loki
- Monaco Editor (VS Code)
- And all other open source projects that make this possible
๐ Support
- Documentation: docs/
- Issues: GitHub Issues
- IRC: #masterchief on your configured server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file masterchief-2.1.0.tar.gz.
File metadata
- Download URL: masterchief-2.1.0.tar.gz
- Upload date:
- Size: 294.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b18255876b805ac37aa1323247b1c1765703f649d2b5b380ccd70cb1350dedca
|
|
| MD5 |
1ea1a5925837cb4abba9ec5ed7f0c4a1
|
|
| BLAKE2b-256 |
2246c4a3e8714a8ff68d74971652536fd05811542414ed9166281796e4e984a7
|
File details
Details for the file masterchief-2.1.0-py3-none-any.whl.
File metadata
- Download URL: masterchief-2.1.0-py3-none-any.whl
- Upload date:
- Size: 381.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
996f8ea17929e747b455eec2234face301b5a8b5969006add4e22b2e4d1bd68c
|
|
| MD5 |
d6d8d9866def231eec7685890a755d02
|
|
| BLAKE2b-256 |
7de5dfbed7e38b79f24a94bcdcc493d866429dc92d565eaf871037005a7fd83e
|