Demo 3-tier App - Part 2

Published: Cloud-Services General

In the first part of this two part series I detailed about the application. After further consideration and feedbacks I have made some changes in it. In this post I am going to talk about the changes and various ways we can use this application. 

Technology Changes:

In the initial architecture of the application the database is hosted along with FastAPI codes. I also used Ubuntu as the base VM for the application. This makes the whole solution really heavy. 

The application itself is pretty small, but the dependencies makes it heavy. I could not use Alpine Linux as the database VM because of the reasons mentioned in Part-1. Since Ubuntu has a considerable footprint (even in minimal mode), I was looking for an alternative. I found Rocky linux minimal installation to be just right. Only challenge is, vSphere 8.0 supports Rocky Linux. So, if you are using vSphere < 8.x then once you deploy the OVA, change the DB VM type from "Other" to "Linux" -> "CentOS 8.x".

Deployment Options:

You can deploy the application in two different ways.

Option 1:

In built MongoDB database in the database VM.

Database VM v2

This way, all you need to do is to grab the OVA file that I share, deploy it in your environment, and you have up and running version of the application along with sample data.

Flipside of that is, the OVA is 2.1 GB in size (mainly due to Rocky Linux). So, deploying it takes some time.

Also, that means you are limited by the deployment architecture.

Use Cases: You can use this model when you have to show only the deployment and running of the application, etc.

Option 2:

In this model, the actual MongoDB database is outside of the database VM. You either have a separate DB instance with actual DB or you can even create a database in MongoDB Atlas (which I am doing). So, the database VM has only the FastAPI components building the frontend of the database.

This way we have very small footprint.

Database VM v3

In this model you need to create the database yourself and consume that database in the application.

Check the detailed documentation on how to create Atlas cluster database.

Use Cases: Use this model if you are looking for a reduced footprint deployment. Showcasing a cloud to cloud migration. Building DevOps use cases, etc.

Final thoughts:

Do let me know if you need any improvements. I am going to utilise this application for building cloud, multi-cloud and super cloud deployments. So, look out for the further blog posts.