From Code to Cloud

Kasturi NithinKasturi Nithin
3 min read

This article is to explain all the underlying tools and requirements for deployment of an static page on to cloud providers like AWS. The static page which is being used for this project is Nike’s landing page. There are various kind of processes which are involved in this project.

Processes invloved:

  • Continuous Integration

  • Continuous Deployment

  • Mapping to Domain name

AWS setup:

Let’s understand the aws setup for this project.

  1. Region: The project is deployed in Asia Pacific region.

  2. Availability Zones: There are two Zones provisioned in the region which are ap-south-1a and ap-south-1b.

  3. Security Groups: Two Security groups each for a Zone are setup.

  4. VPC: One VPC for both the Zones is configured.

  5. Resources: t3.xlarge-ec2 for jenkins, an EKS cluster for deployment which has two worker nodes -ec2.t2.medium each.

Explanation of flow:

  1. Continuous Integration

    1. Developers: Group of people who make required changes to obtain desired state of the application.

    2. Github: Version Control system where the entire code of the application resides and it is the place where developers commit and push their changes to.

    3. Jenkins on ec2-instance: When ever the changes are made to the repository a pipeline is triggered in the jenkins which automates the building, testing and prepares the code for deployment.

    4. Pipeline stages:

      1. Fetch Code: First stage is to fetch the code from github repository to the jenkins workspace.

      2. SonarQube: Scans the code in workspace for vulnerabilities and issues if any.

      3. npm: Installs the required packages for building and testing the application.

      4. Trivy file scan: Trivy scans the files of the repository for vulnerabilities and misconfigurations.

      5. Docker Build: Docker builds the docker image.

      6. Trivy image scan: Scans the docker image for security issues.

      7. Docker Push: Pushes the image to dockerhub repository.

      8. Email notification: An email is sent to developer post build with required files.

  2. Continuous Deployment:

    1. Elastic Kubernetes Service: EKS resource from aws is utilized for deployment purpose.

    2. Elastic Load Balancer: EKS generates an elastic load balancer URL through which our application can be accessed.

    3. Mapping to domain: Use the elastic load balancer URL to map to any of the domains from godaddy, hostinger or any other domain provider.

    4. Monitoring: Monitoring server is set up using terraform[ec2-medium], through jenkins pipeline which sends an email post build.

      1. Grafana: Open-source tool used to visualize and monitor data.

      2. Prometheus: It’s used to collect, store, and query metrics from your systems and applications.

    5. User Feedback: Users sends their feedback to developers and developers make the required changes and this cycle continues, this is known as Agile software development approach.

0
Subscribe to my newsletter

Read articles from Kasturi Nithin directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kasturi Nithin
Kasturi Nithin

Exploring something new.