|
23 | 23 |
|
24 | 24 | - You can check for a hook with `cat command.git/hooks/pre-commit` if it returns the code then the hook is installed.
|
25 | 25 |
|
26 |
| -- Additional information is described in the file [using_black.md](wiki/using_black.md) |
| 26 | +- Additional information is described in the file [using_black.md](wiki/using_black.md) |
| 27 | + |
| 28 | +# Project Launch Guide |
| 29 | + |
| 30 | +## 1. Clone the Repositories |
| 31 | + |
| 32 | +```bash |
| 33 | +# Clone the main repository |
| 34 | +git clone https://github.com/moevm/qemu-riscv-cluster.git |
| 35 | +cd qemu-riscv-cluster |
| 36 | + |
| 37 | +# Initialize and update submodules |
| 38 | +git submodule init |
| 39 | +git submodule update |
| 40 | +``` |
| 41 | + |
| 42 | +## 2. Dependencies for Running on Host |
| 43 | + |
| 44 | +### System Dependencies |
| 45 | + |
| 46 | +```bash |
| 47 | +# Install required packages |
| 48 | +sudo apt-get install -y \ |
| 49 | + docker.io \ |
| 50 | + docker-compose \ |
| 51 | + python3 \ |
| 52 | + python3-pip |
| 53 | +``` |
| 54 | +```bash |
| 55 | +sudo docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions |
| 56 | +sudo systemctl restart docker |
| 57 | +``` |
| 58 | + |
| 59 | +## 3. Project Management |
| 60 | + |
| 61 | +The project management script supports the following commands: |
| 62 | + |
| 63 | +```bash |
| 64 | +# Update submodules |
| 65 | +./deploy_service.sh update |
| 66 | + |
| 67 | +# Start services (default: 5 replicas) |
| 68 | +./deploy_service.sh start [number_of_replicas] |
| 69 | + |
| 70 | +# Stop services |
| 71 | +./deploy_service.sh stop |
| 72 | + |
| 73 | +# Restart services |
| 74 | +./deploy_service.sh restart [number_of_replicas] |
| 75 | + |
| 76 | +# Full reset (stop, remove, initialize, start) |
| 77 | +./deploy_service.sh reset [number_of_replicas] |
| 78 | + |
| 79 | +# Show help |
| 80 | +./deploy_service.sh help |
| 81 | +``` |
| 82 | + |
| 83 | +The script will launch: |
| 84 | + |
| 85 | +* Grafana |
| 86 | +* Prometheus |
| 87 | +* Loki |
| 88 | +* gRPC server |
| 89 | +* Docker Compose with the controller |
| 90 | +* Worker containers (specified number of replicas) |
| 91 | + |
| 92 | +## 4. Running Tests |
| 93 | + |
| 94 | +### Test Preparation |
| 95 | + |
| 96 | +1. Make sure all system components are up and running |
| 97 | +2. Verify the availability of all services: |
| 98 | + |
| 99 | + * Grafana (port 3000) |
| 100 | + * Prometheus (port 9090) |
| 101 | + * Loki (port 3100) |
| 102 | + * gRPC server |
| 103 | + |
| 104 | +### Load Test Description |
| 105 | + |
| 106 | +The load test validates the performance of the load distribution system and includes: |
| 107 | + |
| 108 | +1. File upload testing: |
| 109 | + |
| 110 | + * Generating test files of a specified size and type |
| 111 | + * Sending files through the gRPC server |
| 112 | + * Validating file uploads and correctness |
| 113 | + |
| 114 | +2. Load distribution testing: |
| 115 | + |
| 116 | + * Simulating multiple concurrent users |
| 117 | + * Checking task distribution balance across workers |
| 118 | + * Monitoring individual worker load |
| 119 | + |
| 120 | +3. Performance metrics collection: |
| 121 | + |
| 122 | + * System response time |
| 123 | + * Number of processed requests |
| 124 | + * Size of processed files |
| 125 | + * Number of errors |
| 126 | + |
| 127 | +### Running the Load Test |
| 128 | + |
| 129 | +```bash |
| 130 | +# Run the test with default parameters |
| 131 | +./run_load_test.sh |
| 132 | + |
| 133 | +# Or with custom parameters |
| 134 | +./run_load_test.sh -d 60 -c 3 -s 10KB -t text |
| 135 | +``` |
| 136 | + |
| 137 | +Test parameters: |
| 138 | + |
| 139 | +* `-d, --duration` – duration of the test in seconds (default: 60) |
| 140 | +* `-c, --concurrent` – number of concurrent users (default: 3) |
| 141 | +* `-s, --size` – size of the test file (default: 10KB) |
| 142 | +* `-t, --type` – type of the test file (text or binary) |
| 143 | + |
| 144 | +### Test Results |
| 145 | + |
| 146 | +After running the test, you'll see: |
| 147 | + |
| 148 | +* Total number of requests |
| 149 | +* Average response time |
| 150 | +* 95th percentile response time |
| 151 | +* 99th percentile response time |
| 152 | +* Total test duration |
| 153 | + |
| 154 | +Metrics are also available in: |
| 155 | + |
| 156 | +* Prometheus (port 9090) |
| 157 | +* Grafana dashboards (port 3000) |
| 158 | +* Loki logs (port 3100) |
| 159 | + |
| 160 | +## 5. Monitoring |
| 161 | + |
| 162 | +Once all components are running, you can access: |
| 163 | + |
| 164 | +* Grafana: http://localhost:3000 |
| 165 | +* Prometheus: http://localhost:9090 |
| 166 | +* Loki: http://localhost:3100 |
| 167 | + |
| 168 | +## 6. Stopping the Project |
| 169 | + |
| 170 | +```bash |
| 171 | +./deploy_service.sh stop |
| 172 | +``` |
0 commit comments