Skip to content

Commit

Permalink
Continuing work for #352 (Removing multiple SNO complexity) + split D…
Browse files Browse the repository at this point in the history
…U Profile into seperate files for easier maintenance (#597)
  • Loading branch information
akrzos authored Feb 6, 2025
1 parent da4e542 commit 676c38b
Show file tree
Hide file tree
Showing 17 changed files with 359 additions and 489 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
}
when:
- item.enabled | default(true) | bool
- not (item.enabled_pao | default(false) | bool)
6 changes: 3 additions & 3 deletions ansible/roles/create-ai-cluster/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- cluster_type == "mno"
loop: "{{ groups['worker'] }}"

- name: Create cluster
- name: Create MNO cluster
uri:
url: "http://{{ assisted_installer_host }}:{{ assisted_installer_port }}/api/assisted-install/v2/clusters"
method: POST
Expand Down Expand Up @@ -149,8 +149,8 @@
- file_name: 50-controlplane-tune-kni-haproxy.yaml
template_name: 50-controlplane-tune-kni-haproxy.yml.j2
enabled: "{{ override_kni_infra_haproxy }}"
- file_name: 99-master-kdump.yml
template_name: 99-master-kdump.yml
- file_name: 06-kdump-master.yaml
template_name: 06-kdump-master.yaml
enabled: "{{ kdump_master_config }}"
- file_name: kubeletconfig-max-pods.yml
template_name: kubeletconfig-max-pods.yml
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/ibmcloud-create-ai-cluster/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
with_items:
- file_name: 99-master-kdump.yml
template_name: 99-master-kdump.yml
- file_name: 06-kdump-master.yaml
template_name: 06-kdump-master.yaml
enabled: "{{ kdump_master_config }}"
- file_name: kubeletconfig-max-pods.yml
template_name: kubeletconfig-max-pods.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
with_items:
- file_name: 06-kdump-master.yaml
template_name: 06-kdump-master.yaml
enabled: "{{ kdump_master_config }}"
- file_name: kubeletconfig-max-pods.yml
template_name: kubeletconfig-max-pods.yml
enabled: "{{ kubelet_config }}"
enabled_pao: "{{ du_profile }}"
- file_name: 99-master-kdump.yml
template_name: 99-master-kdump.yml
enabled: "{{ kdump_master_config }}"
enabled: "{{ kubelet_config and not du_profile }}"
- file_name: 99-master-workload-partitioning.yml
template_name: 99-master-workload-partitioning.yml
enabled: "{{ du_profile }}"
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/install-cluster/tasks/check-cluster-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
return_content: true
register: cluster
failed_when: cluster.json.status == 'error' or cluster.json.status == 'cancelled'
no_log: true

- name: Get cluster hosts
uri:
Expand All @@ -38,6 +39,7 @@
return_content: true
register: get_hosts
when: not cluster.json.status == 'installed'
no_log: true

- name: Dell Fix hosts with incorrect boot order by unmounting virtual media
include_tasks: dell-unmount-virtual-media.yml
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,84 +1,71 @@
- include_role:
---
# Manifests that are included with various versions of the DU Profile

- name: All DU Profiles include these manifests
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
with_items:
- file_name: 50-controlplane-disable-lab-dhcp-interface.yaml
template_name: "50-controlplane-disable-lab-dhcp-interface.yml.j2"
enabled: "{{ public_vlan | bool }}"
- file_name: kubeletconfig-max-pods.yml
template_name: kubeletconfig-max-pods.yml
enabled: "{{ kubelet_config }}"
enabled_pao: "{{ du_profile }}"
- file_name: 06-kdump-master.yaml
template_name: 06-kdump-master.yaml
enabled: "{{ kdump_master_config }}"
- file_name: 01-container-mount-ns-and-kubelet-conf-master.yaml
template_name: 01-container-mount-ns-and-kubelet-conf-master.yaml
enabled: "{{ du_profile }}"
- file_name: 03-sctp-machine-config-master.yaml
template_name: 03-sctp-machine-config-master.yaml
enabled: "{{ du_profile }}"
- file_name: 99-crio-disable-wipe-master.yaml
template_name: 99-crio-disable-wipe-master.yaml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.13 and older
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version is version('4.13', "<=")
when: openshift_version is version('4.13', "<=")
with_items:
- file_name: 99-master-workload-partitioning.yml
template_name: 99-master-workload-partitioning.yml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.12 and older
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version is version('4.12', "<=")
with_items:
- file_name: 04-accelerated-container-startup-master.yaml
template_name: 04-accelerated-container-startup-master.yaml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.14 and 4.15
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version in ["4.14", "4.15"]
with_items:
- file_name: enable-cgroups-v1.yaml
template_name: enable-cgroups-v1.yaml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.14 and newer
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version is version('4.14', ">=")
with_items:
- file_name: 08-set-rcu-normal-master.yaml
template_name: 08-set-rcu-normal-master.yaml
enabled: "{{ du_profile }}"
- file_name: 99-sync-time-once-master.yaml
template_name: 99-sync-time-once-master.yaml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.13 and newer
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version is version('4.13', ">=")
with_items:
- file_name: enable-crun-master.yaml
template_name: enable-crun-master.yaml
enabled: "{{ du_profile }}"

- include_role:
- name: DU Profile manifests for 4.13 and 4.14
include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version in ["4.13", "4.14"]
with_items:
- file_name: 05-kdump-config-master.yaml
template_name: 05-kdump-config-master.yaml
enabled: "{{ kdump_master_config }}"

vars:
ai_cluster_id: "{{ ai_cluster_ids[outer_item].cluster_id }}"
kubelet_config_max_pods_label: "pools.operator.machineconfiguration.openshift.io/master: ''"
Loading

0 comments on commit 676c38b

Please sign in to comment.