第 3 章 创建自定义后端环境文件
您创建的环境文件来配置自定义后端,包含您要定义的每个后端的设置。它还包含与部署自定义后端相关的其他设置。有关环境文件的更多信息,请参阅自定义 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_configuring-the-overcloud-with-the-orchestration-service#con_environment-files_understanding-heat-templates
以下示例环境文件定义了两个 NetApp 后端,netapp1
和 netapp2
:
/home/stack/templates/custom-env.yaml
parameter_defaults: # 1 CinderEnableIscsiBackend: false CinderEnableRbdBackend: false CinderEnableNfsBackend: false NovaEnableRbdBackend: false GlanceBackend: file # 2 ControllerExtraConfig: # 3 cinder::config::cinder_config: netapp1/volume_driver: # 4 value: cinder.volume.drivers.netapp.common.NetAppDriver netapp1/netapp_storage_family: value: ontap_7mode netapp1/netapp_storage_protocol: value: iscsi netapp1/netapp_server_hostname: value: 10.35.64.11 netapp1/netapp_server_port: value: 80 netapp1/netapp_login: value: root netapp1/netapp_password: value: p@$$w0rd netapp1/volume_backend_name: value: netapp1 netapp2/volume_driver: # 5 value: cinder.volume.drivers.netapp.common.NetAppDriver # 6 netapp2/netapp_storage_family: value: ontap_7mode netapp2/netapp_storage_protocol: value: iscsi netapp2/netapp_server_hostname: value: 10.35.64.11 netapp2/netapp_server_port: value: 80 netapp2/netapp_login: value: root netapp2/netapp_password: value: p@$$w0rd netapp2/volume_backend_name: value: netapp2 cinder_user_enabled_backends: ['netapp1','netapp2'] # 7
- 1
- 以下参数被设置为
false
,它会禁用其他后端类型:-
CinderEnableIscsiBackend
:其他 iSCSI 后端. -
CinderEnableRbdBackend
: Red Hat Ceph。 -
CinderEnableNfsBackend
: NFS。 -
NovaEnableRbdBackend
: 临时 Red Hat Ceph Storage.
-
- 2
- GlanceBackend 参数设置镜像服务用来存储镜像的内容。支持以下值:
-
file
:将镜像存储在每个 Controller 节点上的/var/lib/glance/images
上。 -
swift
:将对象存储服务用于镜像存储。 -
cinder
:使用块存储服务进行镜像存储。
-
- 3
ControllerExtraConfig
定义应用到所有 Controller 节点的自定义设置。cinder::config::cinder_config
类意味着设置必须应用到 Block Storage (cinder)服务。- 4
netapp1/volume_driver
和netapp2/volume_driver
设置遵循 section/setting 语法。使用 Block Storage 服务时,每个后端在/etc/cinder/cinder.conf
中的其自己的部分中定义。使用netapp1
前缀的每个设置在一个新的[netapp1]
后端部分定义。- 5
netapp2
设置在单独的[netapp2]
部分中定义。- 6
value
前缀配置前面的设置。- 7
cinder_user_enabled_backends
类集合并启用自定义后端。仅在启用了用户的后端使用这个类,特别是cinder::config::cinder_config
类中定义的后端。不要使用
cinder_user_enabled_backends
来列出您可以与 director 原生启用的后端。这包括支持的 NetApp 或 Dell 设备的 Red Hat Ceph、NFS 和单一后端。例如,如果您启用了 Red Hat Ceph 后端,请不要在cinder_user_enabled_backends
中列出它,请通过将CinderEnableRbdBackend
设置为true
来启用它。
有关为 OpenStack Block Storage 定义 Red Hat Ceph 后端的更多信息,请参阅 部署 Red Hat Ceph Storage 和 Red Hat OpenStack Platform 以及 director。
要查看 /home/stack/templates/custom-env.yaml
中生成的 /etc/cinder/cinder.conf
设置,请参阅 示例环境文件的配置。