{"id":28904770,"url":"https://github.com/fepauly/devops-infrastructure-lab","last_synced_at":"2026-04-11T14:32:12.279Z","repository":{"id":298764292,"uuid":"999120550","full_name":"fepauly/devops-infrastructure-lab","owner":"fepauly","description":"A hands-on learning project demonstrating modern DevOps practices using Vagrant, Ansible, Docker, PostgreSQL and Flask 🚀","archived":false,"fork":false,"pushed_at":"2025-06-12T19:42:18.000Z","size":1786,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T13:02:42.662Z","etag":null,"topics":["ansible","containerization","devops","docker","flask","iac","postgresql","vagrant"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fepauly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-09T19:12:51.000Z","updated_at":"2025-06-12T19:42:22.000Z","dependencies_parsed_at":"2025-06-12T20:58:05.525Z","dependency_job_id":"4db7ecfc-9e43-4a81-a8b3-5ccf112e9328","html_url":"https://github.com/fepauly/devops-infrastructure-lab","commit_stats":null,"previous_names":["fepauly/devops-infrastructure-lab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fepauly/devops-infrastructure-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fepauly%2Fdevops-infrastructure-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fepauly%2Fdevops-infrastructure-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fepauly%2Fdevops-infrastructure-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fepauly%2Fdevops-infrastructure-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fepauly","download_url":"https://codeload.github.com/fepauly/devops-infrastructure-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fepauly%2Fdevops-infrastructure-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31684523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","containerization","devops","docker","flask","iac","postgresql","vagrant"],"created_at":"2025-06-21T13:02:14.036Z","updated_at":"2026-04-11T14:32:12.257Z","avatar_url":"https://github.com/fepauly.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infrastructure DevOps Lab - Flask Web Application\n\nThis repository is representing a step on my own DevOps Roadmap. It demonstrates a complete DevOps workflow using containerization and automation tools. The goal was to create a setup that deploys a Flask web application with PostgreSQL database using Vagrant, Ansible, Docker, and Nginx. And since i wanted to go beyond the typical 'Hello World' projects, i made it a fully automated process and added e.g. the DB connection and the reverse proxe while still exploring multiple concepts of each tool. Thus, it is by any means not a production ready setup, but a nice little lab for exploring! 🚀\n\nI tried to create it as a lab from which also other people might benefit from, so feel free to contribute! :wave:\n\n## 🎬 Demo\n\n![DevOps Lab Demo](demo/demo.gif)\n\n## 🏗️ Architecture Overview\n\n```mermaid\nflowchart LR\n    %% Main infrastructure components\n    A[main-server \n    Ansible Controller \n    192.168.61.10] --\u003e B[web-server\n    Docker\n    Flask App - Nginx Proxy\n    192.168.61.12]\n    B --\u003e C[db-server\n    PostgreSQL Database\n    192.168.61.11]\n    \n    %% Styling\n    classDef server fill:#f9f9f9,stroke:#333,stroke-width:2px,color:black\n    class A,B,C server\n```\n\n## 🚀 Technology Stack\n\n- **Infrastructure**: Vagrant + VirtualBox\n- **Configuration Management**: Ansible\n- **Containerization**: Docker + Docker Compose\n- **Web Framework**: Python Flask\n- **Database**: PostgreSQL 14\n- **Reverse Proxy**: Nginx\n- **VM Operating System**: Ubuntu 22.04 LTS\n- **Host Operating System**: Windows 11\n\n## 📦 Components\n\n### Web Application (`web-server`)\n- **Flask App Container**: Python 3.11 web application with PostgreSQL connectivity\n- **Nginx Container**: Reverse proxy handling HTTP requests and load balancing\n- **Docker Network**: Isolated network for secure container communication\n\n### Database Server (`db-server`)\n- **PostgreSQL 14**: Dedicated database server (not containerized)\n- **Network Access**: Configured for connections from web server subnet\n\n### Ansible Controller (`main-server`)\n- **Automation Hub**: Orchestrates the entire infrastructure deployment\n- **SSH Key Management**: Handles secure connections to target servers\n\n## 🎯 Features Demonstrated\n\n### DevOps Practices\n- **Infrastructure as Code**: Vagrant for VM provisioning\n- **Configuration Management**: Ansible playbooks and roles\n- **Containerization**: Docker multi-container application\n\n### Application Features\n\u003e Not the main repo purpose but i didn't want to just use a 'Hello World' app\n\n- **Database Integration**: PostgreSQL connectivity with connection pooling\n- **CRUD Operations**: Visitor registration and display \n- **RESTful API**: JSON endpoints for monitoring and integration\n- **Health Checks**: Application and infrastructure monitoring endpoints\n\n## 🚀 Quick Start\n\n### Prerequisites\n- VirtualBox installed\n- Vagrant installed\n\n### Deployment Steps\n\n1. **Clone and Start VMs**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd devops-infrastructure-lab\n   vagrant up\n   ```\n\n2. **Run Ansible Deployment**\n   ```bash\n   vagrant ssh main\n   cd /vagrant/ansible\n   ansible-playbook playbooks/site.yml\n   ```\n\n3. **Access the Application**\n   - Open browser to `http://localhost:8080`\n   - The Flask app will be available through Nginx reverse proxy\n\n## 🔧 Configuration\n\n### Network Configuration\n- **Main Server**: 192.168.61.10\n- **Web Server**: 192.168.61.12 (Port 8080 forwarded)\n- **DB Server**: 192.168.61.11\n- **Docker Network**: webapp_network (bridge)\n\n## 📊 Monitoring \u0026 Health Checks\n\n### Application Endpoints\n- `/` - Main application interface\n- `/health` - Application health status\n- `/api/stats` - Visitor statistics JSON API\n- `/nginx-health` - Nginx proxy health check\n\n\n## 📚 Learning Objectives\n\nThis lab was made by me to learn about following topics:\n- **Vagrant**: Multi-VM orchestration and networking\n- **Ansible**: Configuration management, roles, and playbooks\n- **Docker**: Containerization, multi-container applications\n- **Docker Compose**: Service orchestration and networking\n- **Nginx**: Reverse proxy configuration and load balancing\n- **PostgreSQL**: Database setup and remote connectivity\n- **Flask**: Python web framework and database integration\n- **DevOps**: Infrastructure as Code, automation, and monitoring\n\nAnd i added a lot of comments that explain the different steps, maybe they help you as well! \n\n## 🔒 Security Considerations\n\nI know this lab is far from 'production-ready'. This was not the goal, as i wanted to explore different topics\nand concepts within these tools without focusing too much on security. Though, it's definitely a good practice to\ndo some considerations regarding security practices.\n\n### Production Recommendations\n- Change default passwords and use something secure, e.g. Ansible Vault\n- Implement SSL/TLS certificates\n- Use secrets management for sensitive data\n- Regular security updates and vulnerability scanning\n- Network segmentation and firewall rules\n- Container image security\n\n## 🤝 Contributing\n\nThis is a learning repository (also for me). Feel free to:\n- Add new features to the Flask application\n- Improve the Ansible playbooks\n- Add monitoring and logging capabilities\n- Implement CI/CD pipelines\n- Add security enhancements\n- Open issues or leave comments on what can be improved in general\n\n## 📄 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n---\n\n**Happy Learning! 🎓**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffepauly%2Fdevops-infrastructure-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffepauly%2Fdevops-infrastructure-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffepauly%2Fdevops-infrastructure-lab/lists"}