Skip to main content

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

๐Ÿง  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

๐Ÿ—๏ธ Generated Project Structure (Example)

devops-project/
โ”œโ”€โ”€ app/
โ”‚   โ””โ”€โ”€ sample-app/
โ”œโ”€โ”€ ci/
โ”‚   โ”œโ”€โ”€ pipelines/
โ”‚   โ””โ”€โ”€ README.md
โ”œโ”€โ”€ infra/
โ”‚   โ”œโ”€โ”€ terraform/
โ”‚   โ””โ”€โ”€ environments/
โ”œโ”€โ”€ containers/
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ””โ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ k8s/
โ”‚   โ”œโ”€โ”€ base/
โ”‚   โ””โ”€โ”€ overlays/
โ”œโ”€โ”€ monitoring/
โ”‚   โ”œโ”€โ”€ logs/
โ”‚   โ”œโ”€โ”€ metrics/
โ”‚   โ””โ”€โ”€ alerts/
โ”œโ”€โ”€ security/
โ”‚   โ”œโ”€โ”€ secrets/
โ”‚   โ””โ”€โ”€ scanning/
โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ automation/
โ”œโ”€โ”€ 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

  1. Generate a new project

    devops-project-generator init --name my-app --ci github-actions --deploy kubernetes
    
  2. Navigate to your project

    cd my-app
    
  3. Setup the environment

    make setup
    
  4. Start the application

    make start
    
  5. 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

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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

Adding New Features

  1. New CI/CD Platform: Add templates in templates/ci/
  2. New Infrastructure Tool: Add templates in templates/infra/
  3. New Deployment Method: Add templates in templates/deploy/
  4. New Security Level: Add templates in templates/security/

๐Ÿ“š Documentation

๐Ÿ› Troubleshooting

Common Issues

  1. Permission Denied

    chmod +x scripts/setup.sh scripts/deploy.sh
    
  2. Template Not Found

    • Check if template files exist in templates/
    • Verify template syntax
  3. Generated Files Not Executable

    find . -name "*.sh" -exec chmod +x {} \;
    

Getting Help

๐Ÿ—บ๏ธ 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 โœ… (Current)

  • 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

  • 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

devops_project_generator-1.4.0.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devops_project_generator-1.4.0-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file devops_project_generator-1.4.0.tar.gz.

File metadata

  • Download URL: devops_project_generator-1.4.0.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for devops_project_generator-1.4.0.tar.gz
Algorithm Hash digest
SHA256 d33e6684fbd76ab534a89cdb03a5869cc240d352c44cada5044917ca5e79bd9f
MD5 0f0ccbfb9cb04437dbff6e946faeb821
BLAKE2b-256 6923a3374f26bc332e1f0f984d29d68f18019f468c8daee97073ad6809dd8091

See more details on using hashes here.

File details

Details for the file devops_project_generator-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for devops_project_generator-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e780340bef81f7fa6934747768c77da2f7430308639eb86743c90bfbddf0541
MD5 e387f51f3c3f84f70f3d7854a5fd1f90
BLAKE2b-256 81dd8a496c8b775d185ccf0b4b507154ba396296c56475fa224124f9e45bd538

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page