From 92902c819bc189a15790e506990fd689a5a8819f Mon Sep 17 00:00:00 2001 From: rblundon Date: Mon, 12 May 2025 14:57:46 -0500 Subject: [PATCH 1/3] update ansible group --- .../templates/agent-config.yaml.j2 | 2 +- .../templates/install-config.yaml.j2 | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/infra-config/10-sno-hub-cluster/03-openshift-image/templates/agent-config.yaml.j2 b/infra-config/10-sno-hub-cluster/03-openshift-image/templates/agent-config.yaml.j2 index c5ae9bd..4171c26 100644 --- a/infra-config/10-sno-hub-cluster/03-openshift-image/templates/agent-config.yaml.j2 +++ b/infra-config/10-sno-hub-cluster/03-openshift-image/templates/agent-config.yaml.j2 @@ -1,7 +1,7 @@ apiVersion: v1alpha1 kind: AgentConfig metadata: - name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }} + name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }} rendezvousIP: {{ hostvars['ocp-hub'].ip_address }} bootArtifactsBaseURL: {{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/hub/ hosts: diff --git a/infra-config/10-sno-hub-cluster/03-openshift-image/templates/install-config.yaml.j2 b/infra-config/10-sno-hub-cluster/03-openshift-image/templates/install-config.yaml.j2 index 528189c..c250cce 100644 --- a/infra-config/10-sno-hub-cluster/03-openshift-image/templates/install-config.yaml.j2 +++ b/infra-config/10-sno-hub-cluster/03-openshift-image/templates/install-config.yaml.j2 @@ -1,25 +1,25 @@ apiVersion: v1 -baseDomain: {{ hostvars[groups['hub-cluster'][0]].base_domain }} +baseDomain: {{ hostvars[groups['hub_cluster'][0]].base_domain }} compute: - name: worker - replicas: {{ hostvars[groups['hub-cluster'][0]].worker_node_count }} + replicas: {{ hostvars[groups['hub_cluster'][0]].worker_node_count }} controlPlane: hyperthreading: Enabled name: master - replicas: {{ hostvars[groups['hub-cluster'][0]].master_node_count }} + replicas: {{ hostvars[groups['hub_cluster'][0]].master_node_count }} metadata: - name: {{ hostvars[groups['hub-cluster'][0]].cluster_name }} + name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }} networking: clusterNetwork: - - cidr: {{ hostvars[groups['hub-cluster'][0]].cluster_network }} - hostPrefix: {{ hostvars[groups['hub-cluster'][0]].cluster_network_host_prefix }} + - cidr: {{ hostvars[groups['hub_cluster'][0]].cluster_network }} + hostPrefix: {{ hostvars[groups['hub_cluster'][0]].cluster_network_host_prefix }} machineNetwork: - - cidr: {{ hostvars[groups['hub-cluster'][0]].machine_network }} + - cidr: {{ hostvars[groups['hub_cluster'][0]].machine_network }} networkType: OVNKubernetes serviceNetwork: - - {{ hostvars[groups['hub-cluster'][0]].service_network }} + - {{ hostvars[groups['hub_cluster'][0]].service_network }} platform: - {{ hostvars[groups['hub-cluster'][0]].platform_type }}: {} + {{ hostvars[groups['hub_cluster'][0]].platform_type }}: {} fips: false pullSecret: '{{ vault_pull_secret }}' sshKey: '{{ vault_ssh_key }}' From 6316dcf32559ee0bde966281df808ad2763bc96a Mon Sep 17 00:00:00 2001 From: rblundon Date: Mon, 12 May 2025 15:22:56 -0500 Subject: [PATCH 2/3] another --- .../10-sno-hub-cluster/03-openshift-image/move-pxe-assets.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra-config/10-sno-hub-cluster/03-openshift-image/move-pxe-assets.yml b/infra-config/10-sno-hub-cluster/03-openshift-image/move-pxe-assets.yml index 6859aa7..81bfb4e 100644 --- a/infra-config/10-sno-hub-cluster/03-openshift-image/move-pxe-assets.yml +++ b/infra-config/10-sno-hub-cluster/03-openshift-image/move-pxe-assets.yml @@ -1,7 +1,7 @@ --- - name: Create a directory if it does not exist ansible.builtin.file: - path: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}" + path: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}" state: directory mode: '0755' become: true @@ -9,7 +9,7 @@ - name: Copy file with owner and permissions ansible.builtin.copy: src: 03-openshift-image/boot-artifacts/ - dest: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/" + dest: "{{ hostvars[groups['matchbox'][0]].assets }}/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/" owner: matchbox group: matchbox mode: '0644' From 988e7d52d345a38515b2b8cbb8b932e4796696e0 Mon Sep 17 00:00:00 2001 From: rblundon Date: Mon, 12 May 2025 15:29:42 -0500 Subject: [PATCH 3/3] more files --- .../10-sno-hub-cluster/04-matchbox/templates/groups.tf.j2 | 2 +- .../04-matchbox/templates/profiles.tf.j2 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infra-config/10-sno-hub-cluster/04-matchbox/templates/groups.tf.j2 b/infra-config/10-sno-hub-cluster/04-matchbox/templates/groups.tf.j2 index 0889314..ae7ef1b 100644 --- a/infra-config/10-sno-hub-cluster/04-matchbox/templates/groups.tf.j2 +++ b/infra-config/10-sno-hub-cluster/04-matchbox/templates/groups.tf.j2 @@ -1,5 +1,5 @@ // Matcher group for OCP Internal machines -resource "matchbox_group" "{{ hostvars[groups['hub-cluster'][0]].cluster_name }}" { +resource "matchbox_group" "{{ hostvars[groups['hub_cluster'][0]].cluster_name }}" { name = "{{ hostvars['ocp-hub'].hostname }}" # Physical Server profile = matchbox_profile.openshift-agent-install.name selector = { diff --git a/infra-config/10-sno-hub-cluster/04-matchbox/templates/profiles.tf.j2 b/infra-config/10-sno-hub-cluster/04-matchbox/templates/profiles.tf.j2 index 2626c08..5e54f8e 100644 --- a/infra-config/10-sno-hub-cluster/04-matchbox/templates/profiles.tf.j2 +++ b/infra-config/10-sno-hub-cluster/04-matchbox/templates/profiles.tf.j2 @@ -1,14 +1,14 @@ // Fedora CoreOS profile resource "matchbox_profile" "openshift-agent-install" { - name = "{{ hostvars[groups['hub-cluster'][0]].cluster_name }}" - kernel = "/assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz" + name = "{{ hostvars[groups['hub_cluster'][0]].cluster_name }}" + kernel = "/assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-vmlinuz" initrd = [ - "--name initrd /assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-initrd.img" + "--name initrd /assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-initrd.img" ] args = [ "initrd=initrd", - "coreos.live.rootfs_url={{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/{{ hostvars[groups['hub-cluster'][0]].cluster_name }}/agent.x86_64-rootfs.img", + "coreos.live.rootfs_url={{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/{{ hostvars[groups['hub_cluster'][0]].cluster_name }}/agent.x86_64-rootfs.img", "rw", "ignition.firstboot", "ignition.platform.id=metal",