Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

第 5 章 overcloud 注册

Overcloud 提供了在红帽 Content Delivery Network、Red Hat Satellite Server 5 或 Red Hat Satellite Server 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,请运行 sudo subscription-manager list --available --all --matches="*OpenStack*",并使用生成的 池 ID 值。
rhel_reg_sat_url
要注册 Overcloud 节点的 Satellite 服务器的基本 URL。此参数使用卫星服务器 HTTP URL 而不是 HTTPS URL。例如,使用 http://satellite.example.com 而不使用 https://satellite.example.com。Overcloud 创建过程使用此 URL 来决定您正在使用 Red Hat Satellite Server 5 还是 Red Hat Satellite Server 6。在使用 Red Hat Satellite Server 6 时,Overcloud 获取 katello-ca-consumer-latest.noarch.rpm 文件,使用 subscription-manager 注册,并安装 katello-agent。在使用 Red Hat Satellite Server 5 时,Overcloud 获取 RHN-ORG-TRUSTED-SSL-CERT 文件并使用 rhnreg_ks 注册。
rhel_reg_server_url
要使用的订阅服务的主机名。默认值是 客户门户网站 Subscription Management, subscription.rhn.redhat.com。如果没有使用这个选项,则会在客户门户网站订阅管理中注册该系统。订阅服务器 URL 使用 https://hostname:port/prefix 的形式。
rhel_reg_base_url
您要用来接收更新的内容交付服务器的主机名。默认值为 https://cdn.redhat.com。由于卫星 6 托管自己的内容,因此该 URL 必须用于使用卫星 6 注册的系统。内容的基本 URL 使用 https://hostname:port/prefix 的形式。
rhel_reg_org
要用于注册的组织。要找到此 ID,请从 undercloud 节点运行 sudo subscription-manager orgs。在提示时输入您的红帽凭证,并使用生成的 密钥值
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.2-rpms 对应于 Red Hat Satellite 6.2。

升级参数

UpdateOnRHELRegistration
如果设置为 True,在注册完成后触发 overcloud 软件包的更新。默认设置为 False

HTTP 代理参数

rhel_reg_http_proxy_host
HTTP 代理的主机名。例如: proxy.example.com
rhel_reg_http_proxy_port
HTTP 代理通信的端口。例如: 8080
rhel_reg_http_proxy_username
用于访问 HTTP 代理的用户名。
rhel_reg_http_proxy_password
用于访问 HTTP 代理的密码。
重要

如果使用代理服务器,请确保所有 overcloud 节点都具有指向 rhel_reg_http_proxy_host 参数中定义的主机的路由。如果没有路由到此主机,subscription-manager 将超时并导致部署失败。

部署命令(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 角色”