3.3. 部署 overcloud
使用您创建的环境文件部署 overcloud。
流程
创建 overcloud 需要
openstack overcloud deploy
命令的额外参数:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 \ ...
$ 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
- 添加自定义环境文件来覆盖由/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
。 如果您部署通过 NFS 使用 CephFS 的 overcloud,请添加
/usr/share/openstack-tripleo-heat-templates/environments/manila-cephfsganesha-config.yaml
。红帽建议您使用导出共享的隔离 StorageNFS 网络部署 Ceph-through-NFS 驱动程序。您必须将隔离网络部署到 overcloud Controller 节点。要启用此部署,director 包括以下文件和角色:
- 包含 StorageNFS 网络(/usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml)的自定义网络配置文件示例。检查并根据需要自定义此文件。
- ControllerStorageNFS 角色。
-
如果您部署使用原生 CephFS 后端驱动程序的 overcloud,请添加
根据您使用的 CephFS 后端,修改
openstack overcloud deploy
命令。对于原生 CephFS:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
$ 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 through NFS:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow openstack overcloud deploy --templates \ -n /usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml \ -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 --ntp-server pool.ntp.org
$ openstack overcloud deploy --templates \ -n /usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml \ -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 --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
环境文件。环境文件示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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:
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>
的值。
-
根据您的具体环境,替换
其他资源
- 有关生成自定义角色文件的更多信息,请参阅通过 NFS 使用 CephFS 部署共享文件系统服务。
3.3.2. 为外部 Ceph 对象网关(RGW)为对象存储添加额外的环境文件
如果部署使用现有 RGW 服务进行对象存储的 overcloud,您必须添加额外的环境文件。
流程
将以下
parameter_defaults
添加到自定义环境文件中,如swift-external-params.yaml
,并调整值以适合您的部署:Copy to Clipboard Copied! Toggle word wrap Toggle overflow parameter_defaults: ExternalSwiftPublicUrl: 'http://<Public RGW endpoint or loadbalancer>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftInternalUrl: 'http://<Internal RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftAdminUrl: 'http://<Admin RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftUserTenant: 'service' SwiftPassword: 'choose_a_random_password'
parameter_defaults: ExternalSwiftPublicUrl: 'http://<Public RGW endpoint or loadbalancer>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftInternalUrl: 'http://<Internal RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftAdminUrl: 'http://<Admin RGW endpoint>:8080/swift/v1/AUTH_%(project_id)s' ExternalSwiftUserTenant: 'service' SwiftPassword: 'choose_a_random_password'
注意示例代码片段包含参数值,可能与您在环境中使用的值不同:
-
远程 RGW 实例侦听的默认端口为
8080。
端口可能根据外部 RGW 的配置方式而有所不同。 -
overcloud 中创建的
swift
用户使用SwiftPassword
参数定义的密码。您必须使用rgw_keystone_admin_password
将外部 RGW 实例配置为使用同一密码与身份服务进行身份验证。
-
远程 RGW 实例侦听的默认端口为
将以下代码添加到 Ceph 配置文件中,将 RGW 配置为使用 Identity 服务。替换变量值以适合您的环境:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rgw_keystone_api_version = 3 rgw_keystone_url = http://<public Keystone endpoint>:5000/ 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 = <password_as_defined_in_the_environment_parameters> rgw_keystone_implicit_tenants = true rgw_keystone_revocation_interval = 0 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_api_version = 3 rgw_keystone_url = http://<public Keystone endpoint>:5000/ 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 = <password_as_defined_in_the_environment_parameters> rgw_keystone_implicit_tenants = true rgw_keystone_revocation_interval = 0 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
注意director 默认在 Identity 服务中创建以下角色和用户:
- rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
- rgw_keystone_admin_domain: default
- rgw_keystone_admin_project: service
- rgw_keystone_admin_user: swift
使用与部署相关的任何其他环境文件部署 overcloud:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow openstack overcloud deploy --templates \ -e <your_environment_files> -e /usr/share/openstack-tripleo-heat-templates/environments/swift-external.yaml -e swift-external-params.yaml
openstack overcloud deploy --templates \ -e <your_environment_files> -e /usr/share/openstack-tripleo-heat-templates/environments/swift-external.yaml -e swift-external-params.yaml