Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc debug prod #479

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variables:
value: "postgres:15.10-alpine"
description: "Image de la base de données"
PROJECT_VERSION:
value: "2.4.1"
value: "2.4.2"
description: "Version du projet à déployer"
SERVER_ENV_INT:
value: "int-rapportnav-appli01"
Expand Down
2 changes: 1 addition & 1 deletion backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.lang.System.getenv

group = "fr.gouv.dgampa"
version = "2.4.1"
version = "2.4.2"
description = "RapportNav"

val kotlinVersion by extra("1.9.24")
Expand Down
1 change: 0 additions & 1 deletion backend/src/main/resources/graphql/mission.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ type Mutation {
patchMissionEnv(mission: MissionEnvInput!): Mission!
updateMissionGeneralInfo(info: MissionGeneralInfoInput!): MissionGeneralInfo!
updateMissionService(service: MissionServiceInput!): Service!
create(input: CreateOrUpdateMissionInput!): Mission!
}


Expand Down
13 changes: 8 additions & 5 deletions docs/engineering/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
* [Retour](/)
* [Tech homepage](engineering/index)
* [Stack](engineering/stack/index)
** [Frontend](engineering/stack/frontend)
** [Backend](engineering/stack/backend)
** [Database](engineering/stack/database)
** [Infrastructure](engineering/stack/infra)
* [Concepts principaux](engineering/concepts/index)
** [Gestion des utilisateurs](engineering/concepts/auth)
** [L'objet Mission](engineering/concepts/missions-and-actions)
** [Complétude des missions](engineering/concepts/mission-completion)
** [Gestion des dates](engineering/concepts/dates)
* [Stack](engineering/stack/index)
** [Frontend](engineering/stack/frontend)
** [Backend](engineering/stack/backend)
** [Database](engineering/stack/database)
** [Infrastructure](engineering/stack/infra)
* [Operations](engineering/operations/index)
** [Monitoring](engineering/operations/monitoring)
** [Troubleshooting](engineering/operations/troubleshooting)
Binary file added docs/engineering/images/portainer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/engineering/images/sonarqube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/engineering/operations/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Operations

Ici vous trouverez comment gérer les opérations en intégration et productions, notamment autour des problématiques de :
- monitoring
- troubleshooting
31 changes: 31 additions & 0 deletions docs/engineering/operations/monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Monitoring

TODO
- sentry
- monitoring physique des servers


## Portainer

Portainer permet de visualiser les logs et autres stats pour différents containers, images Docker.

Pour l'instant, il faut demander à chaque fois l'accès à la DSI car les droits sont overwritten à chaque déploiement.

Portainer n'est accessible que via le RIE à l'url suivante: http://portainer.csam.e2.rie.gouv.fr

Les logs du backend et de la database sont visibles dans les logs du container

![portainer.png](../images/portainer.png)

## Sonarqube

Sonarqube permet de mesurer la qualité du code selon plusieurs critères comme la couverture de tests, duplication de code, code smells, maintenabilité...

A chaque push sur main sur le Gitlab de la DSI, une analyse est lancée et les résultats sont updatés automatiquement.

Il est possible de voir le projet en suivant l'url: http://sonarqube.dsi.damgm.i2/projects

En fonction du résultat de la Quality Gate, un déploiement peut être bloqué.

![sonarqube.png](../images/sonarqube.png)

18 changes: 18 additions & 0 deletions docs/engineering/operations/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Troubleshooting

## J'ai déployé mais l'appli ne se lance pas

**Symptome**: après un déploiement, en se rendant sur RapportNav, rien ne se lance, rien n'est affiché.

**Cause**: l'appli a été buildée et containerizée mais la commande pour lancer le backend fail.

**Que faire**:
- Envoyer un mail à la DSI pour avoir accès à Portainer en leur précisant l'environnement et la version de l'appli (refaire pour chaque déploiement, ce n'est pas automatique pour l'instant)
- Une fois l'accès à portainer, sélectionnez:
- l'environnement
- puis le container backend
- enfin, investiguez les logs

![portainer.png](../images/portainer.png)


4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "2.4.1",
"version": "2.4.2",
"private": true,
"type": "module",
"engines": {
Expand Down
Loading