-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,212 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
infra/roles/referential/files/input_ref/correspondanceRefEquipement.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
modeleEquipementSource;refEquipementCible | ||
Standard - bureautique - 13 pouces;ordinateur-portable-1 | ||
Puissante - station de travail -15 pouces;ordinateur-portable-2 | ||
Tous types d’ordinateur fixe;ordinateur-fixe-1 | ||
Entrée de gamme - LCD - 24 pouces;ecran-1 | ||
Milieu de gamme - LCD - 32 pouces;ecran-2 | ||
Haut de gamme - OLED;ecran-3 | ||
Tous types de serveur rack;serveur-rack-1 | ||
Tous types de baie de stockage;baie-stockage-1 | ||
Tous types de baie NAS;baie-nas-1 | ||
Tous types de commutateur;commutateur-1 |
11 changes: 11 additions & 0 deletions
11
infra/roles/referential/files/input_ref/correspondanceTypeEquipement.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type_equipement_id;equipement_id | ||
Ordinateur portable;ordinateur-portable-1 | ||
Ordinateur portable;ordinateur-portable-2 | ||
Écran;ecran-1 | ||
Écran;ecran-2 | ||
Écran;ecran-3 | ||
Ordinateur fixe - sans écran;ordinateur-fixe-1 | ||
Serveur rack;serveur-rack-1 | ||
Baie de stockage;baie-stockage-1 | ||
Baie NAS;baie-nas-1 | ||
Commutateur réseau;commutateur-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
nomCritere;description;unite | ||
Climate change;Greenhouse gases (GHG) are gaseous components which absorb the infrared radiation emitted by the earth's surface 1 and thus contribute to the greenhouse effect.;kg CO2 eq | ||
Particulate matter and respiratory inorganics;The presence of small-diameter fine particles in the air - especially those with a diameter of less than 10 microns - represents a human health problem, since their inhalation can cause respiratory and cardiovascular problems.;Disease incidence | ||
Ionising radiation;Corresponds to the effects of radioactivity. This impact corresponds to the radioactive waste resulting from the production of nuclear electricity.;kBq U-235 eq | ||
Acidification;Air acidification is linked to emissions of nitrogen oxides, sulfur oxides, ammonia and hydrochloric acid. These pollutants turn into acids in the presence of moisture, and their fallout can damage ecosystems as well as buildings. ;mol H+ eq | ||
Resource use (minerals and metals);Industrial exploitation leads to a decrease in available resources whose reserves are limited. This indicator assesses the amount of mineral and metallic resources extracted from nature as if they were antimony.;kg Sb eq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
code;libelle | ||
FABRICATION;Manufacturing | ||
DISTRIBUTION;Transportation | ||
UTILISATION;Using | ||
FIN_DE_VIE;End of Life |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cle;source;valeur | ||
PUEParDefaut;SSG;1.75 | ||
dureeVieParDefaut;SSG;2 |
201 changes: 201 additions & 0 deletions
201
infra/roles/referential/files/input_ref/impactequipements.csv
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type;serveur;commentaire;dureeVieDefaut;refEquipementParDefaut;source | ||
Ordinateur portable;;Durée de vie dans Base IMPACTS numérique v1.5;5;ordinateur-portable-1; | ||
Ordinateur fixe - sans écran;;Durée de vie dans Base IMPACTS numérique v1.5;6;ordinateur-fixe-1; | ||
Écran;;Durée de vie dans Base IMPACTS numérique v1.5;7;ecran-2; | ||
Serveur rack;true;Durée de vie dans Ademe - Rapport septembre 2022 - évaluation de l’impact environnemental d’un ensemble de produits reconditionnés;5;serveur-rack-1; | ||
Baie de stockage;;Durée de vie moyenne par Octo;8;baie-stockage-1; | ||
Baie NAS;;Durée de vie moyenne par Octo;8;baie-nas-1; | ||
Commutateur réseau;;Durée de vie moyenne par Octo;8;commutateur-1; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
REFERENTIELS="criteres etapes hypotheses typeEquipement correspondanceRefEquipement impactequipements mixelecs" | ||
|
||
for referentiel in $REFERENTIELS; do | ||
curl -s -XPOST http://localhost:18080/referentiel/$referentiel/csv --form file=@input_ref/$referentiel.csv | ||
echo "" | ||
done | ||
|
||
cat ref_correspondance_type_equipement.sql | docker exec -i postgresdb psql -U postgres postgres | ||
|
||
docker cp input_ref/correspondanceTypeEquipement.csv postgresdb:/docker-entrypoint-initdb.d/correspondanceTypeEquipement.csv | ||
|
||
docker exec -i postgresdb psql -U postgres postgres -c "\copy ref_correspondance_type_equipement FROM '/docker-entrypoint-initdb.d/correspondanceTypeEquipement.csv' DELIMITER ';' CSV HEADER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
REFERENTIELS="criteres etapes hypotheses typeEquipement correspondanceRefEquipement impactequipements mixelecs" | ||
|
||
for referentiel in $REFERENTIELS; do | ||
# Attention, manipulations pour que cet import fonctionne : | ||
# - Modifier sur le VM docker-compose.yml pour y ajouter le port 18080 au service api-rest-referentiels | ||
# - docker compose --env-file .env.prod up -d api-rest-referentiels | ||
# - Lancer l'import | ||
# - Retirer le port dans docker-compose.yml | ||
# - docker compose --env-file .env.prod up -d api-rest-referentiels | ||
curl -s -XPOST http://localhost:18080/referentiel/$referentiel/csv --form file=@input_ref/$referentiel.csv | ||
echo "" | ||
done | ||
|
||
. ../.env.prod | ||
|
||
cat ./ref_correspondance_type_equipement.sql | docker exec -i postgresdb psql -U $POSTGRES_USER postgres | ||
|
||
docker cp input_ref/correspondanceTypeEquipement.csv postgresdb:/docker-entrypoint-initdb.d/correspondanceTypeEquipement.csv | ||
|
||
docker exec -i postgresdb psql -U $POSTGRES_USER postgres -c "\copy ref_correspondance_type_equipement FROM '/docker-entrypoint-initdb.d/correspondanceTypeEquipement.csv' DELIMITER ';' CSV HEADER" |
6 changes: 6 additions & 0 deletions
6
infra/roles/referential/files/ref_correspondance_type_equipement.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE IF NOT EXISTS ref_correspondance_type_equipement ( | ||
type_equipement_id varchar(100) NOT NULL, | ||
equipement_id varchar(100) NOT NULL | ||
); | ||
|
||
TRUNCATE TABLE ref_correspondance_type_equipement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.