|
本文档采用自动化机器翻译技术翻译。 尽管我们力求提供准确的译文,但不对翻译内容的完整性、准确性或可靠性作出任何保证。 若出现任何内容不一致情况,请以原始 英文 版本为准,且原始英文版本为权威文本。 |
库存管理
SUSE® Rancher Prime: OS Manager 操作符可以持有机器的库存,以及机器与其配置和分配集群的映射。
MachineInventory
MachineInventory 保存所有注册机器的相关信息。
在成功注册后,MachineInventory 将继承相关 machineInventoryLabels 中定义的所有 MachineRegistration。
此外,机器 annotations 也将在每次成功注册时更新。
默认情况下,SUSE® Rancher Prime: OS Manager 机器将每 24 小时尝试进行注册更新,以更新标签和注释。
参考手册
apiVersion: elemental.cattle.io/v1beta1
kind: MachineInventory
metadata:
# Machine annotations can be useful to identify hosts
annotations:
elemental.cattle.io/auth: tpm
elemental.cattle.io/registration-ip: 192.168.122.152
labels:
# A label inherited from the MachineRegistration definition
element: fire
# Generic SMBIOS labels that are typically populated with
# the MachineRegister approach
machineUUID: f266c64b-3972-40e7-9937-3dc4a311436c
manufacturer: QEMU
productName: Standard-PC-Q35-ICH9-2009
serialNumber: Not-Specified
# Custom labels can be applied to each MachineInventory
myCustomLabel: foo
name: m-479ab68e-00ff-4081-a731-5b1a76610289
# The namespace must match the namespace of the cluster
# assigned to the clusters.provisioning.cattle.io resource
namespace: fleet-default
# A reference to the MachineInventorySelector that links the
# machine to a Cluster definition
ownerReferences:
- apiVersion: elemental.cattle.io/v1beta1
controller: true
kind: MachineInventorySelector
name: fire-machine-selector-qcn7d
uid: 0a1f751e-4ca9-4a0d-919a-97ba1f434d12
spec:
# The hash of the TPM EK public key. This is used if you are
# using TPM2 to identify nodes. Nodes can report their TPM
# hash by using the MachineRegistration.
tpmHash: d68795c6192af9922692f050b...
计算机注册
MachineRegistration 保存有关如何安装、重置和配置所有连接的 SUSE® Rancher Prime: OS Manager 机器的信息。
可以更新 spec.machineInventoryLabels 和 spec.machineInventoryAnnotations,这将应用于所有注册的机器。
默认情况下,SUSE® Rancher Prime: OS Manager 机器将每 24 小时尝试进行注册更新,以更新标签和注释。
虽然可以修改 spec.config 定义,但已完成安装的机器将忽略对 spec.config 的更新。
无法完成安装的机器将每 30 分钟尝试一次,通过重新加载远程 MachineRegistration 定义。这可以用于纠正阻止成功安装的 spec.config 错误(例如 spec.config.elemental.install.device),而无需创建新的 MachineRegistration 和新的 .iso 映像。
参考手册
apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
metadata:
name: fire-nodes
# The namespace must match the namespace of the cluster
# assigned to the clusters.provisioning.cattle.io resource
namespace: fleet-default
spec:
# The cloud config that will be used to provision the node
config:
cloud-config:
users:
- name: root
passwd: root
elemental:
install:
reboot: true
device: /dev/sda
debug: true
reset:
enabled: true
debug: true
reset-persistent: true
reset-oem: true
reboot: true
# Labels to be added to the created MachineInventory object
machineInventoryLabels:
element: fire
manufacturer: "${System Information/Manufacturer}"
productName: "${System Information/Product Name}"
serialNumber: "${System Information/Serial Number}"
machineUUID: "${System Information/UUID}"
# Annotations to be added to the created MachineInventory object
machineInventoryAnnotations: {}