omnia.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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: Gather facts from all the nodes
  22. hosts: manager, compute, login_node, nfs_node
  23. - name: Apply common installation and config
  24. hosts: manager, compute, login_node
  25. gather_facts: false
  26. roles:
  27. - common
  28. tags: common
  29. - name: Apply login common installation and config
  30. hosts: manager, login_node
  31. gather_facts: false
  32. roles:
  33. - login_common
  34. tags: freeipa
  35. - name: Apply login server installation and config
  36. hosts: manager
  37. gather_facts: false
  38. roles:
  39. - login_server
  40. tags: freeipa
  41. - name: Apply login node installation and config
  42. hosts: login_node
  43. gather_facts: false
  44. roles:
  45. - login_node
  46. tags: freeipa
  47. - name: Apply common K8s installation and config
  48. hosts: manager, compute
  49. gather_facts: false
  50. roles:
  51. - k8s_common
  52. tags: kubernetes
  53. - name: Apply K8s manager config
  54. hosts: manager
  55. gather_facts: true
  56. roles:
  57. - k8s_manager
  58. tags: kubernetes
  59. - name: Apply K8s firewalld config on manager and compute nodes
  60. hosts: manager, compute
  61. gather_facts: false
  62. roles:
  63. - k8s_firewalld
  64. tags: kubernetes
  65. - name: Powervault Server Configuration
  66. hosts: nfs_node
  67. gather_facts: false
  68. tasks:
  69. - name: Configuring NFS node
  70. include_role:
  71. name: powervault_me4_nfs
  72. when: hostvars['127.0.0.1']['powervault_status']
  73. - name: Map volume
  74. hosts: powervault_me4
  75. connection: local
  76. gather_facts: false
  77. tasks:
  78. - name: Include map volume task
  79. include_tasks: "{{ playbook_dir }}/control_plane/roles/powervault_me4/tasks/ports.yml"
  80. when: hostvars['127.0.0.1']['powervault_status']
  81. - name: Include map volume task
  82. include_tasks: "{{ playbook_dir }}/control_plane/roles/powervault_me4/tasks/map_volume.yml"
  83. when: hostvars['127.0.0.1']['powervault_status']
  84. - name: Apply NFS server setup on NFS node
  85. hosts: nfs_node
  86. gather_facts: false
  87. tasks:
  88. - name: Check the mapped volume on server
  89. include_role:
  90. name: powervault_me4_nfs
  91. tasks_from: nfs_volume
  92. when: hostvars['127.0.0.1']['powervault_status']
  93. - name: Mount partitions
  94. include_role:
  95. name: powervault_me4_nfs
  96. tasks_from: mount_me4_partitions
  97. when: hostvars['127.0.0.1']['powervault_status']
  98. - name: Setup NFS server on the partitions
  99. include_role:
  100. name: powervault_me4_nfs
  101. tasks_from: me4_nfs_server_setup
  102. when: hostvars['127.0.0.1']['powervault_status']
  103. - name: Apply NFS server setup on manager node
  104. hosts: manager
  105. gather_facts: false
  106. tasks:
  107. - name: Apply NFS server setup on manager node
  108. include_role:
  109. name: k8s_nfs_server_setup
  110. when: not hostvars['127.0.0.1']['powervault_status']
  111. tags:
  112. - kubernetes
  113. - nfs
  114. - name: Apply NFS client setup on compute nodes
  115. hosts: compute
  116. gather_facts: false
  117. tasks:
  118. - name: Apply NFS client setup on compute nodes
  119. include_role:
  120. name: k8s_nfs_client_setup
  121. when: not hostvars['127.0.0.1']['powervault_status']
  122. tags:
  123. - kubernetes
  124. - nfs
  125. - name: Start K8s on manager server
  126. hosts: manager
  127. gather_facts: true
  128. roles:
  129. - k8s_start_manager
  130. tags: kubernetes
  131. - name: Start K8s worker servers on compute nodes
  132. hosts: compute
  133. gather_facts: false
  134. roles:
  135. - k8s_start_workers
  136. tags: kubernetes
  137. - name: Start K8s worker servers on manager nodes
  138. hosts: manager, compute
  139. gather_facts: false
  140. roles:
  141. - k8s_start_services
  142. tags: kubernetes
  143. - name: Apply common Slurm installation and config
  144. hosts: manager, compute, login_node
  145. gather_facts: false
  146. roles:
  147. - slurm_common
  148. tags: slurm
  149. - name: Apply Slurm manager config
  150. hosts: manager
  151. gather_facts: false
  152. roles:
  153. - slurm_manager
  154. tags: slurm
  155. - name: Configure Slurm workers
  156. hosts: compute, login_node
  157. serial: 1
  158. gather_facts: false
  159. roles:
  160. - slurm_workers
  161. tags: slurm
  162. - name: Start Slurm workers
  163. hosts: compute, login_node
  164. gather_facts: false
  165. roles:
  166. - slurm_workers_service
  167. tags: slurm
  168. - name: Start Slurm services
  169. hosts: manager
  170. gather_facts: false
  171. roles:
  172. - slurm_start_services
  173. tags: slurm
  174. - name: Install slurm exporter
  175. hosts: manager
  176. gather_facts: false
  177. roles:
  178. - slurm_exporter
  179. tags: slurm
  180. - name: Passwordless SSH between manager and compute nodes
  181. include: control_plane/tools/passwordless_ssh.yml
  182. when: hostvars['127.0.0.1']['control_plane_status']