Canary / Blue Green Deployment for M324

Overview

This deployment setup was part of a closed‑source DevOps project where I implemented a blue‑green / canary hybrid deployment workflow using Docker and Traefik on a Raspberry Pi–based environment. The goal was to enable zero‑downtime releases, safe migration between versions, and automatic fallback in case of deployment failures.

Because the project was private, no source code can be shared — this document describes the architecture and the deployment logic.

Deployment Approach

The original plan was a classic blue‑green deployment, where two full environments run in parallel and traffic is switched entirely between them.

In practice, the system evolved into a canary deployment, where:

This created a safe incremental rollout strategy with seamless rollback.

Key Features

Example Traefik Configuration

services:
  dotnet-blue:
    image: registry.gitlab.com/.../dotnet:latest
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dotnet-blue.rule=Host(`dotnet.ermfox.ch`)"
      - "traefik.http.routers.dotnet-blue.entrypoints=web,websecure"
      - "traefik.http.routers.dotnet-blue.tls.certresolver=leresolver"
      - "traefik.http.services.dotnet-blue.loadbalancer.server.port=8080"
      - "traefik.http.services.dotnet-blue.loadbalancer.weight=1"
    networks:
      - pi_traefik

Label Explanation

Future Improvements

Evidence

Screenshots from the private deployment environment (e.g., running containers, IDs, Traefik routing) were captured and used to verify correct operation. These confirm:

← Back to all skills