3.5. 部署 overcloud
在 undercloud 安装过程中,在 undercloud.conf 文件中设置 generate_service_certificate=false。否则,必须在部署 overcloud 时注入信任定位器。有关如何注入信任定位器的更多信息,请参阅高级 Overcloud 自定义指南中的 在 Overcloud 公共端点上启用 SSL/TLS。
流程
创建 overcloud 需要
openstack overcloud deploy命令的额外参数:openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.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/ceph-ansible/ceph-ansible-external.yaml \ -e /home/stack/templates/ceph-config.yaml \ -e --ntp-server pool.ntp.org \Copy to Clipboard Copied! Toggle word wrap Toggle overflow 这个示例命令使用以下选项:
-
--templates- 从默认 heat 模板集合/usr/share/openstack-tripleo-heat-templates/创建 overcloud。 -
-e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml- 设置 director 以将现有的 Ceph 集群整合到 overcloud。 -
-e /home/stack/templates/ceph-config.yaml- 添加自定义环境文件以覆盖-e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml设定的默认值。在这种情况下,它是您在 第 3.1 节 “安装 ceph-ansible 软件包” 中创建的自定义环境文件。 -
--NTP-server pool.ntp.org- 设置 NTP 服务器。
3.5.2. 为外部 Ceph 对象网关(RGW)添加额外的环境文件以用于对象存储 复制链接链接已复制到粘贴板!
如果部署使用已存在的 RGW 服务进行 Object storage 的 overcloud,您必须添加额外的环境文件。
流程
将
以下参数_defaults添加到自定义环境文件,如swift-external-params.yaml。替换要适合您的部署的值:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意示例代码片段包含的参数值,可能与您在环境中使用的值不同:
-
远程 RGW 实例侦听的默认端口为
8080。端口可能会因配置外部 RGW 的配置而有所不同。 -
overcloud 中创建的
swift用户使用SwiftPassword参数所定义的密码。您必须将外部 RGW 实例配置为使用同密码相同的密码,以便使用rgw_keystone_admin_password进行身份服务进行身份验证。
-
远程 RGW 实例侦听的默认端口为
将以下代码添加到 Ceph 配置文件中,将 RGW 配置为使用 Identity 服务。替换变量值以适合您的环境:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意director 默认在身份服务中创建以下角色和用户:
- rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
- rgw_keystone_admin_domain: default
- rgw_keystone_admin_project: service
- rgw_keystone_admin_user: swift
使用与部署相关的任何其他环境文件部署 overcloud:
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.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.5.3. 调用模板和环境文件 复制链接链接已复制到粘贴板!
您还可以使用回答文件来调用所有模板和环境文件。例如,您可以使用以下命令部署相同的 overcloud:
openstack overcloud deploy \ --answers-file /home/stack/templates/answers.yaml \ --ntp-server pool.ntp.org
$ openstack overcloud deploy \
--answers-file /home/stack/templates/answers.yaml \
--ntp-server pool.ntp.org
在这种情况下,该文件 /home/stack/templates/answers.yaml 包含:
templates: /usr/share/openstack-tripleo-heat-templates/ environments: - /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \ - /home/stack/templates/ceph-config.yaml \
templates: /usr/share/openstack-tripleo-heat-templates/
environments:
- /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \
- /home/stack/templates/ceph-config.yaml \
如需更多信息,请参阅 Director 安装和使用指南中的将 overcloud 部署包含环境文件。
3.5.4. OpenStack overcloud 部署命令选项 复制链接链接已复制到粘贴板!
您可以输入以下命令查看可与 openstack overcloud deploy 命令一起使用的完整选项列表:
openstack help overcloud deploy
$ openstack help overcloud deploy
如需更多信息,请参阅 Director 安装和使用指南中的使用 CLI 工具配置基本的 overcloud。
3.5.5. 查看 overcloud 创建的状态 复制链接链接已复制到粘贴板!
overcloud 创建过程开始,director 置备您的节点。完成此过程需要一些时间。
流程
要查看 overcloud 创建的状态,请以 stack 用户身份打开一个单独的终端并输入以下命令:
source ~/stackrc openstack stack list --nested
$ source ~/stackrc
$ openstack stack list --nested