From 6e1c79532850bfec2e1ed6cc80a6f11f8f39c808 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 19:38:21 -0600 Subject: [PATCH 1/7] Disable currently unused services The following services are not currently used and have no buisness being deployed at this point. In the future we expect that we'll re-enable them when they're needed. Signed-off-by: Kevin Carter --- openstack-flex/group_vars/k8s_cluster/addons.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack-flex/group_vars/k8s_cluster/addons.yml b/openstack-flex/group_vars/k8s_cluster/addons.yml index 5d5d54fa4..9f953495d 100644 --- a/openstack-flex/group_vars/k8s_cluster/addons.yml +++ b/openstack-flex/group_vars/k8s_cluster/addons.yml @@ -233,7 +233,7 @@ metallb_config: # address_pool: # - pool2 -argocd_enabled: true +argocd_enabled: false # argocd_version: v2.8.4 argocd_namespace: argocd # Default password: @@ -247,7 +247,7 @@ argocd_namespace: argocd # argocd_admin_password: "password" # The plugin manager for kubectl -krew_enabled: true +krew_enabled: false krew_root_dir: "/usr/local/krew" # Kube VIP From 0fa7bd6c445a7681a48eaa5c74c67a0d8b20de72 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 19:40:00 -0600 Subject: [PATCH 2/7] Update the small lab refernce with examples This change updates the small lab environment reference so that we can see a more relevant example for a POC type deployment. Signed-off-by: Kevin Carter --- .../small-lab-inventory-example.yaml | 138 +++++++++++++++--- playbooks/inventory-example.yaml | 19 --- 2 files changed, 115 insertions(+), 42 deletions(-) delete mode 100644 playbooks/inventory-example.yaml diff --git a/openstack-flex/small-lab-inventory-example.yaml b/openstack-flex/small-lab-inventory-example.yaml index e869287b1..a91d1a55e 100644 --- a/openstack-flex/small-lab-inventory-example.yaml +++ b/openstack-flex/small-lab-inventory-example.yaml @@ -1,38 +1,130 @@ +# | etcd-24021 | 5893591-ENV94580-API-MGMT=10.74.8.114 | +# | etcd-25534 | 5893591-ENV94580-API-MGMT=10.74.8.106 | +# | etcd-26513 | 5893591-ENV94580-API-MGMT=10.74.8.107 | +# | ceph-32762 | 5893591-ENV94580-API-MGMT=10.74.8.090 | +# | ceph-3248 | 5893591-ENV94580-API-MGMT=10.74.8.091 | +# | ceph-6904 | 5893591-ENV94580-API-MGMT=10.74.8.092 | +# | k8s-32762 | 5893591-ENV94580-API-MGMT=10.74.8.093 | +# | k8s-3248 | 5893591-ENV94580-API-MGMT=10.74.8.105 | +# | k8s-6904 | 5893591-ENV94580-API-MGMT=10.74.8.122 | +# | controller-19391 | 5893591-ENV94580-API-MGMT=10.74.8.124 | +# | controller-1499 | 5893591-ENV94580-API-MGMT=10.74.8.103 | +# | controller-12462 | 5893591-ENV94580-API-MGMT=10.74.8.104 | +# | compute-12481 | 5893591-ENV94580-API-MGMT=10.74.8.108 | +# | compute-12562 | 5893591-ENV94580-API-MGMT=10.74.8.109 | +# | compute-13461 | 5893591-ENV94580-API-MGMT=10.74.8.110 | +# | storage-12481 | 5893591-ENV94580-API-MGMT=10.74.8.111 | +# | storage-12562 | 5893591-ENV94580-API-MGMT=10.74.8.112 | +# | storage-13461 | 5893591-ENV94580-API-MGMT=10.74.8.113 | +# | network-12481 | 5893591-ENV94580-API-MGMT=10.74.8.114 | +# | network-12562 | 5893591-ENV94580-API-MGMT=10.74.8.115 | +# | network-13461 | 5893591-ENV94580-API-MGMT=10.74.8.116 | all: hosts: - controller-0.cloud.rackerlabs.dev.local: - ansible_host: 172.16.27.68 - compute-0.cloud.rackerlabs.dev.local: - ansible_host: 172.16.27.67 + etcd-24021.rackerlabs.dev.local: + ansible_host: 10.74.8.114 + etcd-25534.rackerlabs.dev.local: + ansible_host: 10.74.8.106 + etcd-26513.rackerlabs.dev.local: + ansible_host: 10.74.8.107 + ceph-32762.rackerlabs.dev.local: + ansible_host: 10.74.8.090 + ceph-3248.rackerlabs.dev.local: + ansible_host: 10.74.8.091 + ceph-6904.rackerlabs.dev.local: + ansible_host: 10.74.8.092 + k8s-32762.rackerlabs.dev.local: + ansible_host: 10.74.8.093 + k8s-3248.rackerlabs.dev.local: + ansible_host: 10.74.8.105 + k8s-6904.rackerlabs.dev.local: + ansible_host: 10.74.8.122 + controller-19391.rackerlabs.dev.local: + ansible_host: 10.74.8.124 + controller-1499.rackerlabs.dev.local: + ansible_host: 10.74.8.103 + controller-12462.rackerlabs.dev.local: + ansible_host: 10.74.8.104 + compute-12481.rackerlabs.dev.local: + ansible_host: 10.74.8.108 + compute-12562.rackerlabs.dev.local: + ansible_host: 10.74.8.109 + compute-13461.rackerlabs.dev.local: + ansible_host: 10.74.8.110 + storage-12481.rackerlabs.dev.local: + ansible_host: 10.74.8.111 + storage-12562.rackerlabs.dev.local: + ansible_host: 10.74.8.112 + storage-13461.rackerlabs.dev.local: + ansible_host: 10.74.8.113 + network-12481.rackerlabs.dev.local: + ansible_host: 10.74.8.114 + network-12562.rackerlabs.dev.local: + ansible_host: 10.74.8.115 + network-13461.rackerlabs.dev.local: + ansible_host: 10.74.8.116 children: k8s_cluster: vars: - cluster_name: rackerlabs.dev.local - kube_ovn_iface: bond0 - kube_ovn_default_interface_name: bond0 + cluster_name: rackerlabs.dev.local # This clustername should be changed to match your environment domain name. + kube_ovn_iface: vlan206 # see the netplan snippet in etc/netplan/default-DHCP.yaml for more info. + kube_ovn_default_interface_name: vlan206 # see the netplan snippet in etc/netplan/default-DHCP.yaml for more info. kube_ovn_central_hosts: "{{ groups['ovn_network_nodes'] }}" children: - kube_control_plane: + kube_control_plane: # all k8s control plane nodes need to be in this group hosts: - controller-0.cloud.rackerlabs.dev.local: null - etcd: + k8s-3248.rackerlabs.dev.local: null + k8s-32762.rackerlabs.dev.local: null + k8s-6904.rackerlabs.dev.local: null + etcd: # all etcd nodes need to be in this group hosts: - controller-0.cloud.rackerlabs.dev.local: null - kube_node: + etcd-24021.rackerlabs.dev.local: null + etcd-25534.rackerlabs.dev.local: null + etcd-26513.rackerlabs.dev.local: null + kube_node: # all k8s enabled nodes need to be in this group hosts: - controller-0.cloud.rackerlabs.dev.local: null - compute-0.cloud.rackerlabs.dev.local: null - ovn_network_nodes: + k8s-3248.rackerlabs.dev.local: null + k8s-32762.rackerlabs.dev.local: null + k8s-6904.rackerlabs.dev.local: null + ceph-6904.rackerlabs.dev.local: null + ceph-3248.rackerlabs.dev.local: null + ceph-32762.rackerlabs.dev.local: null + controller-19391.rackerlabs.dev.local: null + controller-1499.rackerlabs.dev.local: null + controller-12462.rackerlabs.dev.local: null + network-12481.rackerlabs.dev.local: null + network-12562.rackerlabs.dev.local: null + network-13461.rackerlabs.dev.local: null + storage-12481.rackerlabs.dev.local: null + storage-12562.rackerlabs.dev.local: null + storage-13461.rackerlabs.dev.local: null + compute-13461.rackerlabs.dev.local: null + compute-12562.rackerlabs.dev.local: null + compute-12481.rackerlabs.dev.local: null + openstack_control_plane: # nodes used for nova compute labeled as openstack-control-plane=enabled hosts: - controller-0.cloud.rackerlabs.dev.local: null - compute-0.cloud.rackerlabs.dev.local: null + controller-19391.rackerlabs.dev.local: null + controller-1499.rackerlabs.dev.local: null + controller-12462.rackerlabs.dev.local: null + ovn_network_nodes: # nodes used for nova compute labeled as openstack-network-node=enabled + hosts: + network-12481.rackerlabs.dev.local: null + network-12562.rackerlabs.dev.local: null + network-13461.rackerlabs.dev.local: null storage_nodes: children: - ceph_storage_nodes: - hosts: {} - cinder_storage_nodes: + ceph_storage_nodes: # nodes used for ceph storage labeled as role=storage-node + hosts: + ceph-6904.rackerlabs.dev.local: null + ceph-3248.rackerlabs.dev.local: null + ceph-32762.rackerlabs.dev.local: null + cinder_storage_nodes: # nodes used for cinder storage labeled as openstack-storage-node=enabled hosts: - compute-0.cloud.rackerlabs.dev.local: null - nova_compute_nodes: + storage-12481.rackerlabs.dev.local: null + storage-12562.rackerlabs.dev.local: null + storage-13461.rackerlabs.dev.local: null + nova_compute_nodes: # nodes used for nova compute labeled as openstack-compute-node=enabled hosts: - compute-0.cloud.rackerlabs.dev.local: null + compute-13461.rackerlabs.dev.local: null + compute-12562.rackerlabs.dev.local: null + compute-12481.rackerlabs.dev.local: null diff --git a/playbooks/inventory-example.yaml b/playbooks/inventory-example.yaml deleted file mode 100644 index 6af64e9f0..000000000 --- a/playbooks/inventory-example.yaml +++ /dev/null @@ -1,19 +0,0 @@ -all: - hosts: - openstack-flex-node-0.cluster.local: - ansible_host: 172.31.0.11 - openstack-flex-node-4.cluster.local: - ansible_host: 172.31.0.5 - - vars: - ansible_ssh_common_args: '-F /Users/kevin.carter/.ssh/openstack-flex-keypair.config' - - children: - kube_control_plane: - hosts: - openstack-flex-node-0.cluster.local: null - storage_nodes: - children: - cinder_storage_nodes: - hosts: - openstack-flex-node-4.cluster.local: null From 98e1b58b029fa1ca5525822c3ebc5b6e4bbde184 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 20:08:38 -0600 Subject: [PATCH 3/7] Add example netplan file This example file can be used as a refernce when defining networks for a target host machine which happens to have netplan deployed. Signed-off-by: Kevin Carter --- etc/netplan/default-DHCP.yaml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 etc/netplan/default-DHCP.yaml diff --git a/etc/netplan/default-DHCP.yaml b/etc/netplan/default-DHCP.yaml new file mode 100644 index 000000000..cdde66d87 --- /dev/null +++ b/etc/netplan/default-DHCP.yaml @@ -0,0 +1,52 @@ +--- +network: + version: 2 + ethernets: + enp143s0f0: + set-name: enp143s0f0 + enp143s0f1: + set-name: enp143s0f1 + enp196s0f0: + set-name: enp196s0f0 + enp196s0f1: + set-name: enp196s0f1 + bonds: + bond0: + dhcp4: true + interfaces: + - enp143s0f0 # A side + - enp196s0f0 # B side + parameters: + lacp-rate: fast + mii-monitor-interval: 100 + mode: 802.3ad + bond1: + interfaces: + - enp143s0f1 # A side + - enp196s0f1 # B side + parameters: + lacp-rate: fast + mii-monitor-interval: 100 + mode: 802.3ad + vlans: + vlan206: # this is the interface that will be given to K8S via bond0. + accept-ra: false + addresses: + - 172.16.24.1/22 # Statically assigned IP address + id: 206 + link: bond0 + mtu: 1500 + vlan306: # this is the interface that will be given to Controllers via bond0. + accept-ra: false + addresses: + - 172.18.24.1/22 # Statically assigned IP address + id: 206 + link: bond0 + mtu: 1500 + vlan406: # this is the interface that will be given to Computes via bond0. + accept-ra: false + addresses: + - 172.20.24.1/22 # Statically assigned IP address + id: 206 + link: bond0 + mtu: 1500 From 0c6d8936a828093e00085ed0da728cf877c4c223 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 20:16:10 -0600 Subject: [PATCH 4/7] Add more comments to the small lab inventory example file The comments added to this inventory file should help folks more easily understand how machines are used within the cloud environment. Signed-off-by: Kevin Carter --- openstack-flex/small-lab-inventory-example.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openstack-flex/small-lab-inventory-example.yaml b/openstack-flex/small-lab-inventory-example.yaml index a91d1a55e..5f76e6ec7 100644 --- a/openstack-flex/small-lab-inventory-example.yaml +++ b/openstack-flex/small-lab-inventory-example.yaml @@ -1,3 +1,7 @@ +# Inventory file for a small lab environment +# +# This output was generated by Ironic. +# # | etcd-24021 | 5893591-ENV94580-API-MGMT=10.74.8.114 | # | etcd-25534 | 5893591-ENV94580-API-MGMT=10.74.8.106 | # | etcd-26513 | 5893591-ENV94580-API-MGMT=10.74.8.107 | @@ -19,6 +23,11 @@ # | network-12481 | 5893591-ENV94580-API-MGMT=10.74.8.114 | # | network-12562 | 5893591-ENV94580-API-MGMT=10.74.8.115 | # | network-13461 | 5893591-ENV94580-API-MGMT=10.74.8.116 | +# +# This file is used by the ansible-playbook command to deploy Kubernetes via Kubespray. +# using the group_vars found within the openstack-flex directory. The resulting +# environment is used to manage OpenStack services within a Genestack cloud. +# all: hosts: etcd-24021.rackerlabs.dev.local: From 530125a146fd56904188993b84e5e72e1a7c61fc Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 20:22:29 -0600 Subject: [PATCH 5/7] Collapse the inventory example files This change updates the inventory example files to just one. Having the one example more clearly shows how things are running and should help eliminate confusion. Signed-off-by: Kevin Carter --- ...ry-example.yaml => inventory-example.yaml} | 0 openstack-flex/prod-inventory-example.yaml | 107 ------------------ playbooks/inventory-example.yaml | 1 + 3 files changed, 1 insertion(+), 107 deletions(-) rename openstack-flex/{small-lab-inventory-example.yaml => inventory-example.yaml} (100%) delete mode 100644 openstack-flex/prod-inventory-example.yaml create mode 120000 playbooks/inventory-example.yaml diff --git a/openstack-flex/small-lab-inventory-example.yaml b/openstack-flex/inventory-example.yaml similarity index 100% rename from openstack-flex/small-lab-inventory-example.yaml rename to openstack-flex/inventory-example.yaml diff --git a/openstack-flex/prod-inventory-example.yaml b/openstack-flex/prod-inventory-example.yaml deleted file mode 100644 index 80843ac7a..000000000 --- a/openstack-flex/prod-inventory-example.yaml +++ /dev/null @@ -1,107 +0,0 @@ -all: - hosts: - 935830-utility01-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.15 - 935820-compute01-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.121 - 935821-compute02-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.122 - 935822-compute03-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.123 - 935823-compute04-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.124 - 935824-compute05-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.125 - 935825-compute06-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.126 - 935826-compute07-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.127 - 935827-compute08-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.128 - 935811-controller01-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.101 - 935812-controller02-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.102 - 935813-controller03-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.103 - # 935828-network01-ospcv2-dfw.openstack.local: - # ansible_host: 172.28.236.111 - 935829-network02-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.112 - 935819-network03-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.113 - 935814-storage01-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.161 - 935815-storage02-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.162 - 935816-storage03-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.163 - 935817-storage04-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.164 - 935818-storage05-ospcv2-dfw.openstack.local: - ansible_host: 172.28.232.165 - children: - k8s_cluster: - vars: - cluster_name: openstack.local - kube_ovn_iface: br-host - kube_ovn_default_interface_name: br-host - kube_ovn_central_hosts: "{{ groups['ovn_network_nodes'] }}" - children: - kube_control_plane: - hosts: - 935811-controller01-ospcv2-dfw.openstack.local: null - 935812-controller02-ospcv2-dfw.openstack.local: null - 935813-controller03-ospcv2-dfw.openstack.local: null - etcd: - hosts: - 935811-controller01-ospcv2-dfw.openstack.local: null - 935812-controller02-ospcv2-dfw.openstack.local: null - 935813-controller03-ospcv2-dfw.openstack.local: null - kube_node: - hosts: - 935811-controller01-ospcv2-dfw.openstack.local: null - 935812-controller02-ospcv2-dfw.openstack.local: null - 935813-controller03-ospcv2-dfw.openstack.local: null - 935820-compute01-ospcv2-dfw.openstack.local: null - 935821-compute02-ospcv2-dfw.openstack.local: null - 935822-compute03-ospcv2-dfw.openstack.local: null - 935823-compute04-ospcv2-dfw.openstack.local: null - 935824-compute05-ospcv2-dfw.openstack.local: null - 935825-compute06-ospcv2-dfw.openstack.local: null - 935826-compute07-ospcv2-dfw.openstack.local: null - 935827-compute08-ospcv2-dfw.openstack.local: null - # 935828-network01-ospcv2-dfw.openstack.local: null - 935829-network02-ospcv2-dfw.openstack.local: null - 935819-network03-ospcv2-dfw.openstack.local: null - 935814-storage01-ospcv2-dfw.openstack.local: null - 935815-storage02-ospcv2-dfw.openstack.local: null - 935816-storage03-ospcv2-dfw.openstack.local: null - 935817-storage04-ospcv2-dfw.openstack.local: null - 935818-storage05-ospcv2-dfw.openstack.local: null - ovn_network_nodes: - hosts: - # 935828-network01-ospcv2-dfw.openstack.local: null - 935829-network02-ospcv2-dfw.openstack.local: null - 935819-network03-ospcv2-dfw.openstack.local: null - storage_nodes: - children: - ceph_storage_nodes: - hosts: - 935814-storage01-ospcv2-dfw.openstack.local: null - 935815-storage02-ospcv2-dfw.openstack.local: null - 935816-storage03-ospcv2-dfw.openstack.local: null - cinder_storage_nodes: - hosts: - 935817-storage04-ospcv2-dfw.openstack.local: null - 935818-storage05-ospcv2-dfw.openstack.local: null - nova_compute_nodes: - hosts: - 935820-compute01-ospcv2-dfw.openstack.local: null - 935821-compute02-ospcv2-dfw.openstack.local: null - 935822-compute03-ospcv2-dfw.openstack.local: null - 935823-compute04-ospcv2-dfw.openstack.local: null - 935824-compute05-ospcv2-dfw.openstack.local: null - 935825-compute06-ospcv2-dfw.openstack.local: null - 935826-compute07-ospcv2-dfw.openstack.local: null - 935827-compute08-ospcv2-dfw.openstack.local: null diff --git a/playbooks/inventory-example.yaml b/playbooks/inventory-example.yaml new file mode 120000 index 000000000..19cda957e --- /dev/null +++ b/playbooks/inventory-example.yaml @@ -0,0 +1 @@ +../openstack-flex/inventory-example.yaml \ No newline at end of file From 60371483ac1a6387ab6e159ad368875c949dcd9a Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 20:24:45 -0600 Subject: [PATCH 6/7] Update default-DHCP.yaml Fix the reference VLAN ID. --- etc/netplan/default-DHCP.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/netplan/default-DHCP.yaml b/etc/netplan/default-DHCP.yaml index cdde66d87..ec73cb69b 100644 --- a/etc/netplan/default-DHCP.yaml +++ b/etc/netplan/default-DHCP.yaml @@ -40,13 +40,13 @@ network: accept-ra: false addresses: - 172.18.24.1/22 # Statically assigned IP address - id: 206 + id: 306 link: bond0 mtu: 1500 vlan406: # this is the interface that will be given to Computes via bond0. accept-ra: false addresses: - 172.20.24.1/22 # Statically assigned IP address - id: 206 + id: 406 link: bond0 mtu: 1500 From c7da564b116e18f00dda0644d600c2007d32bea1 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Jan 2024 20:26:53 -0600 Subject: [PATCH 7/7] Update default-DHCP.yaml Add more comments to the example file --- etc/netplan/default-DHCP.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/netplan/default-DHCP.yaml b/etc/netplan/default-DHCP.yaml index ec73cb69b..2c9e5e52d 100644 --- a/etc/netplan/default-DHCP.yaml +++ b/etc/netplan/default-DHCP.yaml @@ -12,7 +12,7 @@ network: set-name: enp196s0f1 bonds: bond0: - dhcp4: true + dhcp4: true # Using DHCP for this example but not required interfaces: - enp143s0f0 # A side - enp196s0f0 # B side @@ -29,24 +29,24 @@ network: mii-monitor-interval: 100 mode: 802.3ad vlans: - vlan206: # this is the interface that will be given to K8S via bond0. + vlan206: # this is the interface that will be given to K8S via bond0 accept-ra: false addresses: - - 172.16.24.1/22 # Statically assigned IP address + - 172.16.24.1/22 # Statically assigned IP address, increment on every node id: 206 link: bond0 mtu: 1500 - vlan306: # this is the interface that will be given to Controllers via bond0. + vlan306: # this is the interface that will be given to Controllers via bond0 accept-ra: false addresses: - - 172.18.24.1/22 # Statically assigned IP address + - 172.18.24.1/22 # Statically assigned IP address, increment on every node id: 306 link: bond0 mtu: 1500 - vlan406: # this is the interface that will be given to Computes via bond0. + vlan406: # this is the interface that will be given to Computes via bond0 accept-ra: false addresses: - - 172.20.24.1/22 # Statically assigned IP address + - 172.20.24.1/22 # Statically assigned IP address, increment on every node id: 406 link: bond0 mtu: 1500