6.3. 配置对象存储后端
您可以将 Object Storage 服务(swift)配置为存储后端,配置 Image 服务(glance)。
先决条件
- 您计划了存储网络,以确保存储后端、控制平面和数据平面上的计算节点连接。如需更多信息,请参阅 规划部署以及在 OpenShift 上部署 Red Hat OpenStack Services 中的为 Red Hat OpenStack Services 准备网络。https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/18.0/html/planning_your_deployment/index#assembly_assembly_planning-storage-networks_planning
流程
打开
OpenStackControlPlaneCR 文件openstack_control_plane.yaml,并在glance模板中添加以下参数,将对象存储服务配置为后端:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: ... glance: template: glanceAPIs: default: replicas: 3 # Configure back end; set to 3 when deploying service ... customServiceConfig: | [DEFAULT] enabled_backends = <backend_name>:swift [glance_store] default_backend = <backend_name> [<backend_name>] swift_store_create_container_on_put = True swift_store_auth_version = 3 swift_store_auth_address = {{ .KeystoneInternalURL }} swift_store_key = {{ .ServicePassword }} swift_store_user = service:glance swift_store_endpoint_type = internalURL ...-
将
replicas设置为3以实现跨 API 的高可用性。 -
将
<backend_name> 替换为默认后端的名称。
-
将
更新 control plane:
$ oc apply -f openstack_control_plane.yaml -n openstack等待 RHOCP 创建与
OpenStackControlPlaneCR 相关的资源。运行以下命令来检查状态:$ oc get openstackcontrolplane -n openstack当状态为 "Setup complete" 时,会创建
OpenStackControlPlane资源。提示将
-w选项附加到get命令的末尾,以跟踪部署进度。