Skip to content

A real time cloud native monitoring dashboard which utilises javascript, bootstrap, and custom css for the front end, backend getting powered by python and flask, and deployment is partnered with AWS ECR and EKS

Notifications You must be signed in to change notification settings

suneel944/cloud-native-monitoring

Repository files navigation

✨ Cloud Native Monitoring ✨

Build

📒 Pre-requisites

📘 Step by step process

  • First and formost if you don't have a aws credentials create one
    • Create a root user
    • Create an IAM user
      • Login as an IAM user
      • Create the access_key and
      • Add a programmatical access key token and align it with required permissions
        • Permission required: AWS ECR related permission (assuming that a permission group is created and then that permission is assigned to the IAM user). Check the created credentials are working as expected and add the credentials created to aws cli by using. Reference
          aws configure
          
      • Navigate to IAM console and select the created IAM and create a role called eksClusterRole. link
    • Install pip - reference
      python -m ensurepip --upgrade
      
    • Install pipenv - reference
      pip install pipenv
      
    • Install all the requirements (assuming that requirements.txt is in project root directory)
      pipenv install -r requirements.txt
      
    • Add the below sensitive information to github secrets > actions > new repository secret
      • AWS_ACCESS_KEY_ID
      • AWS_SECRET_ACCESS_KEY
      • EKS_CLUSTER_ROLE
      • EKS_NODE_ROLE

✍️ Running the application locally

  • Build the docker image
    docker build . -t flask/cloud-native-monitoring:latest
    
  • Use the docker compose to start running the container
    docker compose up
    -OR-
    docker compose up --build
    
  • Run without docker
    python manage.py run -h <host_address> -p <port_number>
    -OR-
    python manage.py run
    -OR-
    python manage.py run
    -OR- 
    gunicorn app:create_app() -b <host_address:port_number> -w <number_of_workers> --worker-class gevent --timeout <max_time_before_worker_reset> --max-requests <maximum_number_of_requests>
    
    for the above command, if there is a requirement of debug, then appending debug would suffice in each

💡 Fancy running your github action locally

  • Create a file called .secrets in the root directory to mimic the github secrets and store all the secrets
    AWS_ACCESS_KEY_ID=<iam_key_id>
    AWS_SECRET_ACCESS_KEY=<iam_secret_access_key>
    EKS_CLUSTER_ROLE=<cluster_role_name>
    EKS_NODE_ROLE=<node_role_name>
    
  • Once secret file is ready, then you are good to with the execution of the github workflow file locally
    act --secret-file <relative_path_to_.secrets_file>
    

📸 Dashboard

Dashboard snapshot

📼 Demo

EKS_DEPLOYMENT_DEMO.mp4

About

A real time cloud native monitoring dashboard which utilises javascript, bootstrap, and custom css for the front end, backend getting powered by python and flask, and deployment is partnered with AWS ECR and EKS

Topics

Resources

Stars

Watchers

Forks