June 2024 Update
: I have updated the blog with updated code snippet used to test the sample node.js backend app I have been building to showcase deployment on K8s, and updated steps to deploy app on AWS EKS. Also using CloudFormation to deploy Auto Scaling Groups (ASG) with targets running Docker containers.
The EKS flavour of K8s worker node setup on AWS can be compared to how AWS deploy ASG behind Application Load Balancer. A little busy at work at this moment, but definitely I will find some
more time to update this blog with works I have been doing in my personal labs. Please stay tuned for future updates...
For any comments, please use this contact: gokates.io@gmail.com
.
Last few months's work: Installed a sandpit instance of Ghost (https://ghost.org/) on port 8888 configured with Node.js, Express.js webserver, SQLite and NGINX. For the prod instance, MySQL will be configured. Tips on installation: Use the supported version of node. Ref: https://docs.ghost.org/faq/node-versions.
Installed SSL on the root domain using certbot. The ghost serving on 8888 is a sandpit instance, so most likely, I am not going to configure it with SSL as this sandpit will be shutdown as soon as I have dev/staging and prod instances ready. The prod instance will definitely be served using SSL.
In next update, I will come up with the news of prod deployment of the Ghost theme called The Shell (https://github.com/mityalebedev/The-Shell) So, quick update for today... I am sharing the code snippet I have tested during last week for the backend app to upload video files to S3. You can use this code for quick test of S3 availability. Also, please note that I am using GridFS to store image files to MongoDB which is a versatile storage system suited to handling large files such as those exceeding the 16 MB document size limit. Ref.: https://docs.mongodb.com/manual/core/gridfs/.
Since I have started building this infra, I have been facing a few interesting tech challenges. So I thought of sharing with you all the fixes I have been implementing for such challenges. I will create a seperate tab DevOps on this site documenting the fixes and other tech steps (including AWS Cli commands to install EKS, how to write API in JavaScript and Node.JS, usage of Terraform to deploy assets in K8s, troubleshooting K8s, REST APIs, etc) which might be helpful for some of you building similar landscapes. Why re-invent the wheel?
Certbot auto renewal was not working. Fixed it, the SSL has now been renewed. During the holiday period, I should be able to update the blog at least with the instructions on K8s setup on AWS and elaborating fixes on the issues I had encountered while setting up the infra. I will also try to detail the Terraform code used.
Please stay tuned...