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,您必须添加额外的环境文件。

流程

  1. 创建并添加额外环境文件:

  2. 根据您使用的 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.yamlmanila-cephfsnative-config.yamlmanila-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> 的值。

其他资源

3.3.2. 连接到用于对象存储的外部 Red Hat Ceph Storage 对象网关

如果您部署使用外部 Red Hat Ceph Storage 对象网关(RGW)进行对象存储的 overcloud,您必须添加额外的环境文件以连接到 RGW 实例。

流程

  1. 创建新的自定义环境文件,以定义 RGW 连接。
  2. 在自定义环境文件中添加以下参数:

    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 服务进行身份验证。

  3. 保存新的自定义环境文件。
  4. 在 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
  5. 保存对 Red Hat Ceph Storage 配置文件的更改。
  6. 使用自定义环境文件更新部署:

    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>
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.