/CI-CD-pipline-monitoring

Primary LanguageTypeScriptOtherNOASSERTION

CI/CD with monitoring

This project is a part of the 3rd project in cloud developer nanodegree.

Description

This repo has a node frontend and backend application for employee management. The application is deployed to AWS using circleCI for CI/CD, cloudformation to provision the infrastructure, ansible for deployment configuration and prometheus for monitoring during runtime.

It has a fully automated CI/CD release pipeline, from build to production. It follows the blue-green deployment model. The new infrastructure is created using Cloudformation(IaC), configured using ansible, after successfully passing the smoke tests, the newly crated and configured infrastructure is promoted to production by updating the cloudfront domain, and the old infrastructure is destroyed.

For monitoring, prometheus is used, the node exporter is configured by ansible in the configuration phase. The prometheus instance is set up separately, and new instances are discovered using prometheus service discovery link.

The different phases of the CI/CD pipeline are shown,

Continuous Integration

  1. Build Phase - Build the frontend and backend applications.
  2. Test Phase - Test the frontend and backend applications.
  3. Analyse Phase - Check for security vulnerabilities and outdated dependencies.

Continuous Delivery

  1. Create the infrastructure - Create the infrastructure using cloudformation.
  2. Configure the infrastructure - Configure the infrastructure using ansible.
  3. Run migrations - Run migrations for the database.
  4. Deploy the infrastructure - Deploy frontend and backend applications using ansible.
  5. Smoke Test - Checking if the new deployment is working .
  6. Rollback - If there is an issue detected during the smoke test phase, the new infra is cleaned-up/ deleted.
  7. Promotion Phase - If the smoke test passes successfully, the new infra is promoted to production by updating the cloudfront distribution.
  8. Cleanup - The old infra is cleaned-up deleted.

Pipeline diagram

udapeople-pipeline

Technologies used

Screenshots are in the /screenshots folder link

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2023 Nikhil Bhaskar