Giter Site home page Giter Site logo

nodejsapp's Introduction

nodejsapp

It is Nodejs based web api which give information about "myapplication" as a GET response to the user request.

$ http://35.227.57.3:8081/info 
  --Response-->
  {
    "myapplication": [
        {
          "version": "v161",
          "description": "pre-interview technical test",
          "lastcommitsha": "7daaa910956a1d7748c57669c8b9bf262cba2b8c"
                    }
                      ]
                        }

An HealthCheck is implemented to track the status of the application when it get deployed in our environment.

$ http://35.227.57.3:8081/healthcheck
  --Response-->
 Healthy

Testing

A test suite is written which consists a test case to check the response code of info api . If the response code is 200 then test suite will pass else it will fail.

CICD

Tools used -

GIT : GitHub is used as SCM repository. A webhook is configured so that when a devloper commits changes it should trigger Jenkins pipeline to build and deploy application.

DOCKER : Docker is used to containerize the application . An health check is implemented in Dockerfile which keeps a track on the status of application. Even if container is up and running there is a possibilty that application is down. In those cases this docker based HealthCheck will mark the status of container as unhealthy.

JENKINS : A jenkinsfile is used to store the pipeline configuration as code in our GitHub. It is used to orchestrate the deployment of nodejs application using stages :

Checkout : This stage checksout code from GitHub Test : Trigger test cases. Build : Builds the docker image and set latest commit number in lastcommitsha, set application version followed by buildnumber Push : Push our image to dockerhub. It uses Jenkins credentials plugin to hide the docker login credentials in jenkins pipeline Deploy : Deploy the Docker image locally and publish our container on 8081 host port. Cleanup : Clean unnecessary files

CLOUD :A GCP compute engine instance is used for this POC.

nodejsapp's People

Contributors

akkipuneet avatar

Watchers

 avatar  avatar

Forkers

kirtiazad11111

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.