Skip to content

A Project that implements CI/CD on a fullstack application

Notifications You must be signed in to change notification settings

Martins-Ops/UdaPeople_CICD_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UdaPeople_CICD_Project

Project Overview

This project deploys a full stack (frontend and backend) NodeJS application of the UdaPeople using the concept of CI/CD to enable automated building, testing and deployment. CI/CD in this project helps in deploying the application to production using Integrated Pipelines and circleci as the CI/CD tool.

Prerequisites

To get this project done ensure to have this tool installed and running on your local machine

  • Git

  • Create an account on CircleCi and setup the project from the documentaion.

  • Create an account on AWS

Project Sections

  • Continuous Integration (Build, Test and Analyze)

The config file present in the .circleci of the repository config.yml contains the jobs for the pipelines used for this project. The goal of a build phase is to compile/lint the source code to check for syntax errors or unintentional typos in code seprately in the frontend and backend. Test phase checks if the code is trustworthy and the Analyze(audit) phase checks for security vulnerability in the code.

  • Configuration Management

In this section, we will create and configure infrastructure before deploying code to it. This can be accomplished by building Ansible Playbooks for use in the CircleCI configuration which is included as ansible in the .circleci directory.

  • Setup - AWS

    • Create and download a new key pair in AWS. Name this key pair "udacity" so that it works with the Cloud Formation templates in .circleci/files/ of this repository. Look for "Option 1: Create a key pair using Amazon EC2" in this tutorial, if you need help. You'll be using this key pair (pem file) in future steps so keep it in a memorable location.
    • Create IAM user for programmatic access only and copy the access key id and secret access key. Refer to this tutorial, if you need help. We will need these credentials to add to CircleCI configuration
    • Add a PostgreSQL database in RDS that has public accessibility. This tutorial may help. As long as you marked "Public Accessibility" as "yes", you won't need to worry about VPC settings or security groups.
  • Setup - CircleCI

    • Add SSH Key pair from EC2 to the CircleCI Project Settings > SSH Keys > Additional SSH Keys. To get the actual key pair, you'll need to open the pem file in a text editor and copy the contents. Then you can paste them into Circle CI as shown in the image below.

SSH Image

  • Add the following environment variables to your Circle CI project by navigating to {project name} > Settings > Environment Variables as shown below.

Env Var

Having proceeded with the steps above, CircleCI runs the Pipeline upon commits made on git

  • Monitoring

This Project uses Prometheus as a monitoring solution since it is open-source and versatile. Once configured properly, Prometheus will turn our server’s errors into sirens that no one can ignore

Running the application

The application can be accessed using either the CloudFront domain name or the public URL for your S3 Bucket. Upon a succesful deployment we should have a similar frontend shown below.

frontend images

About

A Project that implements CI/CD on a fullstack application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published