You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Build the PeerPrep Docker containers with `docker compose build`
14
-
4. Add your docker username in `deploy.sh` at root.
15
-
5. To deploy on Kubernetes, run `./deploy.sh` at root.
16
-
6. View deployments, pods and HPA. Ensure all services are running. `kubectl get all`
17
-
7. Wait for a few minutes for kubernetes to become fully functional. It is ready when running `kubectl get hpa` does not show any `<unknown>` under `TARGETS`
18
-
8. Load testing:
14
+
4. Create the configmap for the nginx api-gateway: run `kubectl create configmap nginx-config --from-file=backend/api-gateway/nginx.conf` at root.
15
+
5. Create the configmap for mongo: run `kubectl create configmap init-mongo-script --from-file=init-mongo.js` at root.
16
+
6. Add your docker username in `deploy.sh` at root.
17
+
7. To deploy on Kubernetes, run `./deploy.sh` at root.
18
+
8. View deployments, pods and HPA. Ensure all services are running. `kubectl get all`
19
+
9. Wait for a few minutes for kubernetes to become fully functional. It is ready when running `kubectl get hpa` does not show any `<unknown>` under `TARGETS`
20
+
10. Load testing:
19
21
* In a separate terminal, run command to carry conduct load testing
20
22
```
21
23
kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://<service>.default.svc.cluster.local:<port>/<route>/test; done"
* Testing can also be done on our deployed instance, by replacing the address with `52.221.131.145`. For example, `http://52.221.131.145:3001/users/test`. However, this is unlikely to result in any scaling due to Amazon EC2 throttling EC2 API requests for each AWS account on a per-Region basis, hence limiting the load imposed on each service.
29
32
30
-
9. Monitor autoscaling with `kubectl get hpa <service>-hpa --watch`. This command will watch the HPA in real-time, showing changes in replica counts and metrics. It requires a few minutes for the pods to scale up and down. Replace `<service>` appropriately with:
33
+
11. Monitor autoscaling with `kubectl get hpa <service>-hpa --watch`. This command will watch the HPA in real-time, showing changes in replica counts and metrics. It requires a few minutes for the pods to scale up and down. Replace `<service>` appropriately with:
31
34
* user-service
32
35
* question-service
33
36
* matching-service
34
37
* collaboration-service
35
38
36
-
10. `Ctrl + C` to exit. To stop and delete to prevent resource wastage: `kubectl delete all --all`
39
+
12. `Ctrl + C` to exit. To stop and delete to prevent resource wastage: `kubectl delete all --all`
0 commit comments