Skip to content

Commit

Permalink
Auto-deploy release & merge into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitlab runner committed Nov 18, 2024
1 parent 93a5246 commit c430f28
Show file tree
Hide file tree
Showing 171 changed files with 24,171 additions and 223 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.3.31
- Changement du système d'authentification du S3 qui corrige les problèmes d'upload en SAAS
- Mise à jour des paquets unicaen
- Suppression de référence à un mail fixe dans le code
- Correction d'un bug d'historisation des cours

## 1.3.11
- Intégration de l'authentification SMTP
- Mise à jour BddAdmin
Expand Down
26 changes: 19 additions & 7 deletions DockerfileApacheService
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,38 @@ RUN apt-get install -y apache2
RUN apt-get install -y libapache2-mod-shib2
RUN apt-get install -y supervisor

## Paquets pour le wayf
RUN apt-get install -y imagemagick
RUN apt-get install -y python3 python3-pip
RUN pip3 install lxml
RUN apt-get install -y libxml2-utils
RUN apt-get install -y unzip
RUN apt-get install -y wget

COPY ./deploy_configuration/apache/template-000-default.conf /
COPY ./deploy_configuration/apache/template-default-ssl.conf /

COPY ./deploy_configuration/apache/replace_env.sh /
### Configuration WayF
RUN apt-get install -y php7.4-fpm php7.4-common php7.4-xml php7.4-mbstring libapache2-mod-php
RUN apt-get install -y php7.4-fpm php7.4-common php7.4-xml php7.4-mbstring libapache2-mod-php php-curl
RUN a2enmod proxy_fcgi setenvif

RUN mkdir /wayf
WORKDIR /wayf
RUN apt-get install -y wget
RUN wget https://gitlab.switch.ch/gip-renater/SWITCHwayf/-/archive/1.22-0001/SWITCHwayf-1.22-0001.tar.gz
RUN tar xvzf SWITCHwayf-1.22-0001.tar.gz -C /opt/
RUN ln -s /opt/SWITCHwayf-1.22-0001 /opt/switchwayf
RUN chmod -R go=u-w /opt/switchwayf

##RUN wget https://gitlab.switch.ch/gip-renater/SWITCHwayf/-/archive/1.22-0001/SWITCHwayf-1.22-0001.tar.gz
##RUN tar xvzf SWITCHwayf-1.22-0001.tar.gz -C /opt/
##RUN ln -s /opt/SWITCHwayf-1.22-0001 /opt/switchwayf
##RUN chmod -R go=u-w /opt/switchwayf

WORKDIR /
### Fin Config WayF
###Fin Config WayF



COPY ./deploy_configuration/shibconf/shibboleth/supervisord.conf /

RUN mkdir -p /var/cache/shibboleth

RUN a2enmod shib
RUN a2enmod rewrite actions proxy proxy_fcgi setenvif
Expand All @@ -80,6 +88,10 @@ COPY ./deploy_configuration/shibconf/files_conf/ports.conf /etc/apache2
RUN a2enconf security
RUN a2enconf wayf

COPY ./switchwayf /var/www/html/switchwayf
RUN chmod -R go=u-w /var/www/html/switchwayf

RUN apt-get install -y cron
RUN apt-get install -y supervisor
RUN apt-get install -y gettext-base

Expand Down
5 changes: 5 additions & 0 deletions DockerfileApp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ RUN composer install

ENV COMPOSER_ALLOW_SUPERUSER=1

# For cron
RUN apt-get install -y cron
# For run cron + php
RUN apt-get install -y supervisor


RUN mkdir -p data/cache && chmod -R 777 data/cache
RUN mkdir -p data/DoctrineModule/cache && chmod -R 777 data/DoctrineModule/cache
Expand Down
1 change: 1 addition & 0 deletions DockerfileDatabaseTimeMachine
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN apt-get update && apt-get install -y cron postgresql-client

RUN apt-get install -y python3-full python3-pip
RUN apt-get install -y python3-boto3
RUN apt-get install -y jq
COPY ./deploy_configuration/time-machine/upload-dump-database-s3.py /
RUN chmod u+x /upload-dump-database-s3.py

Expand Down
81 changes: 65 additions & 16 deletions SAAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,74 @@ Méthode utilisée à l'université de Caen pour avoir un compte ACME pour gére
- Dans les paramètres de ce compte, il faut préciser qu'il n'a des droits que sur le nom de domaine définit précédement.
- Une fois le compte ACME créé, vous avez toutes les informations nécessaires pour gérer le cycle de vie du certificat.

### 5. SHIBBOLETH
### 5. RENATER/SHIBBOLETH

Pour le bon fonctionnement de Smile, il est nécessaire de déclarer le service Shibboleth sur votre portail Renater.

Rendez-vous sur le portail Renater : https://registry.federation.renater.fr/entities et ajoutez un nouveau service.

#### Présentation

Pour être éligible à la fédération Edugain les champs en anglais doivent être renseignés.
Nom (fr et en) : Smile
Logo : https://smile.unicaen.fr/img/logo_smile_RVB.jpg
Description (vous pouvez adapter) : Système de gestion en ligne des publics en mobilité internationale de l’université de XXXXXX.
Description (en) : Online management system for international students.
URL du service : https://smile.XXXXX.fr/ (exemple pour Caen : https://smile.unicaen.fr/)

Public du service : Service à portée nationale
Type du service : Application métier

#### Responsables

Langue: Français
Responsables : la/les personnes qui gèrent la déclaration du service.

Sélection de l'organisme : Votre établissement

#### Contacts

Les adresses de contact doivent être des adresses génériques sinon Edugain refusera la déclaration (on peut mettre deux adresses identiques).
Contact technique : (exemple: contact-smile@unicaen.fr)
Contact sécurité : (exemple: contact-smile@unicaen.fr)

#### Fédération

Si vous venez de créer le service, enregistrez-vous d'abord dans la fédération de Test pour vérifier que tout fonctionne correctement. Vous pourrez changer après pour la fédération de production.

Si vous voulez passer en production, ça se fait en 2 étapes.
- Il faut d'abord s'enregistrer dans la fédération Education-Recherche.
- Il faudra attendre la validaton de Renater, quand vous êtes validé, vous pouvez demander à vous enregistrer dans la fédération Edugain puis attendre la validation.

#### Attributs

Pour Smile, il faut fournir les attributs suivants :
Vous pouvez cocher obligatoire pour tous les éléments.

Nom : Finalité
- eduPersonPrincipalName : identification
- o (organizationName) : identification
- mail : identification
- displayName : Information obligatoire pour générer un contrat pédagogique
- eduOrgLegalName : Information obligatoire pour générer un contrat pédagogique
- homePostalAddress : Information obligatoire pour générer un contrat pédagogique
- shacDateOfBirth : Information obligatoire pour générer un contrat pédagogique
- shacHomeOrganization : Information obligatoire pour générer un contrat pédagogique

Cocher "Les données sont traitées en France ou dans un autre pays de l'UE"

#### Informations techniques

L'URL des métadonnées est l'URL de votre instance suivi de /Shibboleth.sso/Metadata
- Exemple : https://smile.unicaen.fr/Shibboleth.sso/Metadata

Vous faites ensuite "Chargez les métadonnées" pour que Renater récupère les métadonnées de votre instance.
Le reste de la page devrait se remplir automatiquement.

L'entity ID est le nom de domaine de votre instance de Smile suivi de /shibboleth-sp
- Exemple : https://smile.monuniversite.fr/shibboleth-sp

Exemple :
```
https://smile.monuniversite.fr/shibboleth-sp
```
#### Conformité

A définir.

Les attributs nécessaires pour Smile sont :
- displayName
- mail
- eduPersonPrincipalName
- eduOrgLegalName
- shacDateOfBirth
- givenName
- sn (surname)
- homePostalAddress
- o (organizationName)
- shacHomeOrganization
4 changes: 2 additions & 2 deletions deploy_configuration/php/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
nodaemon=true

[program:cron]
command=/cron -f
command=/usr/sbin/cron -f
autostart=true
autorestart=true

[program:php-fpm]
command=/usr/sbin/php-fpm7.4 -F
command=/usr/local/sbin/php-fpm -F
autostart=true
autorestart=true
5 changes: 4 additions & 1 deletion deploy_configuration/time-machine/timemachine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

# Nom du fichier de dump
DUMP_FILE="db_backup_$(date +%Y-%m-%d_%H-%M-%S).sql"
ENCODED_DB_PASSWORD=$(printf '%s' "$DATABASE_PSWD" | jq -sRr @uri)

echo ${DUMP_FILE}
pg_dump --dbname="postgresql://$DATABASE_USER:$DATABASE_PSWD@$DATABASE_HOST:$DATABASE_PORT/$DATABASE_NAME" > "/timemachine/${DUMP_FILE}"


pg_dump --dbname="postgresql://$DATABASE_USER:$ENCODED_DB_PASSWORD@$DATABASE_HOST:$DATABASE_PORT/$DATABASE_NAME" > "/timemachine/${DUMP_FILE}"
python3 /upload-dump-database-s3.py /timemachine/${DUMP_FILE} ${DUMP_FILE}
3 changes: 1 addition & 2 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
data/

public/css/.sass-cache
public/upload
upload/
public/upload/
node_modules
!BddAdmin/data/
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'calendar',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'calendar_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/composante.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'composante',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'composante_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/composante_groupe.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'composante_groupe',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'composante_groupe_id_seq',
'columns' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'composante_groupe_role_utilisateur',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'composante_groupe_role_utilisateur_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/cours.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'cours',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'cours_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'document',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'document_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/domaine_formation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'domaine_formation',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'domaine_formation_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/etablissement.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'etablissement',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => NULL,
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/fichier_fichier.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'fichier_fichier',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => NULL,
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/fichier_nature.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'fichier_nature',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'fichier_nature_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/formation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'formation',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'formation_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/import_composante.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'import_composante',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'import_composante_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/import_cours.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'import_cours',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'import_cours_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/import_formation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'import_formation',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'import_formation_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/import_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'import_log',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'import_log_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/inscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'inscription',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'inscription_id_seq',
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/inscription_cours_linker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'inscription_cours_linker',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'inscription_cours_linker_id_seq',
'columns' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'inscription_formation_linker',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => NULL,
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/langue.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'langue',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => NULL,
'columns' => [
Expand Down
2 changes: 1 addition & 1 deletion src/BddAdmin/data/ddl/table/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'schema' => 'public',
'name' => 'message',
'temporary' => FALSE,
'logging' => FALSE,
'logging' => TRUE,
'commentaire' => NULL,
'sequence' => 'message_id_seq',
'columns' => [
Expand Down
Loading

0 comments on commit c430f28

Please sign in to comment.