main.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. #Configure build and deploy kubeflow v1.0
  16. - name: Download kfctl v1.0.2 release from the Kubeflow releases page.
  17. unarchive:
  18. src: https://github.com/kubeflow/kfctl/releases/download/v1.0.2/kfctl_v1.0.2-0-ga476281_linux.tar.gz
  19. dest: /usr/bin/
  20. remote_src: yes
  21. - name: Delete Omnia Kubeflow Directory if exists
  22. file:
  23. path: /root/k8s/omnia-kubeflow
  24. state: absent
  25. - name: Create Kubeflow Directory
  26. file:
  27. path: /root/k8s/omnia-kubeflow
  28. state: directory
  29. recurse: yes
  30. - name: Build Kubeflow Configuration
  31. shell:
  32. cmd: /usr/bin/kfctl build -V -f https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_k8s_istio.v1.0.2.yaml
  33. chdir: /root/k8s/omnia-kubeflow
  34. - name: Modify Cpu Limit for istio-ingressgateway-service-account
  35. replace:
  36. path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
  37. after: 'serviceAccountName: istio-ingressgateway-service-account'
  38. before: '---'
  39. regexp: 'cpu: 100m'
  40. replace: 'cpu: 2'
  41. - name: Modify Mem Limit for istio-ingressgateway-service-account
  42. replace:
  43. path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
  44. after: 'serviceAccountName: istio-ingressgateway-service-account'
  45. before: '---'
  46. regexp: 'memory: 128Mi'
  47. replace: 'memory: 512Mi'
  48. - name: Modify Cpu Request for istio-ingressgateway-service-account
  49. replace:
  50. path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
  51. after: 'serviceAccountName: istio-ingressgateway-service-account'
  52. before: '---'
  53. regexp: 'cpu: 10m'
  54. replace: 'cpu: 1'
  55. - name: Modify Mem Request for istio-ingressgateway-service-account
  56. replace:
  57. path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
  58. after: 'serviceAccountName: istio-ingressgateway-service-account'
  59. before: '---'
  60. regexp: 'memory: 40Mi'
  61. replace: 'memory: 256Mi'
  62. - name: Modify Cpu Limit for kfserving-gateway
  63. replace:
  64. path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
  65. after: 'serviceAccountName: istio-ingressgateway-service-account'
  66. before: 'env:'
  67. regexp: 'cpu: 100m'
  68. replace: 'cpu: 2'
  69. - name: Modify Mem Limit for kfserving-gateway
  70. replace:
  71. path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
  72. after: 'serviceAccountName: istio-ingressgateway-service-account'
  73. before: 'env:'
  74. regexp: 'memory: 128Mi'
  75. replace: 'memory: 512Mi'
  76. - name: Modify Cpu Request for kfserving-gateway
  77. replace:
  78. path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
  79. after: 'serviceAccountName: istio-ingressgateway-service-account'
  80. before: 'env:'
  81. regexp: 'cpu: 10m'
  82. replace: 'cpu: 1'
  83. - name: Modify Mem Request for kfserving-gateway
  84. replace:
  85. path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
  86. after: 'serviceAccountName: istio-ingressgateway-service-account'
  87. before: 'env:'
  88. regexp: 'memory: 40Mi'
  89. replace: 'memory: 256Mi'
  90. - name: Change Argo base service from NodePort to LoadBalancer
  91. replace:
  92. path: /root/k8s/omnia-kubeflow/kustomize/argo/base/service.yaml
  93. regexp: 'NodePort'
  94. replace: 'LoadBalancer'
  95. - name: Change istio-install base istio-noauth service from NodePort to LoadBalancer
  96. replace:
  97. path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
  98. regexp: 'NodePort'
  99. replace: 'LoadBalancer'
  100. - name: Apply Kubeflow Configuration
  101. shell:
  102. cmd: /usr/bin/kfctl apply -V -f /root/k8s/omnia-kubeflow/kfctl_k8s_istio.v1.0.2.yaml
  103. chdir: /root/k8s/omnia-kubeflow