How I deployed my first project for my devops portfolio: The HUNT (Infra and budget)


The hunt for the cheapest infra without loosing performance
After I successfully made my project, I proceeded for my plans on infra on where to host it. I made it on my raspberry pi 4b and also did it in CI/CD way (More on the CI/CD details in later posts). Which means I need an ARM64 architecture for my target infra on which I need to host my project. Since I got introduced to AWS in my job so I thought of going with AWS here so I looked in this.
At the very first glance x86-64 costing way too much compared to arm64. I didn't know why buy I do know seeing all my life home labbing and using pi I do get a general idea of performance and power consumption does play some role. I found this article as the time of writing, the question of arm vs x86 was intriguing to me. Though I not fully understood it but it did gave me the idea.
Continuing to my budget setting I at first selected t2.small which has 2vCPUs and 2GB RAM. Since I am using minikube for my deployment which requires 2CPUs and 2GB RAM which is exactly what the instance type t4g.small has. I knew that even if I start the minikube in that then deployments will fail and most probably will hang up the system. So using my terraform I spun up this t4g.small and as I thought after enabling ingress and then deploying my project and it started lagging a bit. But when I tried deleting a pod to see how the system reacts and it became disastrous for me. I cant even ssh back into my instance it lagged so much. I scraped the plan and went for the better which takes a bit more money but sure even have the space for some upgrades with no performance sacrifices. t4g.medium which has 2vCPUs and 4G RAM, and as expected it works fine. I even tested by deleting pods repeatedly and saw no problem with deployments. I saw 100% utilization of this instance will cost me Monthly: 16.35/Month which in INR 1,414.66/Month. After this I bought a cheap domain for 2 years zita.click
which costed me 6/Month which converts to INR 519.14/Month and also keeping one Hosted Zone alive costs 0.50/Month -- INR 43/Month. All this totals to 1414.66 + 43 = 1457.66/Monthly with 519.14 as setup cost (domain cost for 2 years). Now seeing that it's just a portfolio so less queries and less data outflow it might increase to i guess <= 1650
. Seeing this I set my budget to INR 2000/Monthly. Then I decided to Reserve it EC2 Instance Savings Plans which trickles the cost down to 6.94/Month -- INR 600.47/Month reserved for 3 years. Since I already got the domain for 2 years, I have plans on extending it for one more year before changing the domain itself.
Snag - Upon trying to reserve instance t4g.medium only one instance for 3 years showed me instance quota full even if I had got none running. I raised the quota increase limit and wallah, thanks aws from default 20 I got 30 now. As time of writing I am currently running on On-Demand but will purchase the RI soon.
Aaah, as I uploaded the pic above i saw thisBucket name - dev-to-uploads Object key - uploads/articles/abool2qqcayntzfeh7ju.PNG Object - abool2qqcayntzfeh7ju.PNG We can only imagine the power of cloud here and how much freedom and flexibility it brings to us.
With this the hunt for my own budget which is INR 2000/Monthly and infrastructure selection which is t4g.medium is completed.
Subscribe to my newsletter
Read articles from Selin Gok directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
