Skip to content

Kartvel97/devops-bash-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

DevOps Bash Toolkit

🚀 A collection of script templates and configurations for DevOps tasks


👋 About

Hello! 👋 I'm learning DevOps practices and building this collection of script templates as part of my learning journey. Here you'll find ready-to-use templates for automating various DevOps tasks: monitoring, health checks, backups, deployments, and more.

🔄 Project Status

Project is actively developing and constantly updated with new scripts, configurations and examples as I learn DevOps tools.

  • ✨ New templates are regularly added
  • 🔧 Existing scripts are improved
  • 📚 Documentation is expanded
  • 🐛 Found issues are fixed

📚 Sources

Scripts are collected from various sources while learning DevOps:

  • 📖 Official documentation - Docker, Kubernetes, Terraform, GitHub Actions, etc.
  • Best Practices - commonly accepted DevOps community practices
  • 🎓 Learning materials - courses, tutorials and guides
  • 💬 Community - Stack Overflow, GitHub, blogs and forums
  • 🔧 Personal experience - adaptation and combination of approaches

🛠️ Technologies

  • 🐧 Bash - automation and monitoring scripts
  • 🐍 Python - analysis scripts and API work
  • 🐳 Docker - containerization and image management
  • ☸️ Kubernetes - container orchestration
  • 🏗️ Terraform - Infrastructure as Code (IaC)
  • 🔄 CI/CD - GitHub Actions, GitLab CI
  • 📦 Ansible - configuration automation
  • 🌐 Nginx - web server and proxy
  • 🔒 SSL/TLS - certificate management

⚠️ Important: All scripts are templates created for educational purposes. They require adaptation to your environment and testing before use in production.

📁 Project Structure

Bash Scripts

  • health-check.sh - Website availability check
  • ssl-cert-check.sh - SSL certificate expiration check
  • service-status.sh - Systemd service status check
  • disk-space-check.sh - Disk space check
  • monitor-cpu-ram.sh - CPU and RAM usage monitoring
  • backup-archive.sh - Create archive backups
  • cleanup-logs.sh - Cleanup old logs
  • log-rotate.sh - Log rotation
  • docker-cleanup.sh - Cleanup unused Docker resources
  • dns-check.sh - DNS records check
  • deploy.sh - Deployment script
  • nginx-top-ips.sh - Top IP addresses from Nginx logs
  • alert-email.sh - Send email alerts

Python Scripts

  • parse-nginx-log.py - Parse and analyze Nginx logs
  • health-check-port.py - Port availability check
  • api-json.py - JSON API operations

Kubernetes

  • kubernetes-deployment.yaml - Kubernetes Deployment template
  • kubernetes-service.yaml - Kubernetes Service template

Terraform

  • ec2-instance.tf - EC2 instance configuration
  • security-group.tf - Security Group configuration
  • terraform-outputs.tf - Terraform outputs

CI/CD

  • github-actions.yml - GitHub Actions workflow
  • gitlab-ci.yml - GitLab CI/CD pipeline

Docker

  • Dockerfile - Dockerfile example
  • docker-compose.yml - Docker Compose configuration

Ansible

  • ansible-playbook.yml - Ansible playbook template

Flask Scripts

  • flask-scripts/ - Scripts for Flask applications
    • backup.sh, restore.sh, verify-backup.sh, check-metrics.sh, monitor-logs.sh

🚀 Usage

Bash Scripts

chmod +x scripts/health-check.sh
./scripts/health-check.sh https://example.com

Python Scripts

python3 scripts/parse-nginx-log.py /var/log/nginx/access.log 10

🤝 Contributing

I'm just starting my DevOps journey, so I'd be very happy to receive any feedback, suggestions for improvement, or corrections!

How you can help:

  • 💬 Open an issue with suggestions or found problems
  • 🔧 Create a Pull Request with improvements
  • ⭐ Star the project if it was useful
  • 📖 Share your experience using the scripts

🌿 Repository Structure

devops-bash-toolkit/
├── scripts/              # All scripts and configurations
│   ├── *.sh             # Bash scripts
│   ├── *.py             # Python scripts
│   ├── *.yaml, *.yml    # Kubernetes, CI/CD configurations
│   ├── *.tf             # Terraform configurations
│   └── flask-scripts/   # Specialized scripts
├── README.md            # Project documentation
└── LICENSE              # License

📝 License

See LICENSE file.

About

Collection of DevOps script templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published