第 5 章 Overcloud 注册
Overcloud 提供了一种将节点注册到 Red Hat Content Delivery Network、Red Hat Satellite 5 服务器或 Red Hat Satellite 6 服务器的方法。
5.1. 将 Overcloud 注册到环境文件 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
从 Heat 模板集合中复制注册文件:
$ cp -r /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration ~/templates/.
编辑 ~/templates/rhel-registration/environment-rhel-registration.yaml,并修改以下值以适合您的注册方法和详情。
- rhel_reg_method
-
选择注册方法。
门户、卫星或禁用。 - rhel_reg_type
-
要注册的单元类型。留空以注册
为系统 - rhel_reg_auto_attach
-
自动向此系统附加兼容订阅。设置为
true来启用。要禁用此功能,请从环境文件中删除此参数。 - rhel_reg_service_level
- 用于自动附加的服务级别。
- rhel_reg_release
- 使用此参数为自动附加设置发行版本。留空以从 Red Hat Subscription Manager 中使用默认值。
- rhel_reg_pool_id
-
要使用的订阅池 ID。如果没有自动附加订阅,则使用它。要找到此 ID,请从 undercloud 节点运行
sudo subscription-manager list --available --all --matches="*OpenStack*",并使用生成的池 ID值。 - rhel_reg_sat_url
-
注册 Overcloud 节点的 Satellite 服务器的基本 URL。此参数需要使用 Satellite 的 HTTP URL 而不是 HTTPS URL。例如,使用 http://satellite.example.com 而不使用 https://satellite.example.com。Overcloud 创建过程使用此 URL 来确定服务器是 Red Hat Satellite 5 还是 Red Hat Satellite 6 服务器。如果 Red Hat Satellite 6 服务器,Overcloud 获取
katello-ca-consumer-latest.noarch.rpm文件,使用subscription-manager注册,并安装katello-agent。如果 Red Hat Satellite 5 服务器,Overcloud 获取RHN-ORG-TRUSTED-SSL-CERT文件,并使用rhnreg_ks注册。 - rhel_reg_server_url
- 要使用的订阅服务的主机名。默认值是客户门户网站订阅管理、subscription.rhn.redhat.com。如果没有使用这个选项,系统会在客户门户网站订阅管理中注册。订阅服务器 URL 使用 https://hostname:port/prefix 的形式。
- rhel_reg_base_url
- 提供用于接收更新的内容交付服务器的主机名。默认值为 https://cdn.redhat.com。由于 Satellite 6 托管自己的内容,因此 URL 必须用于 Satellite 6 注册的系统。内容的基本 URL 使用 https://hostname:port/prefix 的形式。
- rhel_reg_org
-
用于注册的组织。要找到此 ID,请从 undercloud 节点运行
sudo subscription-manager组织。出现提示时输入您的红帽凭证,并使用生成的Key值。 - rhel_reg_environment
- 在所选机构中使用的环境。
- rhel_reg_repos
- 以逗号分隔的存储库列表,以启用。
- rhel_reg_activation_key
- 用于注册的激活码。
- rhel_reg_user; rhel_reg_password
- 注册的用户名和密码。如果可能,使用激活密钥注册。
- rhel_reg_machine_name
- 机器名称。将此保留为空白,以使用节点的主机名。
- rhel_reg_force
-
设置为
true以强制注册选项。例如,重新注册节点时。 - rhel_reg_sat_repo
-
包含 Red Hat Satellite 6 管理工具的存储库,如
katello-agent。检查与 Red Hat Satellite 版本对应的正确的存储库名称,检查存储库是否在 Satellite 服务器上同步。例如,rhel-7-server-satellite-tools-6.2-rpms对应于 Red Hat Satellite 6.2。
部署命令(openstack overcloud deploy)使用 -e 选项添加环境文件。添加 ~/templates/rhel-registration/environment-rhel-registration.yaml 和 ~/templates/rhel-registration/rhel-registration-resource-registry.yaml。例如:
$ openstack overcloud deploy --templates [...] -e /home/stack/templates/rhel-registration/environment-rhel-registration.yaml -e /home/stack/templates/rhel-registration/rhel-registration-resource-registry.yaml
重要
注册设置为 OS::TripleO::NodeExtraConfig Heat 资源。这意味着您只能将此资源用于注册。如需更多信息,请参阅 第 4.2 节 “pre-Configuration:自定义特定 Overcloud 角色”。