Git Product home page Git Product logo

app-devops-microservices-deploy's Introduction

demo-app-devops

Develop an Infrastructure as Code solution for deploying a scalable web application stack consisting of containerized components:

  1. Web Server: Containerized Any HTTP Server (eg. node.js)
  2. Database Server: Containerized MySQL or any NoSQL
  3. Application Server: Containerized lightweight Python or Node.js application

Here, i created one demo-app web-server, db-server and app-server with some basic codes. And, dockerize every services in dockerfile.

then, create one docker-compose file which will handle the multi-container applications.

now run the cmd,

  • docker-compose up -d

compose-up-cmd

This cmd will up the container. We can check it from docker desktop too. docker-desktop-view

We can check it from browser now by accessing the url. http://localhost:5000 where the service is running.

web-server

Now, to run these containers in container orchestration tool im using kubernetes and provisioning using minikube. To start minikube,

  • minikube start It will start in local.

minikube-start

Now we have to write kubernetes manifest and service file to deploy our application inside multiple pods with proper considerations. So, i created deployments file - app-server-deployment.yml, db-server-deployment.yml and web-server-deployment.yml and for services, i created - app-server-services.yml, db-server-services.yml, web-server-services.yml with LoadBalancer type because we need to ensure the scalability.

now, apply the kubernetes manifest and service file for all 3 services,

  • kubectl apply -f app-server-deployment.yml

  • kubectl apply -f app-server-services.yml

  • kubectl apply -f db-server-deployment.yaml

  • kubectl apply -f db-server-services.yml

  • kubectl apply -f web-server-deployment.yaml

  • kubectl apply -f web-server-services.yml

kubectl get pods kubectl get services

We can check it using kubernetes dashboard too by running

As i have configured with 3 replica set when deploying app so we can view 9 services for each 3 pods active;

Finally, we can see the service is running Hello-from-the-web-server and also we can check it from browser too browser

Note: I have also added github ci/cd too

app-devops-microservices-deploy's People

Contributors

saileshkhadka avatar

Watchers

 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.