A modern Python tool for local development and testing of Splunk apps with interactive guidance, cross-platform support, and comprehensive validation.
β οΈ Development Tool: This tool is designed for local app development and testing environments. For production deployments, we recommend implementing proper CI/CD pipelines with automated testing, code review, and deployment approval processes.
- π Modern Python Implementation - Clean, maintainable code with type hints
- π Cross-Platform Support - Works on Linux, macOS, and Windows
- π― Interactive App Selection - Choose from available apps with version display
- π Informative Restart Prompts - Understand why Splunk needs to restart
- πΎ Automatic Backups - Safe deployment with rollback capability
- β Structure Validation - Ensures apps meet Splunk requirements
- π Git Integration - Optional commit creation with deployment summary
- π Comprehensive Logging - Detailed logs for troubleshooting
- π¨ Colored Output - Enhanced user experience with visual feedback
- π οΈ Flexible Options - Command-line arguments or interactive mode
- Python 3.6+
- Splunk Enterprise 8.0+
- Git (optional, for version control integration)
-
Clone the repository:
git clone https://github.com/MooseQuest/splunk_app_deployer.git cd splunk_app_deployer
-
Make the script executable:
chmod +x splunk_app_deployer.py
-
Run your first deployment:
python3 splunk_app_deployer.py --help
# Interactive mode with OS-specific guidance
python3 splunk_app_deployer.py
# Quick deployment with automatic restart
python3 splunk_app_deployer.py --restart
# Specify custom Splunk installation
python3 splunk_app_deployer.py --splunk-home /opt/splunk --restart
- Installation Guide - Detailed setup instructions for all platforms
- User Guide - Complete usage guide with examples and workflows
- Developer Guide - Technical guide for extending and customizing the tool
- Troubleshooting - Comprehensive troubleshooting guide for common issues
This tool is designed for local development environments where developers are:
- Building and testing Splunk apps locally
- Iterating on app configurations and dashboards
- Validating app structure and functionality
- Learning Splunk app development concepts
# Development workflow - multiple apps, restart once at the end
python3 splunk_app_deployer.py # App 1, choose 'n' for restart
python3 splunk_app_deployer.py # App 2, choose 'n' for restart
python3 splunk_app_deployer.py # App 3, choose 'y' for restart
Suitable for controlled testing environments:
- Development Splunk instances
- Testing new app versions before production
- Validating app compatibility and functionality
# Testing deployment with validation
python3 splunk_app_deployer.py --splunk-home /opt/splunk-dev --restart
While this tool can be used for production, we strongly recommend implementing proper CI/CD pipelines for production deployments that include:
- Automated Testing: Unit tests, integration tests, and validation checks
- Code Review: Peer review and approval processes
- Deployment Approval: Manual approval gates for production changes
- Rollback Capabilities: Automated rollback on deployment failures
- Monitoring & Alerting: Deployment success/failure monitoring
- Audit Logging: Complete deployment audit trails
Recommended Production Tools:
- GitLab CI/CD or GitHub Actions for automation
- Splunk REST API for programmatic deployments
- Ansible or Terraform for infrastructure-as-code
- Splunk Deployment Server for large-scale app distribution
Platform | Status | Default Splunk Path | Notes |
---|---|---|---|
Linux | β Full Support | /opt/splunk |
Systemd integration |
macOS | β Full Support | /Applications/Splunk |
Launchd integration |
Windows | β Full Support | C:\Program Files\Splunk |
Services integration |
The tool includes comprehensive restart guidance that explains:
- Why Splunk restart is required (based on official documentation)
- What happens during restart (step-by-step process)
- How to verify successful deployment (validation checklist)
- When NOT to restart (timing considerations)
- Manual restart options (OS-specific commands)
Usage: python3 splunk_app_deployer.py [OPTIONS]
Options:
--splunk-home PATH Path to Splunk installation directory
--splunk-apps-dir PATH Target apps directory (default: SPLUNK_HOME/etc/apps)
--restart Automatically restart Splunk after deployment
--help, -h Show help message
Examples:
python3 splunk_app_deployer.py # Full interactive mode
python3 splunk_app_deployer.py --restart # Interactive with auto-restart
python3 splunk_app_deployer.py --splunk-home /opt/splunk --restart # Fully automated
splunk_app_deployer/
βββ splunk_app_deployer.py # Main deployment script
βββ README.md # This file
βββ LICENSE # MIT License
βββ CHANGELOG.md # Version history
βββ CONTRIBUTING.md # Contribution guidelines
βββ requirements.txt # Python dependencies (none!)
βββ docs/ # Documentation
β βββ INSTALLATION.md
β βββ USER_GUIDE.md
β βββ DEVELOPER_GUIDE.md
β βββ TROUBLESHOOTING.md
β βββ ARCHITECTURE.md
βββ examples/ # Example configurations
β βββ sample_app_structure/
β βββ deployment_scripts/
βββ tests/ # Test files (future)
βββ test_deployer.py
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Run the linter:
python -m flake8 splunk_app_deployer.py
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- General Contact: [email protected]
- Splunk Inc. for comprehensive documentation
- Python Community for excellent standard library
- Open Source Contributors who help improve this tool
- Unit Tests - Comprehensive test coverage
- Docker Support - Containerized deployment scenarios
- Cluster Deployment - Search head cluster support
- Web Interface - Optional web-based UI
- Configuration Validation - Advanced app.conf validation
- Performance Metrics - Deployment timing and statistics
If this project helps you, please consider giving it a star on GitHub! β
Made with β€οΈ for the Splunk Community