|
@@ -11,112 +11,123 @@
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
|
-
|
|
|
---
|
|
|
|
|
|
-#Configure build and deploy kubeflow v1.0
|
|
|
-
|
|
|
-- name: Download kfctl v1.0.2 release from the Kubeflow releases page.
|
|
|
+- name: Download kfctl release from the Kubeflow releases page
|
|
|
unarchive:
|
|
|
- src: https://github.com/kubeflow/kfctl/releases/download/v1.0.2/kfctl_v1.0.2-0-ga476281_linux.tar.gz
|
|
|
- dest: /usr/bin/
|
|
|
+ src: "{{ kfctl_download_url }}"
|
|
|
+ dest: "{{ kfctl_download_dest_path }}"
|
|
|
+ mode: "{{ kfctl_download_file_mode }}"
|
|
|
remote_src: yes
|
|
|
|
|
|
-- name: Delete Omnia Kubeflow Directory if exists
|
|
|
+- name: Delete omnia kubeflow directory if exists
|
|
|
file:
|
|
|
- path: /root/k8s/omnia-kubeflow
|
|
|
+ path: "{{ omnia_kubeflow_dir_path }}"
|
|
|
state: absent
|
|
|
|
|
|
-- name: Create Kubeflow Directory
|
|
|
+- name: Create omnia kubeflow directory
|
|
|
file:
|
|
|
- path: /root/k8s/omnia-kubeflow
|
|
|
+ path: "{{ omnia_kubeflow_dir_path }}"
|
|
|
state: directory
|
|
|
+ mode: "{{ omnia_kubeflow_dir_mode }}"
|
|
|
recurse: yes
|
|
|
|
|
|
-- name: Build Kubeflow Configuration
|
|
|
- shell:
|
|
|
- cmd: /usr/bin/kfctl build -V -f https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_k8s_istio.v1.0.2.yaml
|
|
|
- chdir: /root/k8s/omnia-kubeflow
|
|
|
+- name: Build kubeflow configuration
|
|
|
+ command:
|
|
|
+ cmd: /usr/bin/kfctl build -V -f "{{ kubeflow_config_yaml_url }}"
|
|
|
+ chdir: "{{ omnia_kubeflow_dir_path }}"
|
|
|
+ changed_when: true
|
|
|
|
|
|
-- name: Modify Cpu Limit for istio-ingressgateway-service-account
|
|
|
+- name: Modify CPU limit for istio-ingressgateway-service-account
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
|
|
|
+ path: "{{ istio_noauth_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: '---'
|
|
|
regexp: 'cpu: 100m'
|
|
|
replace: 'cpu: 2'
|
|
|
|
|
|
-- name: Modify Mem Limit for istio-ingressgateway-service-account
|
|
|
+- name: Modify memory limit for istio-ingressgateway-service-account
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
|
|
|
+ path: "{{ istio_noauth_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: '---'
|
|
|
regexp: 'memory: 128Mi'
|
|
|
replace: 'memory: 512Mi'
|
|
|
|
|
|
-- name: Modify Cpu Request for istio-ingressgateway-service-account
|
|
|
+- name: Modify CPU request for istio-ingressgateway-service-account
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
|
|
|
+ path: "{{ istio_noauth_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: '---'
|
|
|
regexp: 'cpu: 10m'
|
|
|
replace: 'cpu: 1'
|
|
|
|
|
|
-- name: Modify Mem Request for istio-ingressgateway-service-account
|
|
|
+- name: Modify memory request for istio-ingressgateway-service-account
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
|
|
|
+ path: "{{ istio_noauth_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: '---'
|
|
|
regexp: 'memory: 40Mi'
|
|
|
replace: 'memory: 256Mi'
|
|
|
|
|
|
-
|
|
|
-- name: Modify Cpu Limit for kfserving-gateway
|
|
|
+- name: Modify CPU limit for kfserving-gateway
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
|
|
|
+ path: "{{ kfserving_gateway_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: 'env:'
|
|
|
regexp: 'cpu: 100m'
|
|
|
replace: 'cpu: 2'
|
|
|
|
|
|
-- name: Modify Mem Limit for kfserving-gateway
|
|
|
+- name: Modify memory limit for kfserving-gateway
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
|
|
|
+ path: "{{ kfserving_gateway_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: 'env:'
|
|
|
regexp: 'memory: 128Mi'
|
|
|
replace: 'memory: 512Mi'
|
|
|
|
|
|
-- name: Modify Cpu Request for kfserving-gateway
|
|
|
+- name: Modify CPU request for kfserving-gateway
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
|
|
|
+ path: "{{ kfserving_gateway_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: 'env:'
|
|
|
regexp: 'cpu: 10m'
|
|
|
replace: 'cpu: 1'
|
|
|
|
|
|
-- name: Modify Mem Request for kfserving-gateway
|
|
|
+- name: Modify memory request for kfserving-gateway
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/kfserving-gateway/base/deployment.yaml
|
|
|
+ path: "{{ kfserving_gateway_yaml_file_path }}"
|
|
|
after: 'serviceAccountName: istio-ingressgateway-service-account'
|
|
|
before: 'env:'
|
|
|
regexp: 'memory: 40Mi'
|
|
|
replace: 'memory: 256Mi'
|
|
|
|
|
|
-
|
|
|
-- name: Change Argo base service from NodePort to LoadBalancer
|
|
|
+- name: Change argo base service from NodePort to LoadBalancer
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/argo/base/service.yaml
|
|
|
+ path: "{{ argo_yaml_file_path }}"
|
|
|
regexp: 'NodePort'
|
|
|
replace: 'LoadBalancer'
|
|
|
|
|
|
- name: Change istio-install base istio-noauth service from NodePort to LoadBalancer
|
|
|
replace:
|
|
|
- path: /root/k8s/omnia-kubeflow/kustomize/istio-install/base/istio-noauth.yaml
|
|
|
+ path: "{{ istio_noauth_yaml_file_path }}"
|
|
|
regexp: 'NodePort'
|
|
|
replace: 'LoadBalancer'
|
|
|
|
|
|
-- name: Apply Kubeflow Configuration
|
|
|
- shell:
|
|
|
- cmd: /usr/bin/kfctl apply -V -f /root/k8s/omnia-kubeflow/kfctl_k8s_istio.v1.0.2.yaml
|
|
|
- chdir: /root/k8s/omnia-kubeflow
|
|
|
+- name: Remove cert-manager application block
|
|
|
+ replace:
|
|
|
+ path: "{{ kubeflow_config_file }}"
|
|
|
+ regexp: "{{ cert_manager_block }}"
|
|
|
+ replace: "\n"
|
|
|
+
|
|
|
+- name: Remove seldon-core-operator application block
|
|
|
+ replace:
|
|
|
+ path: "{{ kubeflow_config_file }}"
|
|
|
+ regexp: "{{ seldon_core_operator_block }}"
|
|
|
+ replace: "\n"
|
|
|
+
|
|
|
+- name: Apply kubeflow configuration
|
|
|
+ command:
|
|
|
+ cmd: "/usr/bin/kfctl apply -V -f '{{ kubeflow_config_file }}'"
|
|
|
+ chdir: "{{ omnia_kubeflow_dir_path }}"
|
|
|
+ changed_when: true
|