19.11. 在裸机上启用支持的安装程序服务
Assisted Installer Service (AIS) 部署 OpenShift Container Platform 集群。Red Hat Advanced Cluster Management (RHACM) 提供 AIS。当您在 RHACM hub 集群上启用 MultiClusterHub Operator 时,会部署 AIS。
对于分布式单元 (DU),RHACM 支持在单个裸机主机上运行的 OpenShift Container Platform 部署。单节点集群同时充当 control plane 和 worker 节点。
先决条件
- 在 hub 集群上安装 OpenShift Container Platform 4.9。
-
安装 RHACM 并创建
MultiClusterHub
资源。 - 为数据库和文件系统存储创建持久性卷自定义资源 (CR)。
-
已安装 OpenShift CLI(
oc
)。
流程
修改
HiveConfig
资源,以便为辅助安装程序启用功能门:$ oc patch hiveconfig hive --type merge -p '{"spec":{"targetNamespace":"hive","logLevel":"debug","featureGates":{"custom":{"enabled":["AlphaAgentInstallStrategy"]},"featureSet":"Custom"}}}'
修改
Provisioning
资源,以允许 Bare Metal Operator 监视所有命名空间:$ oc patch provisioning provisioning-configuration --type merge -p '{"spec":{"watchAllNamespaces": true }}'
创建
AgentServiceConfig
CR。在
agent_service_config.yaml
文件中保存以下 YAML:apiVersion: agent-install.openshift.io/v1beta1 kind: AgentServiceConfig metadata: name: agent spec: databaseStorage: accessModes: - ReadWriteOnce resources: requests: storage: <db_volume_size> 1 filesystemStorage: accessModes: - ReadWriteOnce resources: requests: storage: <fs_volume_size> 2 osImages: 3 - openshiftVersion: "<ocp_version>" 4 version: "<ocp_release_version>" 5 url: "<iso_url>" 6 rootFSUrl: "<root_fs_url>" 7 cpuArchitecture: "x86_64"
运行以下命令来创建
AgentServiceConfig
CR:$ oc create -f agent_service_config.yaml
输出示例
agentserviceconfig.agent-install.openshift.io/agent created