12.4. 将 rhsm 可组合服务应用到不同的角色
您可以根据角色应用 rhsm
可组合服务。例如,您可以将不同的配置集合应用到 Controller 节点、计算节点和 Ceph Storage 节点。
流程
-
创建名为
templates/rhsm.yml
的环境文件来存储配置。 在环境文件中包含您的配置。例如:
resource_registry: OS::TripleO::Services::Rhsm: /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml parameter_defaults: ControllerParameters: RhsmVars: rhsm_repos: - rhel-9-for-x86_64-baseos-eus-rpms - rhel-9-for-x86_64-appstream-eus-rpms - rhel-9-for-x86_64-highavailability-eus-rpms - openstack-17-for-rhel-9-x86_64-rpms - fast-datapath-for-rhel-9-x86_64-rpms - rhceph-5-tools-for-rhel-9-x86_64-rpms rhsm_username: "myusername" rhsm_password: "p@55w0rd!" rhsm_org_id: "1234567" rhsm_pool_ids: "55d251f1490556f3e75aa37e89e10ce5" rhsm_method: "portal" rhsm_release: 9.0 ComputeParameters: RhsmVars: rhsm_repos: - rhel-9-for-x86_64-baseos-eus-rpms - rhel-9-for-x86_64-appstream-eus-rpms - rhel-9-for-x86_64-highavailability-eus-rpms - openstack-17-for-rhel-9-x86_64-rpms - rhceph-5-tools-for-rhel-9-x86_64-rpms - fast-datapath-for-rhel-9-x86_64-rpms rhsm_username: "myusername" rhsm_password: "p@55w0rd!" rhsm_org_id: "1234567" rhsm_pool_ids: "55d251f1490556f3e75aa37e89e10ce5" rhsm_method: "portal" rhsm_release: 9.0 CephStorageParameters: RhsmVars: rhsm_repos: - rhel-9-for-x86_64-baseos-rpms - rhel-9-for-x86_64-appstream-rpms - rhel-9-for-x86_64-highavailability-rpms - openstack-17-deployment-tools-for-rhel-9-x86_64-rpms rhsm_username: "myusername" rhsm_password: "p@55w0rd!" rhsm_org_id: "1234567" rhsm_pool_ids: "68790a7aa2dc9dc50a9bc39fabc55e0d" rhsm_method: "portal" rhsm_release: 9.0
resource_registry
将rhsm
可组合服务与OS::TripleO::Services::Rhsm
资源相关联,这些资源在每个角色上可用。ControllerParameters
、ComputeParameters
和CephStorageParameters
参数各自使用单独的RhsmVars
参数,将订阅详情传递给对应的角色。注意在
CephStorageParameters
参数中设置RhsmVars
参数,以使用特定于 Ceph Storage 的 Red Hat Ceph Storage 订阅和存储库。确保rhsm_repos
参数包含标准 Red Hat Enterprise Linux 软件仓库,而不是 Controller 和 Compute 节点所需的延长更新支持(EUS)存储库。- 保存环境文件。