Skip to content

Latest commit

 

History

History
101 lines (77 loc) · 2.6 KB

File metadata and controls

101 lines (77 loc) · 2.6 KB

Contributing to DevOps Project

Thank you for your interest in contributing to this DevOps project! This document provides guidelines and instructions for contributing.

Development Setup

  1. Clone the repository and open in VS Code
  2. When prompted, reopen in the Dev Container
  3. Wait for the container to build and install dependencies
  4. Run the setup script: ./scripts/setup.sh

Code Standards

General

  • Follow the existing code style and conventions
  • Write clear, descriptive commit messages
  • Add documentation for new features
  • Update README.md if necessary

Terraform

  • Use consistent variable naming (snake_case)
  • Add descriptions to all variables and outputs
  • Use modules for reusable components
  • Tag all resources appropriately
  • Run terraform fmt before committing

Ansible

  • Follow YAML best practices
  • Use meaningful task names
  • Add comments for complex logic
  • Use handlers for service restarts
  • Test with ansible-lint

Kubernetes

  • Use proper resource naming conventions
  • Add labels and annotations
  • Set resource limits and requests
  • Use secrets for sensitive data
  • Validate manifests before committing

Docker

  • Use multi-stage builds when appropriate
  • Run containers as non-root users
  • Add health checks
  • Minimize image layers
  • Use .dockerignore files

Testing

Before submitting a pull request:

  1. Run the setup script to validate all configurations
  2. Test Terraform configurations with terraform plan
  3. Lint Ansible playbooks with ansible-lint
  4. Validate Kubernetes manifests
  5. Test Docker builds locally
  6. Run pre-commit hooks

Pull Request Process

  1. Fork the repository
  2. Create a feature branch from develop
  3. Make your changes following the code standards
  4. Test your changes thoroughly
  5. Update documentation as needed
  6. Submit a pull request with a clear description

Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality. Install them with:

pre-commit install

The hooks will automatically run on every commit and check for:

  • Code formatting
  • Syntax validation
  • Security issues
  • Documentation updates

Issue Reporting

When reporting issues, please include:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment details
  • Relevant logs or error messages

Security

If you discover a security vulnerability, please email the maintainers directly instead of creating a public issue.

Questions?

Feel free to open an issue for questions about:

  • How to use specific features
  • Best practices for DevOps workflows
  • Architecture decisions
  • Tool recommendations