omnia.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. # Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Validate the cluster
  16. hosts: localhost
  17. connection: local
  18. gather_facts: no
  19. roles:
  20. - cluster_validation
  21. - name: Validate nfs_node config
  22. hosts: nfs_node
  23. gather_facts: false
  24. tasks:
  25. - name: Validate nfs_node config
  26. include_role:
  27. name: powervault_me4_nfs
  28. tasks_from: validate_nfs_config.yml
  29. when: hostvars['127.0.0.1']['powervault_status']
  30. - name: Gather facts from all the nodes
  31. hosts: manager, compute, login_node, nfs_node
  32. - name: Apply common installation and config
  33. hosts: manager, compute, login_node
  34. gather_facts: false
  35. roles:
  36. - common
  37. tags: common
  38. - name: Apply login common installation and config
  39. hosts: manager, login_node
  40. gather_facts: false
  41. roles:
  42. - login_common
  43. tags: freeipa
  44. - name: Apply login server installation and config
  45. hosts: manager
  46. gather_facts: false
  47. roles:
  48. - login_server
  49. tags: freeipa
  50. - name: Apply login node installation and config
  51. hosts: login_node
  52. gather_facts: false
  53. roles:
  54. - login_node
  55. tags: freeipa
  56. - name: Apply common K8s installation and config
  57. hosts: manager, compute
  58. gather_facts: false
  59. roles:
  60. - k8s_common
  61. tags: kubernetes
  62. - name: Apply K8s manager config
  63. hosts: manager
  64. gather_facts: true
  65. roles:
  66. - k8s_manager
  67. tags: kubernetes
  68. - name: Apply K8s firewalld config on manager and compute nodes
  69. hosts: manager, compute
  70. gather_facts: false
  71. roles:
  72. - k8s_firewalld
  73. tags: kubernetes
  74. - name: Powervault Server Configuration
  75. hosts: nfs_node
  76. gather_facts: false
  77. tasks:
  78. - name: Configuring NFS node
  79. include_role:
  80. name: powervault_me4_nfs
  81. when: hostvars['127.0.0.1']['powervault_status']
  82. - name: Map volume
  83. hosts: powervault_me4
  84. connection: local
  85. gather_facts: false
  86. tasks:
  87. - name: Include map volume task
  88. include_tasks: "{{ playbook_dir }}/control_plane/roles/powervault_me4/tasks/ports.yml"
  89. when: hostvars['127.0.0.1']['powervault_status']
  90. - name: Include map volume task
  91. include_tasks: "{{ playbook_dir }}/control_plane/roles/powervault_me4/tasks/map_volume.yml"
  92. when: hostvars['127.0.0.1']['powervault_status']
  93. - name: Apply NFS server setup on NFS node
  94. hosts: nfs_node
  95. gather_facts: false
  96. tasks:
  97. - name: Check the mapped volume on server
  98. include_role:
  99. name: powervault_me4_nfs
  100. tasks_from: nfs_volume
  101. when: hostvars['127.0.0.1']['powervault_status']
  102. - name: Mount partitions
  103. include_role:
  104. name: powervault_me4_nfs
  105. tasks_from: mount_me4_partitions
  106. when: hostvars['127.0.0.1']['powervault_status']
  107. - name: Setup NFS server on the partitions
  108. include_role:
  109. name: powervault_me4_nfs
  110. tasks_from: me4_nfs_server_setup
  111. when: hostvars['127.0.0.1']['powervault_status']
  112. - name: Apply NFS server setup on manager node
  113. hosts: manager
  114. gather_facts: false
  115. tasks:
  116. - name: Apply NFS server setup on manager node
  117. include_role:
  118. name: k8s_nfs_server_setup
  119. when: not hostvars['127.0.0.1']['powervault_status']
  120. tags:
  121. - kubernetes
  122. - nfs
  123. - name: Apply NFS client setup on compute nodes
  124. hosts: compute
  125. gather_facts: false
  126. tasks:
  127. - name: Apply NFS client setup on compute nodes
  128. include_role:
  129. name: k8s_nfs_client_setup
  130. when: not hostvars['127.0.0.1']['powervault_status']
  131. tags:
  132. - kubernetes
  133. - nfs
  134. - name: Start K8s on manager server
  135. hosts: manager
  136. gather_facts: true
  137. roles:
  138. - k8s_start_manager
  139. tags: kubernetes
  140. - name: Start K8s worker servers on compute nodes
  141. hosts: compute
  142. gather_facts: false
  143. roles:
  144. - k8s_start_workers
  145. tags: kubernetes
  146. - name: Start K8s worker servers on manager nodes
  147. hosts: manager, compute
  148. gather_facts: false
  149. roles:
  150. - k8s_start_services
  151. tags: kubernetes
  152. - name: Apply common Slurm installation and config
  153. hosts: manager, compute, login_node
  154. gather_facts: false
  155. roles:
  156. - slurm_common
  157. tags: slurm
  158. - name: Apply Slurm manager config
  159. hosts: manager
  160. gather_facts: false
  161. roles:
  162. - slurm_manager
  163. tags: slurm
  164. - name: Configure Slurm workers
  165. hosts: compute, login_node
  166. serial: 1
  167. gather_facts: false
  168. roles:
  169. - slurm_workers
  170. tags: slurm
  171. - name: Start Slurm workers
  172. hosts: compute, login_node
  173. gather_facts: false
  174. roles:
  175. - slurm_workers_service
  176. tags: slurm
  177. - name: Start Slurm services
  178. hosts: manager
  179. gather_facts: false
  180. roles:
  181. - slurm_start_services
  182. tags: slurm
  183. - name: Install slurm exporter
  184. hosts: manager
  185. gather_facts: false
  186. roles:
  187. - slurm_exporter
  188. tags: slurm
  189. - name: Passwordless SSH between manager and compute nodes
  190. include: control_plane/tools/passwordless_ssh.yml
  191. when: hostvars['127.0.0.1']['control_plane_status']