main.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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: Download kfctl release from the Kubeflow releases page
  16. unarchive:
  17. src: "{{ kfctl_download_url }}"
  18. dest: "{{ kfctl_download_dest_path }}"
  19. mode: "{{ kfctl_download_file_mode }}"
  20. remote_src: yes
  21. - name: Delete omnia kubeflow directory if exists
  22. file:
  23. path: "{{ omnia_kubeflow_dir_path }}"
  24. state: absent
  25. - name: Create omnia kubeflow directory
  26. file:
  27. path: "{{ omnia_kubeflow_dir_path }}"
  28. state: directory
  29. mode: "{{ omnia_kubeflow_dir_mode }}"
  30. recurse: yes
  31. - name: Build kubeflow configuration
  32. command:
  33. cmd: /usr/bin/kfctl build -V -f "{{ kubeflow_config_yaml_url }}"
  34. chdir: "{{ omnia_kubeflow_dir_path }}"
  35. changed_when: true
  36. - name: Modify CPU limit for istio-ingressgateway-service-account
  37. replace:
  38. path: "{{ istio_noauth_yaml_file_path }}"
  39. after: 'serviceAccountName: istio-ingressgateway-service-account'
  40. before: '---'
  41. regexp: 'cpu: 100m'
  42. replace: 'cpu: 2'
  43. - name: Modify memory limit for istio-ingressgateway-service-account
  44. replace:
  45. path: "{{ istio_noauth_yaml_file_path }}"
  46. after: 'serviceAccountName: istio-ingressgateway-service-account'
  47. before: '---'
  48. regexp: 'memory: 128Mi'
  49. replace: 'memory: 512Mi'
  50. - name: Modify CPU request for istio-ingressgateway-service-account
  51. replace:
  52. path: "{{ istio_noauth_yaml_file_path }}"
  53. after: 'serviceAccountName: istio-ingressgateway-service-account'
  54. before: '---'
  55. regexp: 'cpu: 10m'
  56. replace: 'cpu: 1'
  57. - name: Modify memory request for istio-ingressgateway-service-account
  58. replace:
  59. path: "{{ istio_noauth_yaml_file_path }}"
  60. after: 'serviceAccountName: istio-ingressgateway-service-account'
  61. before: '---'
  62. regexp: 'memory: 40Mi'
  63. replace: 'memory: 256Mi'
  64. - name: Modify memory request for istio-engressgateway-service-account
  65. replace:
  66. path: "{{ istio_noauth_yaml_file_path }}"
  67. after: 'serviceAccountName: istio-egressgateway-service-account'
  68. before: '---'
  69. regexp: 'memory: 128Mi'
  70. replace: 'memory: 256Mi'
  71. - name: Modify memory request for istio-engressgateway-service-account
  72. replace:
  73. path: "{{ istio_noauth_yaml_file_path }}"
  74. after: 'serviceAccountName: istio-egressgateway-service-account'
  75. before: '---'
  76. regexp: 'memory: 40Mi'
  77. replace: 'memory: 128Mi'
  78. - name: Modify CPU limit for kfserving-gateway
  79. replace:
  80. path: "{{ kfserving_gateway_yaml_file_path }}"
  81. after: 'serviceAccountName: istio-ingressgateway-service-account'
  82. before: 'env:'
  83. regexp: 'cpu: 100m'
  84. replace: 'cpu: 2'
  85. - name: Modify memory limit for kfserving-gateway
  86. replace:
  87. path: "{{ kfserving_gateway_yaml_file_path }}"
  88. after: 'serviceAccountName: istio-ingressgateway-service-account'
  89. before: 'env:'
  90. regexp: 'memory: 128Mi'
  91. replace: 'memory: 512Mi'
  92. - name: Modify CPU request for kfserving-gateway
  93. replace:
  94. path: "{{ kfserving_gateway_yaml_file_path }}"
  95. after: 'serviceAccountName: istio-ingressgateway-service-account'
  96. before: 'env:'
  97. regexp: 'cpu: 10m'
  98. replace: 'cpu: 1'
  99. - name: Modify memory request for kfserving-gateway
  100. replace:
  101. path: "{{ kfserving_gateway_yaml_file_path }}"
  102. after: 'serviceAccountName: istio-ingressgateway-service-account'
  103. before: 'env:'
  104. regexp: 'memory: 40Mi'
  105. replace: 'memory: 256Mi'
  106. - name: Change argo base service from NodePort to LoadBalancer
  107. replace:
  108. path: "{{ argo_yaml_file_path }}"
  109. regexp: 'NodePort'
  110. replace: 'LoadBalancer'
  111. - name: Change istio-install base istio-noauth service from NodePort to LoadBalancer
  112. replace:
  113. path: "{{ istio_noauth_yaml_file_path }}"
  114. regexp: 'NodePort'
  115. replace: 'LoadBalancer'
  116. - name: Apply kubeflow configuration
  117. command:
  118. cmd: "/usr/bin/kfctl apply -V -f '{{ kubeflow_config_file }}'"
  119. chdir: "{{ omnia_kubeflow_dir_path }}"
  120. changed_when: true