A javascript application is deployed on Kubernetes Cluster in GCP Cloud Provider. I am using Terraform to deploy the infrastructure.
https://github.com/komarserjio/notejam/tree/master/express
- GCP Provider
- Manager Kubernetes Cluster - GKE
- Terraform
- Javascript
- Prometheus and Grafana
Note: The state file of the terraform is stored in GCP Bucket.
Key | Value |
---|---|
Region: | europe-west1 |
Number of Zones: | 3 |
Number of Worker Nodes: | 3 |
Number of Instances (Pods): | 3 |
Autoscaling | Yes |
http://34.79.88.190:30361/signin
Best approach is to use an Ingress but for now, I have used service type NodePort.
Prometheus: http://34.79.88.190:30084
Grafana: http://34.79.88.190:30841
- The Application must serve variable amount of traffic. Most users are active during business hours. During big events and conferences the traffic could be 4 times more than typical.
GKE cluster is running with 3 worker nodes and autoscaling is enabled. If the number of active users increases, cluster will autoscale itself.
- The Customer takes guarantee to preserve your notes up to 3 years and recover it if needed.
There is an option to make this application into individual smaller microservices. Once it's stateless, we can apply lifecycle policies for the data stored. In this case, we can update the db.js.
- The Customer ensures continuity in service in case of datacenter failures.
- The Service must be capable of being migrated to any regions supported by the cloud provider in case of emergency.
https://hub.docker.com/repository/docker/manurawat1/node
- The Customer is planning to have more than 100 developers to work in this project who want to roll out multiple deployments a day without interruption / downtime.
Jenkins pipeline or Github Actions can be configured to perform the deployments. Their access can be controlled using RBAC and can be isolated with namespaces.
- The Customer wants to provision separated environments to support their development process for development, testing, production in the near future.
I have created only 1 environment i.e. Prod but for future, we can create environments like Dev, Preprod and Prod. This can be achieved with Terraform.
- The Customer wants to see relevant metrics and logs from the infrastructure for quality assurance and security purposes.