3.3. 部署 overcloud
使用您创建的环境文件部署 overcloud。
流程
创建 overcloud 需要额外的参数来用于
openstack overcloud deploy
命令:$ openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/external-ceph.yaml \ -e /home/stack/templates/ceph-config.yaml \ -e --ntp-server pool.ntp.org \ ...
这个示例命令使用以下选项:
--templates
- 从默认的 heat 模板集合/usr/share/openstack-tripleo-heat-templates/
创建 overcloud。-
-e /usr/share/openstack-tripleo-heat-templates/environments/external-ceph.yaml
- 设置 director 以将现有的 Ceph Storage 集群集成到 overcloud。 -
-e /home/stack/templates/ceph-config.yaml
- 添加自定义环境文件来覆盖由-e /usr/share/openstack-tripleo-heat-templates/environments/external-ceph.yaml
设置的默认值。 -
--ntp-server pool.ntp.org
- 设置 NTP 服务器。
-
3.3.1. 使用 CephFS 为共享文件系统服务添加环境文件
如果部署使用带有 CephFS 的共享文件系统服务(manila)的 overcloud,您必须添加额外的环境文件。
流程
创建并添加额外环境文件:
-
如果您部署使用原生 CephFS 后端驱动程序的 overcloud,请添加
/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml
。 如果您部署使用 CephFS-NFS 的 overcloud,请添加
/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsganesha-config.yaml
。红帽建议您使用导出共享的隔离 StorageNFS 网络部署 CephFS-NFS 驱动程序。您必须将隔离网络部署到 overcloud Controller 节点。有关创建 StorageNFS 网络并更新角色的详情,请参考 自定义 Red Hat OpenStack Platform 部署中的可组合网络。https://access.redhat.com/documentation/zh-cn/red_hat_openstack_platform/17.1/html/customizing_your_red_hat_openstack_platform_deployment/assembly_customizing-networks-for-the-rhosp-environment#assembly_composable-networks__custom-nic-templates
-
如果您部署使用原生 CephFS 后端驱动程序的 overcloud,请添加
根据您使用的 CephFS 后端,修改
openstack overcloud deploy
命令。对于原生 CephFS:
$ openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/external-ceph.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsnative-config.yaml \ -e /home/stack/templates/ceph-config.yaml \ -e --ntp-server pool.ntp.org ...
对于 CephFS-NFS:
$ openstack overcloud deploy --templates \ -r /home/stack/custom_roles.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/external-ceph.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsganesha-config.yaml \ -e /home/stack/templates/ceph-config.yaml \ -e /home/stack/templates/overcloud-networks-deployed.yaml\ -e /home/stack/templates/overcloud-vip-deployed.yaml \ -e --ntp-server pool.ntp.org ...
注意自定义
ceph-config.yaml
环境文件会覆盖external-ceph.yaml
文件中的参数,以及manila-cephfsnative-config.yaml
文件或manila-cephfsganesha-config.yaml
文件中的参数。因此,在external-ceph.yaml
和manila-cephfsnative-config.yaml
或manila-cephfsganesha-config.yaml
后,将自定义的ceph-config.yaml
环境文件包含在部署命令中。环境文件示例
parameter_defaults: CinderEnableIscsiBackend: false CinderEnableRbdBackend: true CinderEnableNfsBackend: false NovaEnableRbdBackend: true GlanceBackend: rbd CinderRbdPoolName: "volumes" NovaRbdPoolName: "vms" GlanceRbdPoolName: "images" CinderBackupRbdPoolName: "backups" CephClusterFSID: <cluster_ID> CephExternalMonHost: <IP_address>,<IP_address>,<IP_address> CephClientKey: "<client_key>" CephClientUserName: "openstack" ManilaCephFSDataPoolName: manila_data ManilaCephFSMetadataPoolName: manila_metadata ManilaCephFSCephFSAuthId: 'manila' CephManilaClientKey: '<client_key>' ExtraConfig:
-
根据您的具体环境,替换
<cluster_ID>
,<IP_address>
, 和<client_key>
的值。
-
根据您的具体环境,替换
其他资源
- 有关生成自定义角色文件的更多信息,请参阅使用 CephFS-NFS 部署共享文件系统服务。
3.3.2. 连接到用于对象存储的外部 Red Hat Ceph Storage 对象网关
如果您部署使用外部 Red Hat Ceph Storage 对象网关(RGW)进行对象存储的 overcloud,您必须添加额外的环境文件以连接到 RGW 实例。
流程
- 创建新的自定义环境文件,以定义 RGW 连接。
在自定义环境文件中添加以下参数:
parameter_defaults: ExternalSwiftPublicUrl: <public_rgw_endpoint_url> ExternalSwiftInternalUrl: <internal_rgw_endpoint_url> ExternalSwiftAdminUrl: <admin_rgw_endpoint_url> ExternalSwiftUserTenant: 'service' SwiftPassword: <swift_password>
-
将
<public_rgw_endpoint_url
> 替换为 HTTP 格式的 URL,该 URL 代表外部 RGW 实例侦听连接的公共端点。默认情况下,外部 RGW 实例侦听端口 8080。确认您的部署使用此端口。 -
将
<internal_rgw_endpoint_url
> 替换为代表外部 RGW 实例侦听连接的内部端点的 HTTP 格式的 URL。默认情况下,外部 RGW 实例侦听端口 8080。确认您的部署使用此端口。 -
将
<admin_rgw_endpoint_url
> 替换为 HTTP 格式的 URL,该 URL 代表外部 RGW 实例侦听连接的管理端点。默认情况下,外部 RGW 实例侦听端口 8080。确认您的部署使用此端口。 将
<swift_password
> 替换为 Object Storage 服务(swift)密码。注意overcloud 中创建的
swift
用户使用SwiftPassword
参数定义的密码。您必须使用rgw_keystone_admin_password
将外部 RGW 实例配置为使用同一密码与 Identity 服务进行身份验证。
-
将
- 保存新的自定义环境文件。
在 Red Hat Ceph Storage 配置文件中添加以下参数,将 RGW 配置为使用 Identity 服务:
rgw_keystone_api_version = 3 rgw_keystone_url = <public_keystone_endpoint_url> rgw_keystone_accepted_roles = member, Member, admin rgw_keystone_accepted_admin_roles = ResellerAdmin, swiftoperator rgw_keystone_admin_domain = default rgw_keystone_admin_project = service rgw_keystone_admin_user = swift rgw_keystone_admin_password = <swift_admin_password> rgw_keystone_implicit_tenants = true rgw_s3_auth_use_keystone = true rgw_swift_versioning_enabled = true rgw_swift_account_in_url = true rgw_max_attr_name_len = 128 rgw_max_attrs_num_in_req = 90 rgw_max_attr_size = 256 rgw_keystone_verify_ssl = false rgw_keystone_revocation_interval: '0' rgw_swift_enforce_content_length: 'true' rgw_trust_forwarded_https: 'true' rgw_max_attr_name_len: 128 rgw_max_attrs_num_in_req: 90 rgw_max_attr_size: 1024 rgw_keystone_accepted_reader_roles: 'SwiftSystemReader'
-
将
<public_keystone_endpoint_url
> 替换为 HTTP 格式的 URL,该 URL 代表 Identity 服务侦听连接的公共端点。默认情况下,身份服务侦听端口 5000。确认您的部署使用此端口。 将
<swift_admin_password
> 替换为自定义环境文件中定义的对象存储服务密码。注意director 默认在 Identity 服务中创建以下角色和用户:
-
rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
-
rgw_keystone_admin_domain: default
-
rgw_keystone_admin_project: service
-
rgw_keystone_admin_user: swift
-
-
将
- 保存对 Red Hat Ceph Storage 配置文件的更改。
使用自定义环境文件更新部署:
openstack overcloud deploy --templates \ -e <existing_overcloud_environment_files> -e /usr/share/openstack-tripleo-heat-templates/environments/swift-external.yaml -e <external_rgw_environment_file>
-
使用作为现有部署一部分的环境文件列表替换。
<existing_overcloud_environment_files>
-
使用在此过程中创建的自定义环境文件的名称替换
<external_rgw_environment_file>
。
-
使用作为现有部署一部分的环境文件列表替换。