Skip to content

yousabu/contacts-system-helmchart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Agenda:

  • Application Overview
  • Docker compose and Dev ENV
  • Helm Overview.
  • Frontend Helm Deployment
  • Backend Helm Deployment
  • Infrastructure Configurations
  • Pipeline and Repository URLs
  • Monitoring and Observability

1) Application Overview

Contacts application for managing contacts, where contacts are stored in a MongoDB database. You can delete, update, and add new contacts.

Screenshot from 2024-08-11 17-36-32

2) Docker compose and Dev ENV

3) Helm Overview.

  • I have created a Helm template that can be used for both frontend and backend deployments. By using the values.yaml file located in each repository (frontend/backend), the deployment logic will be determined.

Backend values.yaml : https://github.com/yousabu/contacts-system-backend/blob/main/values.yaml

Frontend values.yaml: https://github.com/yousabu/contacts-system-frontend/blob/main/values.yaml

Helm Values Configuration
├── replicaCount
│
├── backend/frontend
│
├── namespace
│
├── image
│   ├── repository
│   ├── tag
│   └── pullPolicy
│
├── service
│   ├── type
│   ├── port
│   └── nodeport
│
├── autoscaling
│   ├── enabled
│   ├── minReplicas
│   ├── maxReplicas
│   └── targetCPUUtilizationPercentage
│
├── env vars

4) Frontend Helm Deployment

  • As per image bellow:

    ang

  • Runnig Resources: front

5) Backend Helm Deployment

  • As per image bellow:

express

  • Runnig Resources:

Screenshot from 2024-08-11 18-33-33

6) Infrastructure Configurations

  • Cluster: I used MicroK8s installed on an EC2 instance on AWS to create a lightweight cluster and enabled public access to it. I then generated a configuration file (config) for future use.

  • Service Connection: I set up the connection between Azure DevOps and the cluster using the configuration file.

  • Connections: The cluster contains an internal ingress to route traffic between the frontend and backend.

  • Ingress: I set up an Ingress for the domain (https://intouch.cloud-stacks.com/) and requested a certificate for it using Cert Manager, issued by Let's Encrypt.

  • Horizontal Pod Autoscaler (HPA): Configured to automatically scale the number of pod replicas up or down based on observed CPU utilization or other selected metrics. This ensures that the application can handle varying loads efficiently

7) Pipeline and Repository URLs

We have two pipelines, each in its own repository, to build, push, and deploy the application using Helm:



8) Monitoring and Observability

  • Due to a lack of resources, I didn't use Prometheus and Grafana, even though they are the most popular monitoring tools. Instead, I used a New Relic free trial as a lightweight monitoring tool.

Dashboard:

Screenshot from 2024-08-11 18-14-54

Screenshot from 2024-08-11 18-17-26

Runnig Service:

Screenshot from 2024-08-11 18-18-20 Screenshot from 2024-08-11 18-18-31

Security Note

  • The best practice for managing secrets is to use a mechanism like Sealed Secrets, which encrypts secret files so that only the cluster can decrypt them. However, I did not implement this here because it requires Sealed Secrets Manager, and I had limited resources to set it up.

About

Helm Chart For Contact System

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published