Weekly DevOps Update: Automating the Backend Stack for Share Sampatti
- just kunal
- Jun 18
- 2 min read
Hi everyone, Here's a quick update on my DevOps progress for the Share Sampatti project at Planning Earth. This week, I focused on laying down the foundation for infrastructure automation using Terraf
What’s Done So Far
Infrastructure Setup
Used Terraform to provision AWS EC2 instances.
Encountered minor flakiness with Terraform responsiveness — occasional delays, and at times it doesn’t respond or hangs on apply. Currently troubleshooting these.
Application Stack with Docker Compose
Wrote a docker-compose.yml file that successfully spins up:
A Node.js backend server
MongoDB
Prometheus for basic monitoring
The command docker-compose up --build is now capable of starting the entire backend stack locally.
NGINX & Reverse Proxy
Used Ansible playbooks to install NGINX on EC2.
Set up a basic reverse proxy config for hosting the static app via NGINX.
What I’m Working On Next
Automating the deployment of Docker Compose using Ansible remotely.
Making the Ansible roles modular so they can handle:
Docker installation
Cloning project repo
Executing docker-compose on the remote server
Improving Terraform stability (possibly managing backend state better or exploring remote backends like S3 + DynamoDB for state locking).
Challenges This Week
Slow Internet = Slow ProgressMost of my time was spent waiting for packages to install or images to build. Need to find ways to optimize or pre-pull frequently used images.
Terraform InstabilityInconsistent behavior during provisioning. Sometimes works, sometimes doesn’t. Still debugging if it's a provider/auth issue or network timeout.
Remote Docker Deployment with AnsibleInstalling Docker via Ansible is okay, but chaining that with docker-compose up on a cloned repo requires path correction and permission management.
Learnings
IaC is powerful, but needs discipline and retries.
Combining Terraform and Ansible gives full control — infra + config — but requires careful state and SSH management.
Prometheus setup has helped verify that containers are up and healthy. Planning to add Grafana next.
Summary
This week’s goal of semi-automating the backend stack deployment is 50–60% achieved. The Docker Compose setup works perfectly, Ansible can configure NGINX, and Terraform can create infra — but combining all three into a single, reliable automated flow is still in progress.
Looking forward to closing the loop next week with full automation!




Comments