main.yml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright 2020 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: Wait for CoreDNS to restart
  16. shell: kubectl rollout status deployment/coredns -n kube-system
  17. tags: init
  18. - name: Deploy MetalLB
  19. shell: kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml
  20. tags: init
  21. - name: Create MetalLB Setup Config Files
  22. copy: src=metal-config.yaml dest=/root/k8s/metal-config.yaml owner=root group=root mode=655
  23. tags: init
  24. - name: Create MetalLB Setup Deployment Files
  25. copy: src=metallb.yaml dest=/root/k8s/metallb.yaml owner=root group=root mode=655
  26. tags: init
  27. - name: Deploy MetalLB
  28. shell: kubectl apply -f /root/k8s/metallb.yaml
  29. tags: init
  30. - name: Create default setup for MetalLB
  31. shell: kubectl apply -f /root/k8s/metal-config.yaml
  32. tags: init
  33. - name: Start K8S Dashboard
  34. shell: kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
  35. tags: init
  36. - name: Helm - Add Stable Repo
  37. shell: helm repo add stable https://charts.helm.sh/stable
  38. tags: init
  39. - name: Helm - Add Nvidia k8s-device-plugin (nvdp) Repo
  40. shell: helm repo add nvdp https://nvidia.github.io/k8s-device-plugin
  41. tags: init
  42. - name: Helm - Add Nvidia GPU Discovery (nvgfd) Repo
  43. shell: helm repo add nvgfd https://nvidia.github.io/gpu-feature-discovery
  44. tags: init
  45. - name: Helm - Update Repo
  46. shell: helm repo update
  47. tags: init
  48. - name: Start NFS Client Provisioner
  49. shell: helm install stable/nfs-client-provisioner --set nfs.server={{ nfs_server }} --set nfs.path={{ nfs_path }} --generate-name
  50. tags: init
  51. - name: Set NFS-Client Provisioner as DEFAULT StorageClass
  52. shell: "kubectl patch storageclasses.storage.k8s.io nfs-client -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}'"
  53. tags: init
  54. - name: Prometheus deployment
  55. shell: helm install stable/prometheus --set alertmanager.persistentVolume.storageClass=nfs-client,server.persistentVolume.storageClass=nfs-client,server.service.type=LoadBalancer --generate-name
  56. tags: init
  57. - name: Install MPI Operator
  58. shell: kubectl create -f https://raw.githubusercontent.com/kubeflow/mpi-operator/master/deploy/v1alpha2/mpi-operator.yaml
  59. tags: init
  60. - name: Install nvidia-device-plugin
  61. shell: helm install --version=0.7.0 --generate-name --set migStrategy={{ MIG_STRATEGY }} nvdp/nvidia-device-plugin
  62. tags: init
  63. - name: Install GPU Feature Discovery
  64. shell: helm install --version=0.2.0 --generate-name --set migStrategy={{ MIG_STRATEGY }} nvgfd/gpu-feature-discovery
  65. tags: init
  66. - name: Deploy Xilinx Device Plugin
  67. shell: kubectl create -f https://raw.githubusercontent.com/Xilinx/FPGA_as_a_Service/master/k8s-fpga-device-plugin/fpga-device-plugin.yml
  68. register: fpga_enable
  69. tags: init