Skip to content

Commit

Permalink
doc validation
Browse files Browse the repository at this point in the history
  • Loading branch information
angelalvaigle committed Jan 12, 2025
1 parent 499a52c commit ebc5a95
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,7 @@ In this repository, this process is done automatically using **GitHub Actions**.

As you can see, unitary tests of each module and e2e tests are executed before pushing the docker images and deploying them. Using this approach we avoid deploying versions that do not pass the tests.

The deploy action is the following:

```yml
deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
needs:
[
docker-push-userservice,
docker-push-authservice,
docker-push-gatewayservice,
docker-push-webapp,
]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml -O docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/.env -O .env
docker compose --profile prod down
docker compose --profile prod up -d --pull always
```
This action uses three secrets that must be configured in the repository:
The deploy action can be found in the release.yml file in the .github\workflows folder. This action uses three secrets that must be configured in the repository:

- DEPLOY_HOST: IP of the remote machine.
- DEPLOY_USER: user with permission to execute the commands in the remote machine.
Expand Down
Binary file added docs/images/14_grafana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/src/06_runtime_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ participant gw as "gateway"
participant userserv as "user serv"
participant mongo as "MongoDB"
user --> webapp: fill registration form
user --> webapp: fill form
webapp -> gw: post request
gw -> userserv: post request
userserv -> mongo: create user
Expand Down Expand Up @@ -106,7 +106,7 @@ participant statserv as "stats serv"
participant userserv as "user serv"
participant mongo as "MongoDB"
user --> webapp: enter stats page
user --> webapp: enter ranking page
webapp -> gw: get request
gw -> statserv: get request
statserv -> mongo: ranking
Expand Down
3 changes: 3 additions & 0 deletions docs/src/13_test_report.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ image::13_1_codecoverage.png["Sonarcloud code coverage"]
The following end-to-end (E2E) tests were performed to validate key features of the application:

**- Registering a new user**: Tested that an unregistered user could successfully fill out the registration form and receive a confirmation message.

**- User login**: Ensured that a registered user could log in and see a confirmation message upon successful submission of their credentials.

**- User profile view**: Verified that a logged-in user could access and view their profile.

**- User plays game**: Checked that a logged-in user could press play and see a question displayed on the screen.

These tests were executed both locally, with manual browser observation, and headlessly in GitHub Actions. Locally, all tests were successful, but the "User plays game" test failed in GitHub Actions. This issue remains unresolved due to time constraints.
Expand Down
6 changes: 6 additions & 0 deletions docs/src/14_application_monitoring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

== Application Monitoring

The application is actively monitored using Prometheus and Grafana to ensure optimal performance and reliability.
Prometheus collects real-time metrics from the application, which are visualized in a Grafana dashboard.
The dashboard provides key insights into the application's behavior, featuring three critical graphs: the Number of Requests per Minute, the Number of Failed Requests, and the Amount of Time to Process a Request. These metrics help us track the application's health, identify bottlenecks, and respond promptly to any issues.
You can access the Grafana dashboard for this monitoring setup [here](http://4.233.148.160:9091/d/1DYaynomMk/wiq7-dashboard).

image::14_grafana.png["Application Monitoring with Prometheus and Grafana"]

0 comments on commit ebc5a95

Please sign in to comment.