Project Overview
Healthyvita is a platform in which people can participate in to adopt a healthy lifestyle by
taking part in a diet challenge or making an appointment to obtain a plan according to your
own specific goals or objectives. TinkerWare focused on configuring and managing the
project’s infrastructure, optimizing it so there’s only what was needed and that way,
favoring cost reduction.
Status before collaboration
Healthyvita had access to a server machine where all the infrastructure was supposed to be
mounted on, but this brings two main problems:
- Everything is in just one place, meaning that everything would be offline if a hardware failure were to occur.
- Resources are available for everyone, so it may be too much for each service running on
the server.
Which could be cheaper as a whole, but in the long run brings more risks, mainly to assure
availability.
Identified issues / requirements
- Three applications: two Angular apps and one SpringBoot app. The SpringBoot app
serves as a Gateway for the Angular apps and also as a controller between frontend and
the MySQL database. - Funding is limited, so a cheaper option would be great while still providing a high
availability assurance.
How the issues were solved
Here is our workflow proposal, described below in more detail.
Infrastructure-wise, the workflow has three phases: local, stage and production. These
environments are described according to Healthyvita’s case.
- Local
a. Work on Docker containers
b. Manage different branches on your Git based code repo for all the work
environments
c. Most tests and fixes happen - Stage
a. Hosted in a variety of AWS services. Mainly ECS, ECR, EC2 and Route53.
b. Same structure as production environment but in smaller scale.
c. Minor tests and fixes happen.
d. Deployed apps are taken from a Stage branch on your code repo. - Production
a. Hosted in a variety of AWS services. Mainly ECS, ECR, EC2 and Route53.
b. Refined infrastructure from data obtained in the Stage environment. Helping cost
optimization.
c. NO tests and fixes happen.
d. Deployed apps are taken from the Master branch on your code repo.
Results
On a daily basis
-
Ready on 5 minutes or less:
-
Local work environment to start testing your application.
-
Demos for multiple features/branches (which you should do on your code
repo). -
Ready on 15 minutes or less:
-
New deploy of app on AWS.
-
Recovery from critical errors (rebuild from scratch or from a previous
version). -
Performance configuration according to your services’ needs.
- Time depends on the Computer and Network speed.
On the big picture
- Project ready for production on six weeks.
- Infrastructure cost averages at 48 USD per month.
- Around 1000 daily users for Healthyvita’s platform.