Skip to main content

Welcome to my blog

· One min read
Rayen Dhmaied
DevOps & Site Reliability Engineer at CraftSchoolship

Hi there.

This space is where I share work in more detail. It includes projects I’ve worked on, practical notes, and observations from things I’ve built or learned along the way.

Splitting a Python Dockerfile into Build and Runtime Stages

· 8 min read
Rayen Dhmaied
DevOps & Site Reliability Engineer at CraftSchoolship

I shipped a Flask backend for a quiz platform. The first time CI tried to push the production image to GitHub Container Registry, it died midway:

#15 pushing layer dc355e6e88a5 145.61MB / 673.11MB 9.0s done
#15 ERROR: unknown blob

The image was around 700 MB. One layer on its own was 673 MB. Every Pod cold-start was pulling that off the registry, and pushes kept timing out because the single big layer took too long to upload in one shot.

Refactoring Terraform into Modules Safely

· 6 min read
Rayen Dhmaied
DevOps & Site Reliability Engineer at CraftSchoolship

I worked on an older Terraform project that managed a full EKS stack: VPC, cluster, node groups, storage, and around ten Kubernetes add-ons. The whole stack lived in one main.tf file with more than a thousand lines.

It worked. It was also hard to change. Adding one add-on meant scrolling through networking, IAM, EKS, and Helm resources just to find the right place.

.
├── main.tf # 1000+ lines: VPC, EKS, add-ons, storage
├── variables.tf
├── outputs.tf
├── providers.tf
├── backend.tf
└── vars.tfvars

I wanted modules, but I did not want Terraform to recreate a live VPC with an EKS cluster attached to it. The refactor had to move code and state together.