Git Product home page Git Product logo

devops_task_001's Introduction

Overview

Application is designed to take input Username in a textbox: Sample

Then Saves the Entered name in mongoDB with the following message of confirmation

image

Technical Details

Application is designed to integrate with mongoDB, Mongo URI is taken from environment variabled called (MONGO_URI) Application requires MongoDB to be running and healthy before running the Application

Steps: 1- The web server running in your container is listening for connections on port 5000 of the loopback network interface (127.0.0.1). As such this web server will only respond to http requests originating from that container itself.In order for the web server to accept connections originating from outside of the container you need to have it bind to the 0.0.0.0 IP address. https://stackoverflow.com/questions/26423984/unable-to-connect-to-flask-app-on-docker-from-host

2- build flask app image : docker build -t mohamedsambo/flask-app:1.0.0

3- push the image to dockerhub repo : docker push mohamedsambo/flask-app:1.0.0

4- run docker compose: docker-compose up

note: 1- mohamedsambo/flask-app:1.0.0 without prome / grafana 2- mohamedsambo/flask-app:2.0.0 using flask_prome CLIENT and docker compose uses prometheus and grafana 3- mohamedsambo/flask-app:3.0.0 using prometheus_flask_exporter

5- To see the histogram of request latencies by status and path in Prometheus, you need to set up the query sum(rate(requests_by_status_and_path_bucket{le="0.1", status=~"2..|3..|4..|5..", path="/"}[1m])) by (status)

6- Log in to Grafana: Open your Grafana instance in a web browser and log in then in new dashbord add prometheus as data source then u can visualize query and add it to new dashbord

7- very interesint if ur setting ur apps behind ingress router https://stackoverflow.com/questions/67187642/how-to-use-virtualservice-to-expose-dashboards-like-grafana-prometheus-and-kiali

devops_task_001's People

Contributors

sambo2021 avatar elamin88 avatar

Watchers

 avatar  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.