Skip to content

Mdskun/YML-Generator

Repository files navigation

🚀 YML Generator

A Professional YAML Configuration Generator for Docker Compose, Kubernetes, and Ansible

Python PyQt6 License

✨ Features

  • 🎯 Multi-Platform Support: Docker Compose, Kubernetes, Ansible
  • 📝 Rich Templates: 15+ pre-built production-ready templates
  • Real-time Validation: Syntax and schema validation
  • 🎨 Syntax Highlighting: Beautiful YAML preview
  • 💾 Import/Export: Save, load, and manage configurations

🖼️ Screenshots

Coming soon

🚀 Quick Start

Prerequisites

  • Python 3.9 or higher
  • pip (Python package manager)

Installation

  1. Clone or download the repository
cd yml_genarator
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
python main.py

📖 Usage Guide

Basic Workflow

  1. Select Mode: Choose between Docker Compose, Kubernetes, or Ansible
  2. Pick a Template: Start with a pre-built template or configure from scratch
  3. Configure: Fill in the form with your specific settings
  4. Generate: Click "Generate YAML" to create your configuration
  5. Validate: Check the validation tab for any issues
  6. Export: Save to file or copy to clipboard

Docker Compose Example

  1. Select "Docker Compose" mode
  2. Choose "Web Application" template
  3. Enter service details:
    • Service Name: webapp
    • Image: nginx:latest
    • Ports: 80:80
  4. Add volumes if needed
  5. Generate and save!

Kubernetes Example

  1. Select "Kubernetes" mode
  2. Choose "Deployment" template
  3. Configure:
    • Name: myapp
    • Replicas: 3
    • Image: myapp:v1.0
    • Port: 8080
  4. Generate manifest

Ansible Example

  1. Select "Ansible" mode
  2. Choose "Webserver Setup" template
  3. Customize:
    • Hosts: webservers
    • Tasks: Install and configure nginx
  4. Generate playbook

🎓 Templates

Docker Compose Templates

  • Web Application: Basic web server setup
  • Database: PostgreSQL/MySQL configuration
  • Microservices: Multi-service architecture
  • Full Stack: Frontend + Backend + Database

Kubernetes Templates

  • Deployment: Basic deployment with replicas
  • Service: ClusterIP, NodePort, LoadBalancer
  • StatefulSet: Stateful applications
  • ConfigMap: Configuration management
  • Secret: Sensitive data management
  • Ingress: HTTP(S) routing

Ansible Templates

  • Webserver Setup: Nginx/Apache installation
  • Package Installation: Common packages
  • User Management: User and SSH key setup
  • Security Hardening: Basic security tasks
  • Docker Installation: Install Docker on hosts

📁 Project Structure

yml_genarator/
│
├── main.py                 # Application entry point
├── requirements.txt        # Python dependencies
├── README.md              # This file
│
├── ui/                    # User Interface
│   ├── main_window.py
│   ├── syntax_highlighter.py
│   └── custom_widgets.py
│
├── core/                  # Core Logic
│   ├── generator.py
│   ├── validator.py
│   ├── template_manager.py
│   └── export_manager.py
│
├── templates/             # Configuration Templates
│   ├── docker_compose/
│   ├── kubernetes/
│   └── ansible/
│
└── tests/                # Unit Tests
    ├── test_generator.py
    └── test_validator.py

🤝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Install dev dependencies
pip install -r requirements.txt

# Run tests
pytest tests/

# Format code
black .

# Type checking
mypy .

🐛 Bug Reports

Found a bug? Please open an issue with:

  • Description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable
  • Your environment (OS, Python version)

📝 Changelog

Version 2.0.0 (Current)

  • ✨ Complete rewrite with PyQt6
  • ✨ Added Kubernetes and Ansible support
  • ✨ Template system with 15+ templates
  • ✨ Real-time validation
  • ✨ Syntax highlighting

Version 1.0.0

  • 🎉 Initial release
  • Basic Docker Compose support(single file- still in repo as yml_builder.py)

📄 License

MIT License - see LICENSE file for details

Acknowledgments

  • PyQt6 for the amazing GUI framework
  • ruamel.yaml for YAML processing
  • The Docker, Kubernetes, and Ansible communities

📧 Contact

Questions? Feedback? Reach out!

  • GitHub Issues: [Report bugs or request features]
  • Email: [Your email]

Star this project if you find it useful!

💡 Have an idea? Let's discuss!

Built with ❤️ for DevOps engineers and developers

About

AYAML Configuration Generator for Docker Compose, Kubernetes, and Ansible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages