Show Table of Contents
6.12. 注册 Overcloud
Overcloud 提供了把节点注册到 Red Hat Content Delivery Network、Red Hat Satellite 5 server 或 Red Hat Satellite 6 server 的方法。您可以选择使用环境变量实现它,也可以使用命令行来实现。
方法 1 - 命令行
部署命令(
openstack overcloud deploy)使用一组选项来定义您的注册详情。第 7.1 节 “设置 Overcloud 参数” 中的表格包括了这些选项以及它们的描述信息。使用 第 7 章 创建 Overcloud 中的部署命令时包括这些选项,例如:
# openstack overcloud deploy --templates --rhel-reg --reg-method satellite --reg-sat-url http://example.satellite.com --reg-org MyOrg --reg-activation-key MyKey --reg-force [...]
方法 2 - 环境文件
从 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
- 选择注册方法。可以是
portal、satellite或disable。 - rhel_reg_type
- 注册的单元类型。如果注册为一个
system,把它设为空 - rhel_reg_auto_attach
- 为系统自动附加兼容的订阅。如需启用这个功能,把它设置为
true。 - rhel_reg_service_level
- 自动附加所使用的服务级别。
- rhel_reg_release
- 使用这个参数来为自动附加设置发行版本。如果设置为空,则使用从 Red Hat Subscription Manager 获得的默认值。
- rhel_reg_pool_id
- 使用的订阅池 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
- 订阅服务使用的主机名。默认是 Customer Portal Subscription Management(
subscription.rhn.redhat.com)。如果这个选项没有被使用,系统会使用 Customer Portal Subscription Management 进行注册。订阅服务器 URL 的格式是https://hostname:port/prefix。 - rhel_reg_base_url
- 获得系统更新的内容服务器的主机名,它的默认值是
https://cdn.redhat.com。因为 Satellite 6 主机有它自己的内容,注册到 Satellite 6 的系统需要在这个参数中指定 URL。基本 URL 的格式是https://hostname:port/prefix。 - rhel_reg_org
- 注册的机构
- 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)的仓库。例如,rhel-7-server-satellite-tools-6.1-rpms。
在 第 7 章 创建 Overcloud 中介绍的部署命令(
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 资源。这意味着,您只能使用这个资源进行注册。如需了解更多信息,请参阅 第 6.14 节 “自定义 Overcloud 的预配置”。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.