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

๐Ÿง  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
devops-project-generator template list

# Create custom template
devops-project-generator template create --name my-template

# Customize existing template
devops-project-generator template customize --name my-template

# Export templates
devops-project-generator template export --output ./templates

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

๐Ÿ”ง 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 โœ… (Current)

  • 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

  • Support for Azure DevOps
  • Additional cloud providers (GCP, Azure)
  • More deployment targets (AWS ECS, Fargate)
  • Advanced monitoring templates
  • Plugin system for custom templates

v2.0

  • Multi-language support
  • Advanced project customization
  • AI-powered recommendations
  • Enterprise features

๐Ÿ“„ 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.3.0.tar.gz (31.1 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.3.0-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: devops_project_generator-1.3.0.tar.gz
  • Upload date:
  • Size: 31.1 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.3.0.tar.gz
Algorithm Hash digest
SHA256 c48207f325079c0118f808f01f0476d677adb6c19995afc8df06730b0aabfb11
MD5 0d391b21497ad34ea648ba667913e532
BLAKE2b-256 d3d70bbd71133ccff2b9f51d2fd8cc76d3472ba82c550092b01883428147a08e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for devops_project_generator-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73d6cbf39c6936c9e9f61fb5db7e9c944560e716e5371432992bd207ee5aa342
MD5 58b9517f7585b62144814e72e7c3093f
BLAKE2b-256 ade6616c8b6fd1bc1c579e7ae6fb4a7191cabc8a1e2ae143e0ecd32a297f56d3

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