Differences

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

Link to this comparison view

Next revision
Previous revision
wiki:user:ansible_artscluster [2019/05/22 14:48] – created arnoschoenmakerswiki:user:ansible_artscluster [2019/05/22 14:51] (current) arnoschoenmakers
Line 1: Line 1:
 ====== Ansible usage on GPU cluster ====== ====== Ansible usage on GPU cluster ======
  
-Just some instrauctions on how to use ansible on the GPU cluster.<code>+Just some instructions on how to use ansible on the GPU cluster.
  
-Voor clusterwide commando’s suggereert Mike on ansible te gebruiken. Die ik krijg ik in ieder geval aan de praat: 
-`apt-get install ansible` op de machine waarvandaan je commando’s wilt uitvoeren 
-Daar een file `/etc/ansible/hosts` maken met zoiets: 
  
-```[artscluster_nodes]+For Ansible make a file `/etc/ansible/hostswith:<code> 
 +[artscluster_nodes]
 arts[001:040].apertif arts[001:040].apertif
  
Line 15: Line 13:
 [artscluster:children] [artscluster:children]
 artscluster_nodes artscluster_nodes
-artscluster_master```+artscluster_master 
 +</code>
  
-De hosts file kan ook ergens anders staan, maar dan moet je `ANSIBLE_INVENTORY=/path/to/host/fileals envvar zetten.+De hosts file kan ook ergens anders staan, maar dan moet je ''ANSIBLE_INVENTORY=/path/to/host/file'' als envvar zetten.
  
-Om commando’s uit te voeren: `ansible <hostgroup> -a "<command>"`+  * Om commando’s uit te voeren: ''ansible <hostgroup> -a "<command>"'' 
 +  * Om met een andere username in te loggen (Default is huidige user): ''ansible -u apertif'' 
 +  * Om meer processen parallel te doen (Default is 5): e.g. ''ansible -f 40'' 
 +  * Om alle software te herstarten zou je dus het volgende kunnen doen:<code> 
 +> ansible -u apertif -f 40 artscluster_nodes -a "sudo systemctl restart arts-nodes.service" 
 +> ansible -u apertif artscluster_master -a "sudo systemctl restart arts-survey.service" 
 +</code>
  
-Om met een andere username in te loggen (Default is huidige user): `ansible -u apertif`+===== Wat doet ansible als een host niet reageert? =====
  
-Om meer processen parallel te doen (Default is 5): e.g. `ansible -f 40` 
  
-Om alle software te herstarten zou je dus het volgende kunnen doen: +  * Default timeout is 10s, daarna krijg je dit:<code> 
-`ansible -u apertif -f 40 artscluster_nodes -a "sudo systemctl restart arts-nodes.service"+[oostrum@hermes]~$ ansible test -a "hostname"
-`ansible -u apertif artscluster_master -a "sudo systemctl restart arts-survey.service"+
- +
-Wat doet ansible als een host niet reageert? +
- +
- Default timeout is 10s, daarna krijg je dit: +
-```[oostrum@hermes]~$ ansible test -a "hostname"+
 www.astron.nl | UNREACHABLE! => { www.astron.nl | UNREACHABLE! => {
     "changed": false,      "changed": false, 
     "msg": "Failed to connect to the host via ssh: ssh: connect to host www.astron.nl port 22: Operation timed out",      "msg": "Failed to connect to the host via ssh: ssh: connect to host www.astron.nl port 22: Operation timed out", 
     "unreachable": true     "unreachable": true
-}``` +}
 </code> </code>
 +
 +

QR Code
QR Code wiki:user:ansible_artscluster (generated for current page)