Cloud IaaS Deployment

📅 2024 📁 Cloud & DevSecOps ⏱ 6 min read

Overview

This project focuses on automating the deployment of a high-availability IaaS (Infrastructure as Service) environment. We achieved an "auto-healing" architecture where failed components are automatically detected and replaced without downtime.

Architecture Overview

Cloud Architecture Stack Cloud Network Flow
  • Deployment Stack: Automates the environment using Vagrant for VM provisioning and Ansible for configuration management.
  • Orchestration Layer: Implements Docker Engine and Docker Compose to manage a containerized microservices stack.
  • Network Infrastructure: Features a custom Docker Bridge network (iac_network) hosting Flask, PostgreSQL, and Traefik.
  • Scalable Pool: Deploys a dynamic pool of 10 Alpine Linux containers, accessible through a reverse proxy.

Fonctionnalités

Gestion dynamique et surveillance

Gestion du pool

  • Ajout de conteneurs
  • Retrait si vides
  • Simulation de pannes
  • État temps rĂ©el

Surveillance santé (5 couches)

  • 1. API Docker : Statut
  • 2. ICMP : Ping rĂ©seau
  • 3. SSH : Port accessible
  • 4. Base de donnĂ©es : CohĂ©rence
  • 5. Existence : Objet Docker

Auto-réparation des conteneurs

Détection Panne
→
Attente 30s
→
Redémarrage Conteneur
→
Re-provisionnement
→
Ressources Restaurées

Processus

  • DĂ©tection Ă©tat lost/unhealthy
  • DĂ©lai 30s (visibilitĂ© dĂ©mo)
  • Restart du mĂȘme conteneur

Garanties

  • RĂ©cupĂ©ration 2-3 minutes
  • Ressources sur mĂȘme conteneur
  • CohĂ©rence prĂ©servĂ©e

Automatisation

SystĂšme complet

Script Fonction Fréquence
health_monitor.py Vérification conteneurs 1 min
auto_rebalancer.py Redémarrage auto conteneurs 1 min
cleanup_expired.py Suppression expirées 1 min
sync_containers.py Sync Docker/DB Boot
Tableau de bord admin

Alertes, Actions manuelles, RafraĂźchissement auto 10s

Conformité et métriques

Cahier des charges 100%

Performances

  • Provisionnement : < 10s
  • DĂ©tection panne : 1 min
  • Auto-rĂ©paration : 2-3 min

Capacité

  • 10 conteneurs Alpine
  • 10 users simultanĂ©s
  • 512 MB RAM/conteneur

Contraintes techniques

Architecture

  • Pool fixe : 10 conteneurs max
  • 1 ressource par conteneur
  • Tous les conteneurs = Alpine
  • Pas d’auto-scaling infini

Résilience

  • RĂ©cupĂ©ration non instantanĂ©e
  • Pas de persistance donnĂ©es
  • Downtime pendant redĂ©marrage
  • 1 panne traitĂ©e Ă  la fois