Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
administratif:tooling:ansible [2025/09/26 12:11] remiadministratif:tooling:ansible [2025/09/26 14:02] (current) remi
Line 1: Line 1:
 +====== Ansible ======
 +
 ===== Ansible Environment ===== ===== Ansible Environment =====
  
Line 18: Line 20:
          L-> roles:-> <rolename>:          L-> roles:-> <rolename>:
                                 |                                 |
-                                L-> files:       (Contains all files needed for your playbook, ansible checks this directory  +                                L-> files:       (Contains all files needed for your playbook, ansible checks this 
-                                |        |        first when you reference a file)+                                |        |        directory first when you reference a file)
                                 |        L-> authorized_keys/remi.key                                 |        L-> authorized_keys/remi.key
                                 |        L-> remi_home.tar.gz                                 |        L-> remi_home.tar.gz
                                 |                                 |
-                                L-> handlers:    (Small repetitive tasks to be called in a playbook, like restart a systemd service)+                                L-> handlers:    (Small repetitive tasks to be called in a playbook, like restart a 
 +                                |               systemd service)
                                 |           L-> restart_mysql_then_apache.yml                                 |           L-> restart_mysql_then_apache.yml
                                 |                                 |
Line 34: Line 37:
                                
 </code> </code>
 +
 +Ansible is made to run all playbooks using this "playbooks" dir as your working directory. From there all relative paths works as intended.
 +
 +You can use some pre-defined playbooks using the Galaxy store :
 +
 +<code>
 +# List installed roles :
 +ansible-galaxy collection list
 +
 +# Installs a role from prometheus space called prometheus too :
 +ansible-galaxy collection install prometheus.prometheus
 +</code>
 +
 +You can run playbooks simply like this :
 +
 +<code>
 +ansible-playbook -i labs.ini calypso-sys.yml
 +</code>
 +
 +Or with more options :
 +
 +<code>
 +# Run only on calypso0 and calypso1, import the users.yml variable file to have all users UID/GID, start the playbook at the step that runs the ISC2 task
 +ansible-playbook -i labs.ini calypso-sys.yml --limit calypso0,calypso1 --extra-vars='@users.yml' --start-at-task="Check or Add ISC2 users"
 +</code>
 +
  
  
Line 55: Line 84:
          |          |
          L-> roles:-> calypso-sys:    (Configures all calypso worker nodes, with all          L-> roles:-> calypso-sys:    (Configures all calypso worker nodes, with all
-                  |                    users, software, and system configs) 
-                  |-> rumba-sys:      (Configures rumba master, with all 
                   |                    users, software, and system configs)                   |                    users, software, and system configs)
                   |-> isc_compute:    (Configures Disco and Chacha users, software and system configs)                   |-> isc_compute:    (Configures Disco and Chacha users, software and system configs)
                   |-> julia:          (Installs Julia for a user, since there are no system-wide install)                   |-> julia:          (Installs Julia for a user, since there are no system-wide install)
-                  |-> k8s:            (Configures Kubernetes on all Calypso nodes)       +                  |-> k8s:            (Configures Kubernetes on all Calypso nodes
 +                  |-> learn           (TODO: Started a playbook to configure from scratch a webserver with all  
 +                  |                    Moodle prerequisites, to rebuild Hannibal in minutes)       
                   |-> master-sys:     (Configures system configs specific on calypsomaster only)                   |-> master-sys:     (Configures system configs specific on calypsomaster only)
                   |-> munge:          (Needed to authenticate SLURM nodes on Calypso and ISC Compute)                   |-> munge:          (Needed to authenticate SLURM nodes on Calypso and ISC Compute)
                   |-> nvidia-cuda:    (Needed to allow servers to use Nvidia GPUs)                   |-> nvidia-cuda:    (Needed to allow servers to use Nvidia GPUs)
-                  |-> prometheus:     (TODO : Installs prometheus exporters and server, separate in 2 playbooks) +                  |-> prometheus:     (Empty, TODO : Installs prometheus exporters and server, separate in 2 
-                  |-> slurm_research: (TODO : redo all installation part from compilation +                  |                    playbooks) 
 +                  |-> rumba-sys     (Configures rumba master, with all 
 +                  |                    users, software, and system configs) 
 +                  |-> slurm_research_TODO: (Empty, TODO : redo all installation part from compilation  
 +                  |                    install, separate install from config) 
 +                  |-> slurm_calypso:  (Empty, TODO : redo all installation part from compilation
                   |                    install, separate install from config)                   |                    install, separate install from config)
-                  |-> slurm_calypso (TODO : redo all installation part from compilation +                  |-> slurm_calypso_old : (Old installation of SLURM using ubuntu outdated packages) 
-                                       install, separate install from config)+                  L-> vps:             (Installs or checks base system config / users for Hannibal/Hasdrubal)
 </code> </code>
  
Back to top