-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3df30bb10ded2a3e] Adjust 2.29 templates to use BMHI
Ivan Berezovskiy
- Loading branch information
git
committed
Jan 17, 2025
1 parent
e17b23d
commit ef01795
Showing
24 changed files
with
1,269 additions
and
1 deletion.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
templates/2.29.0/managed/baremetalhostprofiles.yaml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
apiVersion: metal3.io/v1alpha1 | ||
metadata: | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
name: default-2disks | ||
labels: | ||
kaas.mirantis.com/defaultBMHProfile: 'true' | ||
kind: BareMetalHostProfile | ||
spec: | ||
devices: | ||
- device: | ||
minSize: 70Gi | ||
wipeDevice: | ||
eraseMetadata: | ||
enabled: true | ||
partitions: | ||
- name: bios_grub | ||
size: 4Mi | ||
partflags: ['bios_grub'] | ||
- name: uefi | ||
partflags: ['esp'] | ||
size: 200Mi | ||
- name: config-2 | ||
# Size of this partition is limited to 64Mb. | ||
size: 64Mi | ||
- name: lvm_root_part | ||
size: 50Gi | ||
- name: lvm_lvp_part | ||
size: 0 | ||
- device: | ||
minSize: 30Gi | ||
wipeDevice: | ||
eraseMetadata: | ||
enabled: true | ||
volumeGroups: | ||
- name: lvm_root | ||
devices: | ||
- partition: lvm_root_part | ||
- name: lvm_lvp | ||
devices: | ||
- partition: lvm_lvp_part | ||
logicalVolumes: | ||
- name: root | ||
vg: lvm_root | ||
size: 0 | ||
- name: lvp | ||
vg: lvm_lvp | ||
size: 0 | ||
fileSystems: | ||
- fileSystem: vfat | ||
partition: config-2 | ||
- fileSystem: vfat | ||
partition: uefi | ||
mountPoint: /boot/efi | ||
- fileSystem: ext4 | ||
logicalVolume: root | ||
mountPoint: / | ||
mountOpts: 'rw,noatime,nodiratime,lazytime,nobarrier,commit=240,data=ordered' | ||
- fileSystem: ext4 | ||
logicalVolume: lvp | ||
mountPoint: /mnt/local-volumes/ | ||
mountOpts: 'rw,noatime,nodiratime,lazytime,nobarrier,commit=240,data=ordered' | ||
preDeployScript: | | ||
#!/bin/bash -ex | ||
echo $(date) 'pre_deploy_script done' >> /root/pre_deploy_done | ||
postDeployScript: | | ||
#!/bin/bash -ex | ||
echo "root:r00tme" | sudo chpasswd | ||
echo "blacklist acpi_power_meter" > /etc/modprobe.d/hwmon.conf | ||
ln -sf /dev/null /etc/systemd/system/ondemand.service | ||
echo $(date) 'post_deploy_script done' >> /root/post_deploy_done | ||
grubConfig: | ||
defaultGrubOptions: | ||
- 'GRUB_DISABLE_RECOVERY="true"' | ||
- 'GRUB_PRELOAD_MODULES=lvm' | ||
- 'GRUB_TIMEOUT=20' | ||
- 'GRUB_TERMINAL_INPUT="console serial"' | ||
- 'GRUB_TERMINAL_OUTPUT="gfxterm serial"' | ||
- 'GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600"' | ||
- 'GRUB_CMDLINE_LINUX="noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off systemd.journald.forward_to_console=yes console=ttyS0,9600 console=tty0"' | ||
kernelParameters: | ||
sysctl: | ||
kernel.dmesg_restrict: "1" | ||
kernel.core_uses_pid: "1" | ||
fs.file-max: "9223372036854775807" | ||
fs.aio-max-nr: "1048576" | ||
fs.inotify.max_user_instances: "4096" | ||
vm.max_map_count: "262144" | ||
net.ipv4.conf.all.rp_filter: "0" | ||
net.ipv4.conf.default.rp_filter: "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-control-0-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-control-1-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-control-2-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-worker-0-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-worker-1-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostCredential | ||
metadata: | ||
name: managed-worker-2-bmc-credentials | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
spec: | ||
username: "admin" | ||
password: | ||
value: "password" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-control-0 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-control-0 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_control_mac_address_0 }}" | ||
bmc: | ||
address: 127.0.0.1:6240 | ||
credentialsName: "managed-control-0-bmc-credentials" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-control-1 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-control-1 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_control_mac_address_1 }}" | ||
bmc: | ||
address: 127.0.0.1:6241 | ||
credentialsName: "managed-control-1-bmc-credentials" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-control-2 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-control-2 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_control_mac_address_2 }}" | ||
bmc: | ||
address: 127.0.0.1:6242 | ||
credentialsName: "managed-control-2-bmc-credentials" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-worker-0 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-worker-0 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_worker_mac_address_0 }}" | ||
bmc: | ||
address: 127.0.0.1:6250 | ||
credentialsName: "managed-worker-0-bmc-credentials" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-worker-1 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-worker-1 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_worker_mac_address_1 }}" | ||
bmc: | ||
address: 127.0.0.1:6251 | ||
credentialsName: "managed-worker-1-bmc-credentials" | ||
--- | ||
apiVersion: kaas.mirantis.com/v1alpha1 | ||
kind: BareMetalHostInventory | ||
metadata: | ||
name: managed-worker-2 | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
baremetal: hw-managed-worker-2 | ||
spec: | ||
bootMode: legacy | ||
online: true | ||
bootMACAddress: "{{ managed_worker_mac_address_2 }}" | ||
bmc: | ||
address: 127.0.0.1:6252 | ||
credentialsName: managed-worker-2-bmc-credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: cluster.k8s.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
name: {{ MCC_MANAGED_CLUSTER_NAME }} | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.0.0/16 | ||
services: | ||
cidrBlocks: | ||
- 10.232.0.0/18 | ||
providerSpec: | ||
value: | ||
apiVersion: baremetal.k8s.io/v1alpha1 | ||
kind: BaremetalClusterProviderSpec | ||
dedicatedControlPlane: false | ||
dedicatedMetallbPools: false | ||
helmReleases: | ||
- name: ceph-controller | ||
values: {} | ||
- name: stacklight | ||
values: | ||
highAvailabilityEnabled: false | ||
logging: | ||
enabled: false | ||
prometheusServer: | ||
customAlerts: [] | ||
persistentVolumeClaimSize: 16Gi | ||
retentionSize: 15GB | ||
retentionTime: 15d | ||
watchDogAlertEnabled: false | ||
- name: metallb | ||
values: {} | ||
publicKeys: | ||
- name: user-key | ||
release: {{ MCC_MANAGED_CLUSTER_RELEASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
--- | ||
apiVersion: "ipam.mirantis.com/v1alpha1" | ||
kind: Subnet | ||
metadata: | ||
name: managed-k8s-api-lb | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
cluster.sigs.k8s.io/cluster-name: {{ MCC_MANAGED_CLUSTER_NAME }} | ||
ipam/SVC-LBhost: "presents" | ||
spec: | ||
cidr: {{ NETWORK_LCM_MANAGED_LB_HOST }}/32 | ||
useWholeCidr: true | ||
|
||
--- | ||
apiVersion: "ipam.mirantis.com/v1alpha1" | ||
kind: Subnet | ||
metadata: | ||
name: managed-lcm | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
cluster.sigs.k8s.io/cluster-name: {{ MCC_MANAGED_CLUSTER_NAME }} | ||
ipam/SVC-k8s-lcm: "presents" | ||
spec: | ||
cidr: {{ NETWORK_LCM_SUBNET }} | ||
gateway: {{ NETWORK_LCM_GATEWAY }} | ||
nameservers: | ||
{%- for server in NAMESERVERS.split(',') %} | ||
- {{ server -}} | ||
{% endfor %} | ||
includeRanges: | ||
- {{ NETWORK_LCM_STATIC_RANGE_MANAGED }} | ||
|
||
--- | ||
apiVersion: ipam.mirantis.com/v1alpha1 | ||
kind: L2Template | ||
metadata: | ||
name: default-managed | ||
namespace: {{ MCC_MANAGED_CLUSTER_NAMESPACE }} | ||
labels: | ||
kaas.mirantis.com/provider: baremetal | ||
cluster.sigs.k8s.io/cluster-name: {{ MCC_MANAGED_CLUSTER_NAME }} | ||
ipam/DefaultForCluster: "1" | ||
spec: | ||
autoIfMappingPrio: | ||
- eth | ||
- eno | ||
- ens | ||
- enp | ||
l3Layout: | ||
- scope: namespace | ||
subnetName: managed-lcm | ||
labelSelector: | ||
kaas.mirantis.com/provider: baremetal | ||
ipam/SVC-k8s-lcm: "presents" | ||
{#- protect go-template below from Jinja #} | ||
{%- raw %} | ||
npTemplate: | | ||
version: 2 | ||
renderer: networkd | ||
ethernets: | ||
{{ nic 0 }}: | ||
addresses: | ||
- {{ ip "0:managed-lcm" }} | ||
dhcp4: false | ||
dhcp6: false | ||
gateway4: {{ gateway_from_subnet "managed-lcm" }} | ||
match: | ||
macaddress: {{ mac 0 }} | ||
nameservers: | ||
addresses: {{ nameservers_from_subnet "managed-lcm" }} | ||
set-name: mcc-lcm | ||
{{ nic 1 }}: | ||
dhcp4: false | ||
dhcp6: false | ||
match: | ||
macaddress: {{ mac 1 }} | ||
set-name: mcc-openstack | ||
{%- endraw %} | ||
{#- end protect go-template below from Jinja #} |
Oops, something went wrong.