Seth-education entièrement centralisé avec importation AAF¶
Context¶
Nous sommes dans un cas où tous les serveurs sont centralisés.
Schéma rapide :
+--------+ +--------+ | DC 1 | <--> | DC 2 | +--------+ | +--------+ v +--------+ | file 1 | +--------+
Ou éventuellement :
+--------+ +--------+ | DC 1 | <--> | DC 2 | +--------+ | +--------+ ,----------------, v v +--------+ +--------+ | file 1 | | file 2 | +--------+ +--------+
répartition des rôles¶
DC1¶
- contrôleur de domaine primaire
- gestion des GPO
- importation des comptes AAF
- salt
DC2¶
- contrôleur de domaine de secours
Files¶
- propose l'ensemble de partages
- stock les documents utilisateurs
- accès EOP
Maquettage¶
Dans le cas 2 DC, 1 filer pour la partie pédagogie et 1 filer pour la partie administratif.
Dans l'environnement EOLE¶
VM¶
- aca.dc1-2.8.1-Daily
- aca.dc2-2.8.1-Daily
- aca.file-2.8.1-Daily
- aca.file1-2.8.1-Daily
DC 1¶
./mount.eole-ci-tests /mnt/eole-ci-tests/scripts/configure-vm.sh -M configeol Maj-Auto -C
apt-eole install eole-seth-aaf
apt-eole install eole-workstation
CreoleSet web_url $(hostname).ac-test.fr CreoleSet gpo_script_special_shares non CreoleSet aaf_first_username_idx non CreoleSet eop_profs_can_change_all_passwords oui CreoleSet ad_importation_type 'par établissement' CreoleSet ad_pedago_adm_split_top oui CreoleSet aaf_domainname_global_domain 'file.domseth.ac-test.fr' CreoleSet aaf_domainname_global_domain_admin 'file1.domseth.ac-test.fr' CreoleSet ead_support_multietab oui echo """# -*- coding: utf-8 -*- from creole.loader import creole_loader, config_save_values c=creole_loader(rw=True) c.creole.importation.aaf_domainname_uai.aaf_domainname_uai = ['00000001', '00000002'] c.creole.importation.aaf_domainname_uai.aaf_domainname_name = ['etb1', 'etb2'] c.creole.importation.aaf_domainname_uai.aaf_domainname_domain = ['file.domseth.ac-test.fr', 'file.domseth.ac-test.fr'] c.creole.importation.aaf_domainname_uai.aaf_domainname_domain_admin = ['file1.domseth.ac-test.fr', 'file1.domseth.ac-test.fr'] config_save_values(c, 'creole') """ > add_domain.py python3 add_domain.py instance
DC 2¶
LORSQUE L'INSTANCE DE DC1 EST FINI
./mount.eole-ci-tests /mnt/eole-ci-tests/scripts/configure-vm.sh -M configeol Maj-Auto -C instance
File¶
LORSQUE L'INSTANCE DE DC2 EST FINI
./mount.eole-ci-tests /mnt/eole-ci-tests/scripts/configure-vm.sh -M configeol Maj-Auto -C
apt-eole install eole-seth-education
CreoleSet web_url $(hostname).ac-test.fr echo """# -*- coding: utf-8 -*- from creole.loader import creole_loader, config_save_values c=creole_loader(rw=True) c.creole.synchronisation_aaf.aaf_synchronize = u'oui' c.creole.synchronisation_aaf.aaf_quota_student = 300 c.creole.synchronisation_aaf.aaf_quota_hard_student = 400 c.creole.synchronisation_aaf.aaf_quota_teacher = 1024 c.creole.synchronisation_aaf.aaf_quota_hard_teacher = 1224 c.creole.synchronisation_aaf.aaf_quota_administrative = 1024 c.creole.synchronisation_aaf.aaf_quota_hard_administrative = 1224 c.creole.synchronisation_aaf.aaf_synchronize_type = 'pédagogie' config_save_values(c, 'creole') """ > synchro.py python3 synchro.py scp root@dc1.ac-test.fr:/etc/eole/private/eole-seth-education*.password /etc/eole/private/ instance
File1¶
LORSQUE L'INSTANCE DE DC2 EST FINI
./mount.eole-ci-tests /mnt/eole-ci-tests/scripts/configure-vm.sh -M configeol Maj-Auto -C
apt-eole install eole-seth-education
CreoleSet web_url $(hostname).ac-test.fr echo """# -*- coding: utf-8 -*- from creole.loader import creole_loader, config_save_values c=creole_loader(rw=True) c.creole.synchronisation_aaf.aaf_synchronize = u'oui' c.creole.synchronisation_aaf.aaf_quota_student = 300 c.creole.synchronisation_aaf.aaf_quota_hard_student = 400 c.creole.synchronisation_aaf.aaf_quota_teacher = 1024 c.creole.synchronisation_aaf.aaf_quota_hard_teacher = 1224 c.creole.synchronisation_aaf.aaf_quota_administrative = 1024 c.creole.synchronisation_aaf.aaf_quota_hard_administrative = 1224 c.creole.synchronisation_aaf.aaf_synchronize_type = 'administratif' config_save_values(c, 'creole') """ > synchro.py python3 synchro.py scp root@dc1.ac-test.fr:/etc/eole/private/eole-seth-education*.password /etc/eole/private/ instance
Dans un environnement extérieur¶
Dans le cas 2 DC, 1 filer pour tout les fichiers.
VM¶
Installer trois SETH identique.
DC1¶
Installer eole-seth-aaf eole-workstation, configurer et instancier.
Exemple de configuration obtenu en faisant :
echo """from json import load from pprint import pprint from creole.loader import creole_loader with open('/etc/eole/config.eol', 'r') as fh: configeol = load(fh) creole = creole_loader() for key in sorted(configeol): if key == '___version___': continue val = configeol[key]['val'] try: creole.find_first(byname=key) print(f'- {key} : {val}') except: pass """ > c.py python3 c.py
- aaf_domainname_domain : {'0': 'file.domseth.ac-test.fr', '1': 'file.domseth.ac-test.fr'} - aaf_domainname_name : {'0': 'etb1', '1': 'etb2'} - aaf_domainname_uai : ['00000001', '00000002'] - aaf_first_username_idx : non - aaf_domainname_global_domain : file.domseth.ac-test.fr - activer_ad_homes_share : non - activer_ad_profiles_share : non - activer_ad_zones : oui - activer_bareos_dir : non - ad_additional_dc : non - ad_additional_dc_ip : ['192.168.0.6'] - ad_backend_store : tdb - ad_force_domain_sid : non - ad_homes_share_host : file - ad_importation_type : par établissement - ad_plaintext_secrets : non - ad_profiles_share_host : file - ad_server_netbios_name : dc1 - ad_server_role : controleur de domaine - ad_zones : ['1.1.10', '2.1.10'] - ad_zones_defaut : oui - adresse_ip_dns : ['192.168.0.1'] - adresse_ip_eth0 : 192.168.0.5 - adresse_ip_gw : 192.168.0.1 - bash_tmout : 0 - check_passwd : non - domaine_messagerie_etab : domseth.ac-test.fr - eop_profs_can_change_all_passwords : oui - exim_relay_smtp : gateway.ac-test.fr - frontend_ead_distant_eth0 : oui - gpo_script_special_shares : non - ip_admin_eth0 : ['0.0.0.0'] - ip_frontend_ead_distant_eth0 : ['0.0.0.0'] - ip_ssh_eth0 : ['0.0.0.0'] - libelle_etab : aca - netmask_admin_eth0 : {'0': '0.0.0.0'} - netmask_frontend_ead_distant_eth0 : {'0': '0.0.0.0'} - netmask_ssh_eth0 : {'0': '0.0.0.0'} - nom_academie : ac-test - nom_domaine_local : domseth.ac-test.fr - nom_machine : dc1 - numero_etab : 0000000A - serveur_maj : ['test-eole.ac-dijon.fr'] - serveur_ntp : ['hestia.eole.lan'] - system_mail_from : None - vm_swappiness : 0 - web_url : dc1.ac-test.fr
DC2¶
Configuré et instancié.
Exemple de configuration :
- activer_ad_homes_share : non - activer_ad_profiles_share : non - activer_ead_web : non - activer_exim_relay_smtp : non - ad_additional_dc : oui - ad_additional_dc_force_site : non - ad_additional_dc_ip : ['192.168.0.5'] - ad_backend_store : tdb - ad_dc_sysvol_ref : 192.168.0.5 - ad_homes_share_host : file - ad_plaintext_secrets : non - ad_profiles_share_host : file - ad_ro_dc : non - ad_server_netbios_name : dc2 - ad_server_role : controleur de domaine - adresse_ip_dns : ['192.168.0.1'] - adresse_ip_eth0 : 192.168.0.6 - adresse_ip_gw : 192.168.0.1 - bash_tmout : 0 - check_passwd : non - domaine_messagerie_etab : domseth.ac-test.fr - ip_admin_eth0 : ['0.0.0.0'] - ip_ssh_eth0 : ['0.0.0.0'] - libelle_etab : aca - netmask_admin_eth0 : {'0': '0.0.0.0'} - netmask_ssh_eth0 : {'0': '0.0.0.0'} - nom_academie : ac-test - nom_domaine_local : domseth.ac-test.fr - nom_machine : dc2 - numero_etab : 0000000A - serveur_maj : ['test-eole.ac-dijon.fr'] - serveur_ntp : ['hestia.eole.lan'] - ssh_eth0 : oui - ssl_organization_unit_name : ['110 043 015', 'ac-test', 'dc2'] - system_mail_from : fromuser@ac-test.fr - system_mail_to : touser@ac-test.fr - vm_swappiness : 0
File¶
Installer eole-seth-education, configurer, copier les mots de passe des users eole-seth-education* avec par eexemple :
scp root@dc1.ac-test.fr:/etc/eole/private/eole-seth-education*.password /etc/eole/private/
Puis instancier.
Exemple de configuration :
- aaf_quota_administrative : 1024 - aaf_quota_hard_administrative : 1224 - aaf_quota_hard_student : 400 - aaf_quota_hard_teacher : 1224 - aaf_quota_student : 300 - aaf_quota_teacher : 1024 - aaf_synchronize : oui - activer_bareos_dir : non - activer_ead_web : non - activer_exim_relay_smtp : non - ad_server_netbios_name : file - ad_server_role : membre - adresse_ip_dns : ['192.168.0.5', '192.168.0.6', '192.168.0.1'] - adresse_ip_eth0 : 192.168.0.7 - adresse_ip_gw : 192.168.0.1 - bash_tmout : 0 - check_passwd : non - domaine_messagerie_etab : domseth.ac-test.fr - ead_support_multietab : oui - frontend_ead_distant_eth0 : oui - ip_admin_eth0 : ['0.0.0.0'] - ip_frontend_ead_distant_eth0 : ['0.0.0.0'] - ip_ssh_eth0 : ['0.0.0.0'] - libelle_etab : aca - netmask_admin_eth0 : {'0': '0.0.0.0'} - netmask_frontend_ead_distant_eth0 : {'0': '0.0.0.0'} - netmask_ssh_eth0 : {'0': '0.0.0.0'} - nom_academie : ac-test - nom_domaine_local : domseth.ac-test.fr - nom_machine : file - numero_etab : 0000000A - serveur_maj : ['test-eole.ac-dijon.fr'] - serveur_ntp : ['192.168.0.5', '192.168.0.6'] - ssh_eth0 : oui - ssl_organization_unit_name : ['110 043 015', 'ac-test', 'file'] - system_mail_from : fromuser@domseth.ac-test.fr - system_mail_to : touser@domseth.ac-test.fr - vm_swappiness : 0 - web_url : file.ac-test.fr
Importation¶
Sur le DC1 :
export TDB_NO_FSYNC=1 /usr/share/eole/sbin/import-aaf.py /mnt/eole-ci-tests/dataset/aaf-mini/complet.zip complète /usr/share/eole/sbin/import-ad.py --enable_transaction
Sur les filers :
synchronize_aaf_directories --debug