This repository contains a sample full-stack application deployment using Ansible, Docker, and Kubernetes. It demonstrates infrastructure automation and container orchestration for a simple web app.
IBM_project-master/
├── README.md
├── ansible/
│ ├── inventory.ini
│ └── playbook.yml
├── app/
│ ├── backend/
│ │ ├── app.py
│ │ ├── Dockerfile
│ │ └── requirements.txt
│ └── frontend/
│ ├── Dockerfile
│ └── index.html
├── k8s/
│ ├── backend-deployment.yaml
│ ├── frontend-deployment.yaml
│ └── service.yaml
- inventory.ini: Defines target hosts for automation.
- playbook.yml: Automates deployment tasks (e.g., Docker installation, app deployment).
- backend/: Python Flask API with its own Dockerfile and requirements.
- frontend/: Static HTML frontend with its own Dockerfile.
- backend-deployment.yaml: Deployment spec for backend service.
- frontend-deployment.yaml: Deployment spec for frontend service.
- service.yaml: Service definitions for exposing the app.
- Docker
- Kubernetes (Minikube, k3s, or cloud provider)
- Ansible
- Python 3.x
# Backend
cd app/backend
docker build -t ibm-backend .
# Frontend
cd ../frontend
docker build -t ibm-frontend .kubectl apply -f k8s/backend-deployment.yaml
kubectl apply -f k8s/frontend-deployment.yaml
kubectl apply -f k8s/service.yamlansible-playbook -i ansible/inventory.ini ansible/playbook.yml- Update image names in Kubernetes YAMLs if you push to a registry.
- Customize Ansible playbook for your environment.
MIT