Deploy Object Storage on external data plane nodes

Deploy the Object Storage service (swift) on external data plane nodes for large deployments with extensive storage. The proxy service runs on the control plane while the storage services run on the data plane nodes.

About this task

Note

If you do not want to use persistent volumes for data storage, set swiftStorage replicas to 0 in the OpenStackControlPlane CR. When initially creating the OpenStackControlPlane CR, you must also set swiftProxy replicas to 0. This is necessary because ring building is not possible until data plane nodes are defined, and the proxies for the Object Storage service require properly built rings with at least the configured number of replica devices to start. Once the data plane is deployed, you can then scale the swiftProxy replicas to the number you want.

apiVersion: core.openstack.org/v1beta1
kind: OpenStackControlPlane
metadata:
  name: openstack-control-plane
  namespace: openstack
spec:
  ...
  swift:
    enabled: true
    template:
      swiftProxy:
        replicas: 0
      swiftRing:
        ringReplicas: 3
      swiftStorage:
        replicas: 0

To deploy and run the Object Storage services on data plane nodes, first you enable DNS forwarding to resolve data plane host names in the control plane pods, and then you create an OpenStackDataPlaneNodeSet CR with the following properties:

  • The swift service
  • A list of disks to be used for Object Storage service storage

Procedure

  1. Enable DNS forwarding to resolve data plane hostnames in the control plane pods.
    1. Obtain the clusterIP of the resolver:
      $ oc get svc dnsmasq-dns -o jsonpath='{.spec.clusterIP}'
    2. Update the default DNS entry to add the clusterIP of the resolver:
      apiVersion: operator.openshift.io/v1
      kind: DNS
      metadata:
        name: default
      spec:
        servers:
        - name: swift
          zones:
          - storage.example.com
          forwardPlugin:
            policy: Random
            upstreams:
            - <clusterIP>
      • Replace <clusterIP> with the clusterIP of the resolver.
  2. Enable the swift storage service on the data plane nodes by adding the swift service to the end of the list of services for the NodeSet in your OpenStackDataPlaneNodeSet CR. The service runs the playbooks that are required to configure the Object Storage services:

    Example:

        services:
        - repo-setup
        - bootstrap
        - download-cache
        - configure-network
        - validate-network
        - install-os
        - configure-os
        - ssh-known-hosts
        - run-os
        - reboot-os
        - install-certs
        - swift
  3. Define disks to be used by the Object Storage service on data plane nodes.
    • When you define disks, you can do the following:
      • Define the disks in the global nodeTemplate section in your OpenStackDataPlaneNodeSet CR to use the same type of disks for all nodes.
      • Define disks on a per-node basis in the nodes section of your OpenStackDataPlaneNodeSet CR.
      • Assign disks to a specific region or zone.
      • Enable ring management to distribute replicas.
    • You must specify a weight for each disk. If you do not have custom weights in your existing rings, you can set the weight to the GiB capacity of the disk.

      The following example shows the OpenStackDataPlaneNodeSet CR for a data plane with three storage nodes. Each node is configured to use two disks in the nodeTemplate section. The first node edpm-swift-0 is configured to use a third disk in the nodes section:

      Example:

      - apiVersion: dataplane.openstack.org/v1beta1
        kind: OpenStackDataPlaneNodeSet
        metadata:
          name: openstack-edpm-ipam
          namespace: openstack
        spec:
          ...
          networkAttachments:
          - ctlplane
          - storage
          nodeTemplate:
            ansible:
              ansibleVars:
                edpm_swift_disks:
                - device: /dev/vdb
                  path: /srv/node/vdb
                  region: 0
                  weight: 4000
                  zone: 0
                - device: /dev/vdc
                  path: /srv/node/vdc
                  region: 0
                  weight: 4000
                  zone: 0
          nodes:
            edpm-swift-0:
              ansible:
                ansibleVars:
                  edpm_swift_disks:
                  - device: /dev/vdd
                    path: /srv/node/vdd
                    weight: 1000
              hostName: edpm-swift-0
              networks:
              - defaultRoute: true
                fixedIP: 192.168.122.100
                name: ctlplane
                subnetName: subnet1
              - name: internalapi
                subnetName: subnet1
              - name: storage
                subnetName: subnet1
              - name: tenant
                subnetName: subnet1
            edpm-swift-1:
              hostName: edpm-swift-1
              networks:
              - defaultRoute: true
                fixedIP: 192.168.122.101
                name: ctlplane
                subnetName: subnet1
              - name: internalapi
                subnetName: subnet1
              - name: storage
                subnetName: subnet1
              - name: tenant
                subnetName: subnet1
            edpm-swift-2:
              hostName: edpm-swift-2
              networks:
              - defaultRoute: true
                fixedIP: 192.168.122.102
                name: ctlplane
                subnetName: subnet1
              - name: internalapi
                subnetName: subnet1
              - name: storage
                subnetName: subnet1
              - name: tenant
                subnetName: subnet1
          ...
          services:
          - repo-setup
          - bootstrap
          - download-cache
          - configure-network
          - validate-network
          - install-os
          - configure-os
          - ssh-known-hosts
          - run-os
          - reboot-os
          - install-certs
          - swift

What to do next