A CLI tool that scaffolds production-ready DevOps repositories
Project description
๐ DevOps Project Generator
A powerful CLI tool that scaffolds production-ready DevOps repositories based on user-selected options like CI/CD, infrastructure, deployment, environments, observability, and security.
โจ Why DevOps Project Generator?
Setting up a real-world DevOps project from scratch is repetitive and error-prone. This tool helps you bootstrap a complete DevOps-ready repository in seconds, following industry best practices.
โ Opinionated but configurable
โ Beginner-friendly, production-oriented
โ CLI support
โ No tool lock-in
๐ฏ Who Is This For?
- DevOps Engineers
- Cloud Engineers
- Platform Engineers
- SREs
- Students & freshers building real DevOps projects
๐ Key Features
๐ฏ Project Generation
- Fast scaffolding - Generate complete DevOps projects in seconds
- Interactive mode - Guided setup with helpful prompts
- Flexible configuration - Choose your tech stack and tools
- Best practices - Industry-standard project structure
๐ Template Management (v1.3.0)
- Browse templates by category (CI, Infrastructure, Deployment, Monitoring, Security)
- Create custom templates with pre-populated Jinja2 syntax
- Template customization with variable guidance
- File size information and template metadata
๐ง Configuration Profiles (v1.4.0)
- Save configurations as reusable profiles
- Interactive profile creation with prompts
- Profile metadata (creation date, description)
- Command generation from saved profiles
- Persistent storage in user home directory
๐งช Integration Testing (v1.4.0)
- 6 test categories - Structure, Config files, Security, CI/CD, Documentation, Scripts
- Detailed scoring system (0-100%)
- Verbose mode for step-by-step testing
- Actionable error messages with specific failures
- Warning system for optional components
๐ฅ Project Health (v1.3.0)
- Comprehensive analysis of project health and best practices
- Health scoring with category breakdowns
- Intelligent recommendations for improvements
- Auto-fix capabilities for common issues
๐พ Backup & Restore (v1.3.0)
- Project archiving with timestamped backups
- Backup management with list and restore functions
- Configuration preservation during backup operations
๐ ๏ธ Advanced Management
- Project validation and structure checking
- Configuration file management system
- Project cleanup and teardown utilities
- Detailed statistics and project analysis
๐ Dependency Scanner (NEW v1.5.0)
- Multi-language support - Python, Node.js, Docker, Kubernetes dependencies
- Security analysis - Detect vulnerabilities and security issues
- Version tracking - Identify outdated packages and suggest updates
- Comprehensive reporting - Detailed reports with export options (JSON/YAML)
- Actionable recommendations - Specific improvement suggestions
๐ Multi-Environment Config Generator (NEW v1.5.0)
- Configuration inheritance - Base configs with environment-specific overrides
- Multiple formats - Kubernetes (Kustomize), Docker Compose, .env files
- Secrets management - Secure secrets template generation
- Deployment automation - Generated deployment scripts
- Validation tools - Configuration validation and diff utilities
๐ง What This Generator Creates
A full DevOps project structure covering:
- CI/CD pipelines
- Containerization
- Infrastructure (IaC-ready)
- Deployment models
- Environment separation
- Observability
- Security basics
All generated based on your selected options.
โ๏ธ Supported Options (v1)
CI/CD
- GitHub Actions
- GitLab CI
- Jenkins
- None
Infrastructure
- Terraform
- CloudFormation
- None
Deployment
- VM
- Docker
- Kubernetes
Environments
- Single
- Dev / Stage / Prod
Observability
- Logs only
- Logs + Metrics
- Full (Logs + Metrics + Alerts)
Security
- Basic
- Standard
- Strict
๐ฅ๏ธ Usage
CLI Usage
devops-project-generator init \
--ci github-actions \
--infra terraform \
--deploy kubernetes \
--envs dev,stage,prod \
--observability full \
--security standard
Interactive Mode
devops-project-generator init --interactive
List Available Options
devops-project-generator list-options
Project Configuration (NEW v1.2.0)
# Create a configuration file
devops-project-generator config create
# Show current configuration
devops-project-generator config show
# Validate configuration file
devops-project-generator config validate
Project Validation (NEW v1.2.0)
# Validate project structure
devops-project-generator validate
# Auto-fix common issues
devops-project-generator validate --fix
Project Information (NEW v1.2.0)
# Show project statistics
devops-project-generator info
# Detailed analysis
devops-project-generator info --detailed
Project Cleanup (NEW v1.2.0)
# Clean up a project (with confirmation)
devops-project-generator cleanup my-project
# Force cleanup without confirmation
devops-project-generator cleanup my-project --force
# Keep configuration files
devops-project-generator cleanup my-project --keep-config
Template Management (NEW v1.3.0)
# List available templates by category
devops-project-generator template list
# List templates from specific category
devops-project-generator template list --category ci
# Create custom template
devops-project-generator template create --category ci --name custom-pipeline
# Customize existing template
devops-project-generator template customize --category ci --name github-actions.yml
Configuration Profiles (NEW v1.4.0)
# List saved profiles
devops-project-generator profile list
# Save current configuration as a profile
devops-project-generator profile save --name webapp
# Load and display profile details
devops-project-generator profile load --name webapp
# Delete a saved profile
devops-project-generator profile delete --name webapp
Integration Testing (NEW v1.4.0)
# Run integration tests on generated project
devops-project-generator test my-project
# Run tests with verbose output
devops-project-generator test my-project --verbose
Project Backup (NEW v1.3.0)
# Create backup
devops-project-generator backup create my-project
# List available backups
devops-project-generator backup list
# Restore from backup
devops-project-generator backup restore my-project --file backup.tar.gz
Health Check (NEW v1.3.0)
# Basic health check
devops-project-generator health my-project
# Detailed health analysis
devops-project-generator health my-project --detailed
# Auto-fix health issues
devops-project-generator health my-project --fix
Dependency Scanner (NEW v1.5.0)
# Scan project dependencies
devops-project-generator scan my-project
# Detailed scan with full breakdown
devops-project-generator scan my-project --detailed
# Export scan report to file
devops-project-generator scan my-project --export report.json --format json
# Export as YAML report
devops-project-generator scan my-project --export report.yaml --format yaml
Multi-Environment Config Generator (NEW v1.5.0)
# Generate basic multi-environment configs
devops-project-generator multi-env my-project --envs "dev,stage,prod"
# Generate full configs with Kubernetes, Docker, and secrets
devops-project-generator multi-env my-project --envs "dev,stage,prod" --type full --with-secrets
# Generate only Kubernetes configs
devops-project-generator multi-env my-project --envs "dev,prod" --type kubernetes
# Generate only Docker Compose configs
devops-project-generator multi-env my-project --envs "dev,prod" --type docker
๐๏ธ Generated Project Structure (Example)
devops-project/
โโโ app/
โ โโโ sample-app/
โโโ ci/
โ โโโ pipelines/
โ โโโ README.md
โโโ infra/
โ โโโ terraform/
โ โโโ environments/
โโโ containers/
โ โโโ Dockerfile
โ โโโ docker-compose.yml
โโโ k8s/
โ โโโ base/
โ โโโ overlays/ # NEW: Environment-specific overlays
โ โโโ dev/
โ โโโ stage/
โ โโโ prod/
โโโ config/ # NEW: Multi-environment configs
โ โโโ base-application.yaml
โ โโโ .env.dev
โ โโโ .env.stage
โ โโโ .env.prod
โ โโโ secrets/ # NEW: Secrets templates
โ โโโ dev-secrets.yaml
โ โโโ stage-secrets.yaml
โ โโโ prod-secrets.yaml
โโโ docker/ # NEW: Docker Compose configs
โ โโโ docker-compose.yml
โ โโโ docker-compose.dev.yml
โ โโโ docker-compose.stage.yml
โ โโโ docker-compose.prod.yml
โโโ monitoring/
โ โโโ logs/
โ โโโ metrics/
โ โโโ alerts/
โโโ security/
โ โโโ secrets/
โ โโโ scanning/
โโโ scripts/
โ โโโ automation/
โ โโโ deploy.sh # NEW: Multi-environment deployment script
โโโ Makefile
โโโ README.md
๐ ๏ธ Tech Stack
Generator Core
- Python
- Jinja2
- YAML-based configuration
CLI
- Typer
- Rich
๐ฆ Installation
From PyPI
pip install devops-project-generator
From Source
git clone https://github.com/NotHarshhaa/devops-project-generator.git
cd devops-project-generator
pip install -e .
Development Setup
git clone https://github.com/NotHarshhaa/devops-project-generator.git
cd devops-project-generator
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
๐ Quick Start
-
Generate a new project
devops-project-generator init --name my-app --ci github-actions --deploy kubernetes
-
Navigate to your project
cd my-app
-
Setup the environment
make setup -
Start the application
make start -
Check health
make health
๐ Examples
Basic Web App with Docker
devops-project-generator init \
--name my-webapp \
--ci github-actions \
--deploy docker \
--envs single \
--observability logs \
--security basic
Enterprise Kubernetes App
devops-project-generator init \
--name enterprise-app \
--ci github-actions \
--infra terraform \
--deploy kubernetes \
--envs dev,stage,prod \
--observability full \
--security strict
Simple VM Deployment
devops-project-generator init \
--name simple-app \
--ci jenkins \
--deploy vm \
--envs dev,prod \
--observability logs-metrics \
--security standard
Dependency Security Scan (NEW v1.5.0)
# Generate project first
devops-project-generator init --name secure-app --ci github-actions --deploy docker
# Scan for dependencies and security issues
devops-project-generator scan secure-app --detailed --export security-report.json
# Review the generated report
cat security-report.json
Multi-Environment Setup (NEW v1.5.0)
# Generate project
devops-project-generator init --name multi-env-app --ci github-actions --deploy kubernetes
# Setup multi-environment configurations
devops-project-generator multi-env multi-env-app \
--envs "dev,stage,prod" \
--type full \
--with-secrets
# Deploy to specific environment
cd multi-env-app
./scripts/deploy.sh dev
# Or use kubectl directly
kubectl apply -k k8s/overlays/stage
Using Configuration Profiles
# Save a common configuration
devops-project-generator profile save --name webapp \
--ci github-actions \
--infra terraform \
--deploy docker \
--observability logs \
--security basic
# Generate project using saved profile
devops-project-generator init --ci github-actions --infra terraform --deploy docker --observability logs --security basic --name my-webapp
Template Customization
# List available CI templates
devops-project-generator template list --category ci
# Create custom pipeline template
devops-project-generator template create --category ci --name custom-pipeline
# Customize existing template
devops-project-generator template customize --category ci --name github-actions.yml
Integration Testing
# Generate project
devops-project-generator init --name test-project --ci github-actions --deploy docker
# Run integration tests
devops-project-generator test test-project
# Run tests with detailed output
devops-project-generator test test-project --verbose
๐ง Configuration
Global Configuration
You can set default options in ~/.devops-generator/config.yaml:
defaults:
ci: github-actions
deploy: kubernetes
observability: logs-metrics
security: standard
Project Templates
The generator supports custom templates. Place your templates in:
~/.devops-generator/templates/
โโโ ci/
โโโ infra/
โโโ deploy/
โโโ monitoring/
โโโ security/
๐งช Testing
Run Tests
pytest
Run Tests with Coverage
pytest --cov=devops_project_generator --cov-report=html
Run Linting
flake8 devops_project_generator/
black devops_project_generator/
mypy devops_project_generator/
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
Adding New Features
- New CI/CD Platform: Add templates in
templates/ci/ - New Infrastructure Tool: Add templates in
templates/infra/ - New Deployment Method: Add templates in
templates/deploy/ - New Security Level: Add templates in
templates/security/
๐ Documentation
๐ Troubleshooting
Common Issues
-
Permission Denied
chmod +x scripts/setup.sh scripts/deploy.sh
-
Template Not Found
- Check if template files exist in
templates/ - Verify template syntax
- Check if template files exist in
-
Generated Files Not Executable
find . -name "*.sh" -exec chmod +x {} \;
Getting Help
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
๐บ๏ธ Roadmap
v1.1 โ
- Performance optimizations (95%+ faster generation)
- Concurrent file generation
- Enhanced error handling and validation
- Template caching and pre-loading
- Better user experience with improved messages
v1.2 โ
- Project validation and structure checking
- Configuration file management system
- Project cleanup and teardown utilities
- Detailed project statistics and analysis
- DevOps maturity scoring
- Intelligent recommendations system
v1.3 โ
- Template management and customization system
- Project backup and restore functionality
- Comprehensive health monitoring and scoring
- Auto-fix capabilities for common issues
- Advanced project analysis and recommendations
v1.4 โ
- Enhanced template management with category support
- Configuration profiles for reusable setups
- Integration testing with comprehensive validation
- Project scoring and quality assessment
- Verbose testing mode with detailed feedback
- Profile management with persistent storage
v1.5 โ (Current)
- NEW: Dependency scanner with security analysis
- NEW: Multi-environment configuration generator
- Enhanced error handling with specific exception types
- Performance optimizations for template loading
- Cross-platform compatibility improvements
v1.6
- Support for Azure DevOps
- Additional cloud providers (GCP, Azure)
- More deployment targets (AWS ECS, Fargate)
- Advanced monitoring templates
- Plugin system for custom templates
- Multi-language project support
v2.0
- AI-powered recommendations
- Enterprise features and SSO integration
- Advanced project customization
- Team collaboration features
- Cloud IDE integration
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Typer - For the amazing CLI framework
- Rich - For beautiful terminal output
- Jinja2 - For powerful templating
- DevOps Community - For best practices and inspiration
๐ Contact
This project is crafted with ๐ก by Harshhaa.
Your feedback is always welcome! Let's build together. ๐
๐ง Connect with me:
๐ GitHub: @NotHarshhaa
๐ Portfolio: Personal Portfolio
๐ Links - Portfolio: Links
๐ Telegram Community: Join Here
๐ LinkedIn: Harshhaa Vardhan Reddy
Built with โค๏ธ by the DevOps community
Making DevOps accessible to everyone
Project details
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 devops_project_generator-1.5.0.tar.gz.
File metadata
- Download URL: devops_project_generator-1.5.0.tar.gz
- Upload date:
- Size: 53.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1bc5782db9c37db14234f247408af291b029cbe875858f95dfd073a274857e9
|
|
| MD5 |
218e89f56a9b9239f3c82a67ee251c50
|
|
| BLAKE2b-256 |
4c96bbf4066874872eaaf5f99999ca24efbc8c6ab106e80a8e8fdf0704f7694d
|
File details
Details for the file devops_project_generator-1.5.0-py3-none-any.whl.
File metadata
- Download URL: devops_project_generator-1.5.0-py3-none-any.whl
- Upload date:
- Size: 51.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c318c01c56d578748408ecd108e08978260306893e9e665b4de40edaf9539607
|
|
| MD5 |
1ca0b796e469164f689354820579661b
|
|
| BLAKE2b-256 |
538732271200d3af862184f9a33b7b53646ec1dd0d51846d3ee7a87e1f8fbe66
|