Giter Site home page Giter Site logo

roofstacks-infra-case's Introduction

This repository contains solution of roofstacks infrastructure-developer case

Table of Contents

Details

  • Clone the GitHub repo on your local which is specified as sample-app. ✅

  • Create a docker file for building a .net core web app within the docker image. ✅

  • You need to create a DockerHub account for uploading image. ✅

  • Build a docker image and upload this to the DockerHub. ✅

  • Create a kubernetes definition file for :

    • Create one ingress for handling HTTP requests from outside the cluster ✅
    • Create one service for load balancing across the pods ✅
    • Create a deployment with two pods that are hosting our app instances from DockerHub (which is you've uploaded). ✅
  • You should be able to test the application with the following URL pattern with HTTP GET request when you complete it : ✅

    • http://{{IP}}:{{Port}}/WeatherForecast

  • You could prepare one-click install script file as bash or shell to install and run the mini-cluster. ✅

Solution

Created a Dockerfile to containerize the application, used multi stage build to reduce image size. Pushed the image to my personal docker hub account.

Used Google Kubernetes Engine on Google Cloud as kubernetes cluster. Created ingress, service, deployment and backend-config resources. When i create ingress on GKE it creates backend services on LB and default path of backend services' health check is "/". But our application doesnt serve anything on path "/" so our backend services gets unhealthy state.

To fix that i create a backend-config resource and update the path as "/WeatherForecast" also i add an extra annotation on service to use my custom backend-config resource. With that backend services gets healthy state and ingress works.

You can test the application on http://34.120.2.10/WeatherForecast

Yaml files are under infra/ and to one click installation you can run setup.sh

I draw a small diagram to show flow.

Diagram

roofstacks-infra-case's People

Contributors

emrullahcirit avatar

Stargazers

Enes Kaya avatar Altay Simsek avatar Sezgi Altan avatar Hazal Gültekin 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.