From 8293c842e600a625dac2ce8fc27f6d3107be17e4 Mon Sep 17 00:00:00 2001 From: rblundon Date: Sat, 26 Jul 2025 21:14:15 -0500 Subject: [PATCH] Created Ansible templates for OpenShift nodes and cluster --- README.md | 28 ++++----- .../03-openshift-image/README.md | 7 --- .../create-openshift-image.yml | 5 -- .../03-openshift-image/move-pxe-assets.yml | 16 ----- .../templates/agent-config.yaml.j2 | 33 ---------- .../templates/install-config.yaml.j2 | 25 -------- .../05-bootstrap-acm/README.md | 0 .../05-bootstrap-acm/install2.yml | 13 ---- infra-config/10-internal-cluster/install.yml | 62 ------------------- infra-config/group_vars/hub_cluster/vars | 52 ++++++++++++++-- infra-config/group_vars/internal_cluster/vars | 57 ++++++++++++++--- .../openshift_cluster_template/vars | 54 ++++++++++++++++ infra-config/host_vars/int-master01/vars | 24 +++++-- infra-config/host_vars/int-master02/vars | 24 +++++-- infra-config/host_vars/int-master03/vars | 24 +++++-- infra-config/host_vars/int-worker02/vars | 24 +++++-- .../host_vars/openshift_node_template/vars | 29 +++++++++ 17 files changed, 273 insertions(+), 204 deletions(-) delete mode 100644 infra-config/10-internal-cluster/03-openshift-image/README.md delete mode 100644 infra-config/10-internal-cluster/03-openshift-image/create-openshift-image.yml delete mode 100644 infra-config/10-internal-cluster/03-openshift-image/move-pxe-assets.yml delete mode 100644 infra-config/10-internal-cluster/03-openshift-image/templates/agent-config.yaml.j2 delete mode 100644 infra-config/10-internal-cluster/03-openshift-image/templates/install-config.yaml.j2 delete mode 100644 infra-config/10-internal-cluster/05-bootstrap-acm/README.md delete mode 100644 infra-config/10-internal-cluster/05-bootstrap-acm/install2.yml delete mode 100644 infra-config/10-internal-cluster/install.yml create mode 100644 infra-config/group_vars/openshift_cluster_template/vars create mode 100644 infra-config/host_vars/openshift_node_template/vars diff --git a/README.md b/README.md index cf86223..70e836a 100644 --- a/README.md +++ b/README.md @@ -20,20 +20,20 @@ This implementation is built on easily accessible consumer based hardware and wi 3. **[Core Services Setup](./docs/03-core-services.md)** *(TBD)* - k0s cluster, DNS, monitoring 4. **[Storage Configuration](./docs/04-storage.md)** *(TBD)* - Synology, democratic-csi -### Phase 2: Container Platform -5. **[Container Registry Setup](./docs/05-container-registry.md)** *(TBD)* - Harbor deployment -6. **[Git Repository Setup](./docs/06-git-repository.md)** *(TBD)* - Gitea/GitLab on Synology -7. **[Artifact Repository](./docs/07-artifact-repository.md)** *(TBD)* - Nexus/Artifactory +### Phase 2: Proxmox Platform +11. **[Proxmox Installation](./docs/11-vsphere-setup.md)** *(TBD)* - Dell 7050 virtualization +12. **[Windows Infrastructure](./docs/12-windows-infrastructure.md)** *(TBD)* - AD, SQL Server +13. **[VM Templates & Automation](./docs/13-vm-automation.md)** *(TBD)* - Template creation ### Phase 3: OpenShift Clusters 8. **[OpenShift Compact Cluster](./docs/08-openshift-compact.md)** *(TBD)* - 3-node production-like 9. **[OpenShift SNO + Worker](./docs/09-openshift-sno.md)** *(TBD)* - Edge computing setup 10. **[ACM Configuration](./docs/10-acm-setup.md)** *(TBD)* - Multi-cluster management -### Phase 4: vSphere Platform -11. **[vSphere Installation](./docs/11-vsphere-setup.md)** *(TBD)* - Dell T640 virtualization -12. **[Windows Infrastructure](./docs/12-windows-infrastructure.md)** *(TBD)* - AD, SQL Server -13. **[VM Templates & Automation](./docs/13-vm-automation.md)** *(TBD)* - Template creation +### Phase 4: Container Platform +5. **[Container Registry Setup](./docs/05-container-registry.md)** *(TBD)* - Harbor deployment +6. **[Git Repository Setup](./docs/06-git-repository.md)** *(TBD)* - Gitea/GitLab on Synology +7. **[Artifact Repository](./docs/07-artifact-repository.md)** *(TBD)* - Nexus/Artifactory ### Phase 5: Advanced Services 14. **[Monitoring & Observability](./docs/14-monitoring.md)** *(TBD)* - Prometheus, Grafana, Splunk @@ -43,7 +43,7 @@ This implementation is built on easily accessible consumer based hardware and wi ## 🚀 Quick Start Deployment ### Prerequisites -- Ubiquiti UDM SE configured +- Ubiquiti UDM Pro configured - Hardware powered and networked - Initial VLAN setup (see [networking plan](./docs/02-networking.md)) @@ -73,17 +73,17 @@ source ~/venv-ansible/bin/activate ## 📁 Repository Structure ``` -homelab-plan/ +homelab/ ├── README.md # This file ├── docs/ # Documentation (numbered by priority) │ ├── 01-overview.md │ ├── 02-networking.md │ └── ... ├── deployment/ # Deployment configurations -│ ├── synology/ # Docker Compose files for Synology -│ ├── k0s/ # k0s cluster manifests -│ ├── openshift/ # OpenShift installation configs -│ └── vsphere/ # vSphere automation +│ ├── synology/ # Docker Compose files for Synology +│ ├── k0s/ # k0s cluster manifests +│ ├── openshift/ # OpenShift installation configs +│ └── proxmox/ # Proxmox automation ├── scripts/ # Automation scripts └── .gitignore # Excludes sensitive data ``` diff --git a/infra-config/10-internal-cluster/03-openshift-image/README.md b/infra-config/10-internal-cluster/03-openshift-image/README.md deleted file mode 100644 index e8786db..0000000 --- a/infra-config/10-internal-cluster/03-openshift-image/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Configure the OpenShift Agent Installer and Matchbox - -## Reference Document - - - -Recap of image creation is in 10-sno-hub-cluster/02-matchbox/.openshift_install.log diff --git a/infra-config/10-internal-cluster/03-openshift-image/create-openshift-image.yml b/infra-config/10-internal-cluster/03-openshift-image/create-openshift-image.yml deleted file mode 100644 index c01c43e..0000000 --- a/infra-config/10-internal-cluster/03-openshift-image/create-openshift-image.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: OpenShift image creation - ansible.builtin.command: /usr/local/bin/openshift-install agent create pxe-files - args: - chdir: 03-openshift-image diff --git a/infra-config/10-internal-cluster/03-openshift-image/move-pxe-assets.yml b/infra-config/10-internal-cluster/03-openshift-image/move-pxe-assets.yml deleted file mode 100644 index 81bfb4e..0000000 --- a/infra-config/10-internal-cluster/03-openshift-image/move-pxe-assets.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- 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 }}" - state: directory - mode: '0755' - become: true - -- 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 }}/" - owner: matchbox - group: matchbox - mode: '0644' - become: true diff --git a/infra-config/10-internal-cluster/03-openshift-image/templates/agent-config.yaml.j2 b/infra-config/10-internal-cluster/03-openshift-image/templates/agent-config.yaml.j2 deleted file mode 100644 index 70ca0e0..0000000 --- a/infra-config/10-internal-cluster/03-openshift-image/templates/agent-config.yaml.j2 +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: v1alpha1 -kind: AgentConfig -metadata: - name: {{ hostvars[groups['hub_cluster'][0]].cluster_name }} -rendezvousIP: {{ hostvars['ocp-hub'].ip_address }} -bootArtifactsBaseURL: {{ hostvars[groups['matchbox'][0]].http_endpoint }}/assets/hub/ -hosts: - - hostname: {{ hostvars['ocp-hub'].hostname }} - role: master - interfaces: - - name: {{ hostvars['ocp-hub'].primary_interface }} - macAddress: {{ hostvars['ocp-hub'].mac_address }} - networkConfig: - interfaces: - - name: {{ hostvars['ocp-hub'].primary_interface }} - type: ethernet - state: up - identifier: mac-address - mac-address: {{ hostvars['ocp-hub'].mac_address }} - ipv4: - enabled: true - dhcp: true - dns-resolver: - config: - server: - - 10.1.71.251 - - 10.1.71.252 - routes: - config: - - destination: 0.0.0.0/0 - next-hop-address: 10.1.71.1 - next-hop-interface: {{ hostvars['ocp-hub'].primary_interface }} - table-id: 254 diff --git a/infra-config/10-internal-cluster/03-openshift-image/templates/install-config.yaml.j2 b/infra-config/10-internal-cluster/03-openshift-image/templates/install-config.yaml.j2 deleted file mode 100644 index c250cce..0000000 --- a/infra-config/10-internal-cluster/03-openshift-image/templates/install-config.yaml.j2 +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -baseDomain: {{ hostvars[groups['hub_cluster'][0]].base_domain }} -compute: -- name: worker - replicas: {{ hostvars[groups['hub_cluster'][0]].worker_node_count }} -controlPlane: - hyperthreading: Enabled - name: master - replicas: {{ hostvars[groups['hub_cluster'][0]].master_node_count }} -metadata: - 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 }} - machineNetwork: - - cidr: {{ hostvars[groups['hub_cluster'][0]].machine_network }} - networkType: OVNKubernetes - serviceNetwork: - - {{ hostvars[groups['hub_cluster'][0]].service_network }} -platform: - {{ hostvars[groups['hub_cluster'][0]].platform_type }}: {} -fips: false -pullSecret: '{{ vault_pull_secret }}' -sshKey: '{{ vault_ssh_key }}' diff --git a/infra-config/10-internal-cluster/05-bootstrap-acm/README.md b/infra-config/10-internal-cluster/05-bootstrap-acm/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/infra-config/10-internal-cluster/05-bootstrap-acm/install2.yml b/infra-config/10-internal-cluster/05-bootstrap-acm/install2.yml deleted file mode 100644 index 53e60b0..0000000 --- a/infra-config/10-internal-cluster/05-bootstrap-acm/install2.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Run all tasks necessary to configure matchbox to install the cluster - hosts: matchbox - connection: local - gather_facts: true - - tasks: - - name: Clone Git repository - ansible.builtin.git: - repo: "https://github.com/redhatryan/acm-hub-bootstrap.git" - dest: 05-bootstrap-acm - version: main - become: true diff --git a/infra-config/10-internal-cluster/install.yml b/infra-config/10-internal-cluster/install.yml deleted file mode 100644 index 1c1a107..0000000 --- a/infra-config/10-internal-cluster/install.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -- name: Run all tasks necessary to configure matchbox to install the cluster - hosts: matchbox - connection: local - gather_facts: true - - tasks: - # - name: Deploy DNS entries for cluster via Terraform - # community.general.terraform: - # project_path: 01-dns/ - # variables: - # freeipa_password: "{{ vault_freeipa_password }}" - # state: present - # force_init: true - - # - name: Deploy DHCP entries for cluster via Terraform - # ansible.builtin.include_tasks: - # file: 02-dhcp/ip-reservations.yml - - # - name: OpenShift Installer install-config.yaml - # ansible.builtin.template: - # src: 03-openshift-image/templates/install-config.yaml.j2 - # dest: 03-openshift-image/install-config.yaml - # mode: '0644' - - # - name: OpenShift Installer agent-config.yaml - # ansible.builtin.template: - # src: 03-openshift-image/templates/agent-config.yaml.j2 - # dest: 03-openshift-image/agent-config.yaml - # mode: '0644' - - # - name: Create OpenShift image - # ansible.builtin.include_tasks: - # file: 03-openshift-image/create-openshift-image.yml - - # - name: Move PXE assets to matchbox - # ansible.builtin.include_tasks: - # file: 03-openshift-image/move-pxe-assets.yml - - # - name: Terraform matchbox groups file - # ansible.builtin.template: - # src: 04-matchbox/templates/groups.tf.j2 - # dest: 04-matchbox/groups.tf - # mode: '0644' - - # - name: Terraform matchbox profiles file - # ansible.builtin.template: - # src: 04-matchbox/templates/profiles.tf.j2 - # dest: 04-matchbox/profiles.tf - # mode: '0644' - - # - name: Terraform matchbox provider file - # ansible.builtin.template: - # src: 04-matchbox/templates/provider.tf.j2 - # dest: 04-matchbox/provider.tf - # mode: '0644' - - # - name: Configure Matchbox via Terraform - # community.general.terraform: - # project_path: 04-matchbox/ - # state: present - # force_init: true diff --git a/infra-config/group_vars/hub_cluster/vars b/infra-config/group_vars/hub_cluster/vars index 2928cfd..b5cb96b 100644 --- a/infra-config/group_vars/hub_cluster/vars +++ b/infra-config/group_vars/hub_cluster/vars @@ -1,10 +1,54 @@ +# file: group_vars/hub_cluster/vars +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker +# Name of the OpenShift Cluster + cluster_name: "hub" + +# Version of OpenShift to install. All available versions can be found at: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/ + cluster_version: "4.17.20" -#base_domain: "int.mk-labs.cloud" -worker_node_count: 0 + +# Type of cluster. +# - none (Single Node Cluster) +# - baremetal (Traditional and Compact Cluster) + +platform_type: "none" + +# Number of nodes to deploy +# - Master: 1; Worker 0 (Single Node Cluster) +# - Master: 3; Worker 0 (Compact Cluster) +# - Master: 3; Worker 1-3 (Traditional Cluster) + master_node_count: 1 +worker_node_count: 0 + +# Subnet that cluster nodes will reside on. + +machine_network: "10.1.71.0/24" + +# OpenShift API IP Address (Comment out for Single Node Cluster) + +# api_address: "10.1.71.10" + +# OpenShift Apps Wildcard IP Address (Comment out for Single Node Cluster) + +# app_address: "10.1.71.10" + +# These are internal networks to the cluster and should not need to be changed. + cluster_network: "10.128.0.0/14" cluster_network_host_prefix: 23 -machine_network: "10.1.71.0/24" service_network: "172.30.0.0/16" -platform_type: "none" + +# Static Variables + +openshift_installer_file: "openshift-install-linux.tar.gz" +openshift_client_file: "openshift-client-linux.tar.gz" +openshift_installer_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_installer_file }}" +openshift_client_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_client_file }}" diff --git a/infra-config/group_vars/internal_cluster/vars b/infra-config/group_vars/internal_cluster/vars index 7e78b31..36d3327 100644 --- a/infra-config/group_vars/internal_cluster/vars +++ b/infra-config/group_vars/internal_cluster/vars @@ -1,15 +1,54 @@ +# file: group_vars/internal_cluster/vars +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker +# Name of the OpenShift Cluster + cluster_name: "openshift" + +# Version of OpenShift to install. All available versions can be found at: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/ + cluster_version: "4.18.21" + +# Type of cluster. +# - none (Single Node Cluster) +# - baremetal (Traditional and Compact Cluster) + +platform_type: "baremetal" + +# Number of nodes to deploy +# - Master: 1; Worker 0 (Single Node Cluster) +# - Master: 3; Worker 0 (Compact Cluster) +# - Master: 3; Worker 1-3 (Traditional Cluster) + +master_node_count: 3 +worker_node_count: 1 + +# Subnet that cluster nodes will reside on. + +machine_network: "10.1.71.0/24" + +# OpenShift API IP Address + +api_address: "10.1.71.69" + +# OpenShift Apps Wildcard IP Address (These will be the same in a Single Node Cluster) + +app_address: "10.1.71.60" + +# These are internal networks to the cluster and should not need to be changed. + +cluster_network: "10.128.0.0/14" +cluster_network_host_prefix: 23 +service_network: "172.30.0.0/16" + +# Static Variables + openshift_installer_file: "openshift-install-linux.tar.gz" openshift_client_file: "openshift-client-linux.tar.gz" openshift_installer_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_installer_file }}" openshift_client_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_client_file }}" -worker_node_count: 1 -master_node_count: 3 -cluster_network: "10.128.0.0/14" -cluster_network_host_prefix: 23 -machine_network: "10.1.71.0/24" -service_network: "172.30.0.0/16" -platform_type: "baremetal" -api_address: "10.1.71.69" -app_address: "10.1.71.60" \ No newline at end of file diff --git a/infra-config/group_vars/openshift_cluster_template/vars b/infra-config/group_vars/openshift_cluster_template/vars new file mode 100644 index 0000000..32fc7ff --- /dev/null +++ b/infra-config/group_vars/openshift_cluster_template/vars @@ -0,0 +1,54 @@ +# file: group_vars/openshift_cluster_template/vars +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker +# Name of the OpenShift Cluster + +cluster_name: "openshift" + +# Version of OpenShift to install. All available versions can be found at: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/ + +cluster_version: "4.18.21" + +# Type of cluster. +# - none (Single Node Cluster) +# - baremetal (Traditional and Compact Cluster) + +platform_type: "baremetal" + +# Number of nodes to deploy +# - Master: 1; Worker 0 (Single Node Cluster) +# - Master: 3; Worker 0 (Compact Cluster) +# - Master: 3; Worker 1-3 (Traditional Cluster) + +master_node_count: 3 +worker_node_count: 1 + +# Subnet that cluster nodes will reside on. + +machine_network: "10.1.71.0/24" + +# OpenShift API IP Address (Comment out for Single Node Cluster) + +api_address: "10.1.71.69" + +# OpenShift Apps Wildcard IP Address (Comment out for Single Node Cluster) + +app_address: "10.1.71.60" + +# These are internal networks to the cluster and should not need to be changed. + +cluster_network: "10.128.0.0/14" +cluster_network_host_prefix: 23 +service_network: "172.30.0.0/16" + +# Static Variables + +openshift_installer_file: "openshift-install-linux.tar.gz" +openshift_client_file: "openshift-client-linux.tar.gz" +openshift_installer_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_installer_file }}" +openshift_client_download_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/{{ cluster_version }}/{{ openshift_client_file }}" diff --git a/infra-config/host_vars/int-master01/vars b/infra-config/host_vars/int-master01/vars index a6c62fa..df7c9f7 100644 --- a/infra-config/host_vars/int-master01/vars +++ b/infra-config/host_vars/int-master01/vars @@ -1,13 +1,29 @@ --- # file: host_vars/int-master01/vars -# OpenShift node +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker + +node_role: "master" + +# IP address assigned to this node on the Primary Interface + +ip_address: 10.1.71.61 + +# Ansible Playbook supports booting node via one interface, but installing on a +# different interface. (Disabling the boot interface on install) All these fields +# are necessary. In the case of a single NIC node, interfaces and MAC addresses +# should be the same. -# Networking boot_interface: "enp0s31f6" boot_mac_address: "54:bf:64:60:52:2d" primary_interface: "enp1s0f0" install_mac_address: "98:b7:85:20:47:22" -ip_address: 10.1.71.61 -node_role: "master" + +# Static Variables hostname: "{{ inventory_hostname }}.{{ base_domain }}" diff --git a/infra-config/host_vars/int-master02/vars b/infra-config/host_vars/int-master02/vars index c3b00c6..bf58d46 100644 --- a/infra-config/host_vars/int-master02/vars +++ b/infra-config/host_vars/int-master02/vars @@ -1,13 +1,29 @@ --- # file: host_vars/int-master02/vars -# OpenShift node +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker + +node_role: "master" + +# IP address assigned to this node on the Primary Interface + +ip_address: 10.1.71.62 + +# Ansible Playbook supports booting node via one interface, but installing on a +# different interface. (Disabling the boot interface on install) All these fields +# are necessary. In the case of a single NIC node, interfaces and MAC addresses +# should be the same. -# Networking boot_interface: "enp0s31f6" boot_mac_address: "54:bf:64:5f:a2:80" primary_interface: "enp1s0f0" install_mac_address: "98:b7:85:20:47:3a" -ip_address: 10.1.71.62 -node_role: "master" + +# --- hostname: "{{ inventory_hostname }}.{{ base_domain }}" diff --git a/infra-config/host_vars/int-master03/vars b/infra-config/host_vars/int-master03/vars index 50578f1..f28dd54 100644 --- a/infra-config/host_vars/int-master03/vars +++ b/infra-config/host_vars/int-master03/vars @@ -1,13 +1,29 @@ --- # file: host_vars/int-master03/vars -# OpenShift node +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker + +node_role: "master" + +# IP address assigned to this node on the Primary Interface + +ip_address: 10.1.71.63 + +# Ansible Playbook supports booting node via one interface, but installing on a +# different interface. (Disabling the boot interface on install) All these fields +# are necessary. In the case of a single NIC node, interfaces and MAC addresses +# should be the same. -# Networking boot_interface: "enp0s31f6" boot_mac_address: "d8:9e:f3:4c:02:a9" primary_interface: "enp1s0f0" install_mac_address: "98:b7:85:1f:89:cf" -ip_address: 10.1.71.63 -node_role: "master" + +# --- hostname: "{{ inventory_hostname }}.{{ base_domain }}" diff --git a/infra-config/host_vars/int-worker02/vars b/infra-config/host_vars/int-worker02/vars index 6f2b544..b99ae22 100644 --- a/infra-config/host_vars/int-worker02/vars +++ b/infra-config/host_vars/int-worker02/vars @@ -1,13 +1,29 @@ --- # file: host_vars/int-worker02/vars -# OpenShift node +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker + +node_role: "worker" + +# IP address assigned to this node on the Primary Interface + +ip_address: 10.1.71.65 + +# Ansible Playbook supports booting node via one interface, but installing on a +# different interface. (Disabling the boot interface on install) All these fields +# are necessary. In the case of a single NIC node, interfaces and MAC addresses +# should be the same. -# Networking boot_interface: "enp87s0" boot_mac_address: "58:47:ca:76:13:49" primary_interface: "enp2s0f0" install_mac_address: "58:47:ca:76:13:47" -ip_address: 10.1.71.65 -node_role: "worker" + +# --- hostname: "{{ inventory_hostname }}.{{ base_domain }}" diff --git a/infra-config/host_vars/openshift_node_template/vars b/infra-config/host_vars/openshift_node_template/vars new file mode 100644 index 0000000..3d0e5c7 --- /dev/null +++ b/infra-config/host_vars/openshift_node_template/vars @@ -0,0 +1,29 @@ +--- +# file: host_vars/openshift_node_template/vars +# Ansible vars template for OpenShift nodes created via Ansible (configure_openshift_cluster). + +# Cluster deployed via Agent Installer and Matchbox (iPXE): + +# Role of this node in the cluster. +# - master +# - worker + +node_role: "master" + +# IP address assigned to this node on the Primary Interface + +ip_address: 10.1.71.61 + +# Ansible Playbook supports booting node via one interface, but installing on a +# different interface. (Disabling the boot interface on install) All these fields +# are necessary. In the case of a single NIC node, interfaces and MAC addresses +# should be the same. + +boot_interface: "enp0s31f6" +boot_mac_address: "54:bf:64:60:52:2d" +primary_interface: "enp1s0f0" +install_mac_address: "98:b7:85:20:47:22" + +# Static Variables + +hostname: "{{ inventory_hostname }}.{{ base_domain }}" # Change variable to fqdn