Skip to content

This Project was implemented while I was working as an Intern at PhonePe. The project is about a Monitoring Dashboard that could be used by engineers to browse through their previous test results executed by them. It makes sure each engineer's test result does not converge with other results, thereby maintaining a stateful architecture.

Notifications You must be signed in to change notification settings

kuldeepjain-work/PhonePe-Project

Repository files navigation

Distributed Monitoring System

A system that allows running tests on slave/minion machines and viewing results through a central dashboard. For this Project I used SALT. Similar platform is ansible.

System Components

This distributed monitoring system consists of two main components:

  1. Slave/Minion Side: Machines that run the actual test files.
  2. Host/Storage Side: Machine that stores test results and provides a web dashboard to view them.

Slave/Minion Side Configuration

Prerequisites

  • Python 3.x
  • SSH/SCP access to the storage host
  • Cron (for scheduled execution)

Setup Instructions

  1. Install Dependencies: bash pip install -r requirements_minion.txt

  2. Configure Storage Host: Edit the configuration to set the IP address of your storage host for SCP transfers.

  3. Set Up Cron Job (Optional): bash

    Edit crontab

    crontab -e

    Add a line to run tests periodically, for example every hour:

    0 * * * * /path/to/execute.sh

Running Tests

Execute the test runner:

  • For Refrence, I have also provided a sample pytest file.
  • Save the test file locally.

bash python3 run_pytest.py

You will be prompted for:

  1. The Path for the test file: Enter the path to your pytest file
  2. The machine name(s) or pattern to run them on: Specify which machines should execute the tests

The system will:

  • Execute the tests on the specified machines
  • Display the results locally
  • Transfer the results to the storage host automatically

Host/Storage Side Configuration

Prerequisites

  • Python 3.x
  • FastAPI/Uvicorn
  • Database (as specified in requirements)

Setup Instructions

  1. Install Dependencies: bash pip install -r requirements_host.txt

  2. Start the Dashboard Server: bash uvicorn hosting_file:app --host 0.0.0.0 --port 8000 --reload

Accessing the Dashboard

  1. Open a web browser and navigate to:

    http://:8000

  2. For New Users:

    • Click on the registration link
    • Complete the registration form
    • Submit your credentials
  3. For Existing Users:

    • Enter your login credentials
    • Access the dashboard

Note: Test results will only appear in the dashboard after tests have been executed on the slave/minion side.

Troubleshooting

  • Ensure proper network connectivity between slave and host machines
  • Verify that SCP transfers are configured correctly
  • Check that all dependencies are installed on both systems
  • Confirm that the host server is running and accessible on the specified port

About

This Project was implemented while I was working as an Intern at PhonePe. The project is about a Monitoring Dashboard that could be used by engineers to browse through their previous test results executed by them. It makes sure each engineer's test result does not converge with other results, thereby maintaining a stateful architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published