Giter Site home page Giter Site logo

hana437 / node-project-kube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tikam02/node-project-kube

0.0 0.0 0.0 7.33 MB

Fullstack WebApp in Node+Express+Mongo - Deployed on Kubernetes & Architecture Explaination Diagrams

Home Page: http://174.138.122.173/

Dockerfile 1.43% JavaScript 16.71% Shell 29.54% CSS 3.62% HTML 48.70%

node-project-kube's Introduction

Node-project-kube

alt text GitHub last commit DevOps APP


Stack - Node.js + Express.js + MongoDB + Docker + Kubernetes + Prometheus + Grafana + Spekt8


  • Node Project
  • Docker and Dockerfile
  • Docker Push
  • Creating Kubernetes Cluster
  • Setting Up Kubernetes on Machine
  • Setting up and Deploying MongoDb
  • Setting up main app and Deploying
  • Installing Helm
  • Setting up Prometheus and Grafan with Helm Charts
  • Port forwarding Prometheus-manager,Grafana and Alertmanager to localhost
  • Monitor Clusters and all architecture from localhost.

Work flow


Node Project

For Running The web app locally:

$  mv  /local/node  ~./home          //move node app to home directory because db setup at home for time to time restart.
$ npm install
$ node app.js 

Docker file and Dockerhub

For Running web App in Docker 

$ cd Node_Project or cd local/node    //Node_project - Production | local/node - local run

$ docker build   -t  dockerhub-username/node-project .

$ docker images  -a     //check for build image

$ docker push username/repository:tag

$ docker-compose up --build  

$ Open --->  localhost:3000
 

Getting Started With Kubernetes

For Running WebApp Clusters and Monitoring with Prometheus and Grafana

  • Download cluster Config file from owner of cluster and connect to the cluster:
 $ cd ~/.kube && kubectl --kubeconfig="clustername-kubeconfig.yaml" get nodes
  • Get kubectl nodes:
$ kubect get nodes
  • Get pods:
    $ kubectl get pods 
  • Get Services :
$ kubectl get services
  • Get Deployments:
$ kubectl get services
  • See MongoDb pods
$ kubectl exec -it mongo-mongodb-replicaset-0 -- mongo -u tikam -p --authenticationDatabase admin
  • Port Forward Grafans to monitor in localhost:
$ kubectl port-forward -n monitoring svc/doks-cluster-monitoring-grafana 8000:80
  • Port Forward Prometheus to monitor in localhost:
$  kubectl port-forward -n monitoring svc/doks-cluster-monitoring-pr-prometheus  9090:9090
  • listing running Services in the monitoring namespace:
    $ kubectl get svc -n monitoring
  • Deploying Spekt8 :
$ kubectl apply -f spekt8-deployment.yaml

$ kubectl apply -f fabric8-rbac.yaml.

$ kubectl port-forward deployment/spekt8 3000:3000


Node Web App

Grafana

Prometheus

Spekt8

node-project-kube's People

Contributors

tikam02 avatar dependabot[bot] avatar

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.