|
| 1 | +:_mod-docs-content-type: PROCEDURE |
| 2 | +[id="converting-object-storage-nodes"] |
| 3 | + |
| 4 | += Converting {object_storage} storage nodes |
| 5 | + |
| 6 | +[role="_abstract"] |
| 7 | +If you used external {object_storage} storage nodes, you can convert these |
| 8 | +nodes after the initial {object_storage_first_ref} adoption is complete. This |
| 9 | +step reconfigures the nodes in-place while keeping the {object_storage} |
| 10 | +available throughout the process. |
| 11 | + |
| 12 | +Before you begin, review the following key concepts: |
| 13 | +Pre-provisioned nodes:: Setting `preProvisioned: true` in the |
| 14 | + `OpenStackDataPlaneNodeSet` custom resource (CR) skips provisioning the node from scratch and does not reinstall the operating system. |
| 15 | +{object_storage} disk and mount preservation:: `edpm_swift_disks: []` must be |
| 16 | + set in both the `nodeTemplate` and in the individual node definition under |
| 17 | + `nodes` to ensure that no disks are formatted or mounted differently. |
| 18 | + Existing disk mounts are untouched. The `SwiftRawDisks` parameter from |
| 19 | + {OpenStackPreviousInstaller} is not migrated or converted. Disks on |
| 20 | + converted nodes must be managed manually. |
| 21 | +Rolling conversion with multiple node sets:: In production, do not convert |
| 22 | + all {object_storage} nodes at once. Instead, create separate |
| 23 | + `OpenStackDataPlaneNodeSet` custom resources and deploy them sequentially. Align |
| 24 | + groups with ring zones or regions so that no more than one replica of any |
| 25 | + partition is affected during the conversion. |
| 26 | + |
| 27 | +.Prerequisites |
| 28 | + |
| 29 | +* The initial {object_storage} adoption is complete. For more information, see |
| 30 | + xref:adopting-the-object-storage-service_hsm-integration[Adopting the |
| 31 | + {object_storage}]. |
| 32 | + |
| 33 | +.Procedure |
| 34 | + |
| 35 | +. Create a `OpenStackDataPlaneService` custom resource (CR) to remove remaining |
| 36 | + {OpenStackPreviousInstaller} artifacts, such as containers, `systemd` units, and |
| 37 | + configuration, from the node: |
| 38 | ++ |
| 39 | +---- |
| 40 | +$ oc apply -f - <<EOF |
| 41 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 42 | +kind: OpenStackDataPlaneService |
| 43 | +metadata: |
| 44 | + name: tripleo-cleanup |
| 45 | + namespace: openstack |
| 46 | +spec: |
| 47 | + playbook: osp.edpm.tripleo_cleanup |
| 48 | +EOF |
| 49 | +---- |
| 50 | + |
| 51 | +ifeval::["{build}" == "upstream"] |
| 52 | +. Create a `OpenStackDataPlaneService` CR to configure RPM repositories on the node: |
| 53 | ++ |
| 54 | +---- |
| 55 | +$ oc apply -f - <<EOF |
| 56 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 57 | +kind: OpenStackDataPlaneService |
| 58 | +metadata: |
| 59 | + name: repo-setup |
| 60 | + namespace: openstack |
| 61 | +spec: |
| 62 | + addCertMounts: false |
| 63 | + caCerts: combined-ca-bundle |
| 64 | + edpmServiceType: repo-setup |
| 65 | + playbookContents: | |
| 66 | + - hosts: all |
| 67 | + strategy: linear |
| 68 | + tasks: |
| 69 | + - name: Enable podified-repos |
| 70 | + become: true |
| 71 | + ansible.builtin.shell: | |
| 72 | + # This needs rhos-release.rpm to be downloaded before or an |
| 73 | + # alternative way to use upstream repos |
| 74 | + dnf install -y /tmp/rhos-release.rpm |
| 75 | + rhos-release -x |
| 76 | + rhos-release 18.0 |
| 77 | +EOF |
| 78 | +---- |
| 79 | +endif::[] |
| 80 | + |
| 81 | +. Create the `OpenStackDataPlaneNodeSet` CR that defines which nodes to convert and how to configure them: |
| 82 | ++ |
| 83 | +[subs="+quotes"] |
| 84 | +---- |
| 85 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 86 | +kind: OpenStackDataPlaneNodeSet |
| 87 | +metadata: |
| 88 | + name: openstack-edpm-ipam |
| 89 | + namespace: openstack |
| 90 | +spec: |
| 91 | + networkAttachments: |
| 92 | + - ctlplane |
| 93 | + - storage |
| 94 | + nodeTemplate: |
| 95 | + ansible: |
| 96 | + ansibleUser: cloud-admin |
| 97 | + ansibleVars: |
| 98 | + edpm_nodes_validation_validate_controllers_icmp: false |
| 99 | + edpm_nodes_validation_validate_gateway_icmp: false |
| 100 | + edpm_service_removal_skip_list: |
| 101 | + - tripleo-container-shutdown.service |
| 102 | + edpm_sshd_allowed_ranges: |
| 103 | + - 192.168.122.0/24 |
| 104 | + edpm_swift_disks: [] |
| 105 | + enable_debug: false |
| 106 | + gather_facts: false |
| 107 | + timesync_ntp_servers: |
| 108 | + - hostname: pool.ntp.org |
| 109 | + ansibleSSHPrivateKeySecret: dataplane-adoption-secret |
| 110 | + managementNetwork: ctlplane |
| 111 | + nodes: |
| 112 | + edpm-swift-0: |
| 113 | + ansible: |
| 114 | + ansibleHost: 192.168.122.100 |
| 115 | +ifeval::["{build}" == "downstream"] |
| 116 | + ansibleVarsFrom: |
| 117 | + - secretRef: |
| 118 | + name: subscription-manager |
| 119 | + - secretRef: |
| 120 | + name: redhat-registry |
| 121 | +endif::[] |
| 122 | + ansibleVars: |
| 123 | + edpm_swift_disks: [] |
| 124 | +ifeval::["{build}" == "downstream"] |
| 125 | + rhc_release: 9.2 |
| 126 | + rhc_repositories: |
| 127 | + - {name: "*", state: disabled} |
| 128 | + - {name: "rhel-9-for-x86_64-baseos-eus-rpms", state: enabled} |
| 129 | + - {name: "rhel-9-for-x86_64-appstream-eus-rpms", state: enabled} |
| 130 | + - {name: "rhel-9-for-x86_64-highavailability-eus-rpms", state: enabled} |
| 131 | + - {name: "rhoso-18.0-for-rhel-9-x86_64-rpms", state: enabled} |
| 132 | +endif::[] |
| 133 | + hostName: edpm-swift-0 |
| 134 | + networks: |
| 135 | + - defaultRoute: true |
| 136 | + fixedIP: 192.168.122.100 |
| 137 | + name: ctlplane |
| 138 | + subnetName: subnet1 |
| 139 | + - name: internalapi |
| 140 | + subnetName: subnet2 |
| 141 | + - name: storage |
| 142 | + subnetName: subnet3 |
| 143 | + - name: tenant |
| 144 | + subnetName: subnet4 |
| 145 | + preProvisioned: true |
| 146 | + services: |
| 147 | +ifeval::["{build}" == "upstream"] |
| 148 | + - repo-setup |
| 149 | +endif::[] |
| 150 | + - bootstrap |
| 151 | + - download-cache |
| 152 | + - install-os |
| 153 | + - configure-os |
| 154 | + - ssh-known-hosts |
| 155 | + - run-os |
| 156 | + - reboot-os |
| 157 | + - install-certs |
| 158 | + - tripleo-cleanup |
| 159 | + - swift |
| 160 | + tlsEnabled: true |
| 161 | +---- |
| 162 | + |
| 163 | +. Apply the `OpenStackDataPlaneNodeSet` CR: |
| 164 | ++ |
| 165 | +---- |
| 166 | +$ oc apply -f nodeset.yaml |
| 167 | +---- |
| 168 | + |
| 169 | +. Create an `OpenStackDataPlaneDeployment` CR to trigger the Ansible pipeline on the node: |
| 170 | ++ |
| 171 | +---- |
| 172 | +$ oc apply -f - <<EOF |
| 173 | +apiVersion: dataplane.openstack.org/v1beta1 |
| 174 | +kind: OpenStackDataPlaneDeployment |
| 175 | +metadata: |
| 176 | + name: openstack-edpm-ipam |
| 177 | + namespace: openstack |
| 178 | +spec: |
| 179 | + nodeSets: |
| 180 | + - openstack-edpm-ipam |
| 181 | +EOF |
| 182 | +---- |
| 183 | + |
| 184 | +. Wait for the deployment to complete: |
| 185 | ++ |
| 186 | +---- |
| 187 | +$ oc wait --for condition=Ready openstackdataplanedeployment/openstack-edpm-ipam --timeout=30m |
| 188 | +---- |
| 189 | + |
| 190 | +.. Monitor the progress: |
| 191 | ++ |
| 192 | +---- |
| 193 | +$ watch oc get pod -l app=openstackansibleee |
| 194 | +---- |
| 195 | ++ |
| 196 | +---- |
| 197 | +$ oc logs -l app=openstackansibleee -f --max-log-requests 20 |
| 198 | +---- |
| 199 | + |
| 200 | +.Verification |
| 201 | + |
| 202 | +* Verify that the node set is ready: |
| 203 | ++ |
| 204 | +---- |
| 205 | +$ oc get openstackdataplanenodeset openstack-edpm-ipam |
| 206 | +---- |
| 207 | + |
| 208 | +* Verify that the Object Storage services are running on the converted node: |
| 209 | ++ |
| 210 | +---- |
| 211 | +$ ssh cloud-admin@192.168.122.100 "sudo systemctl status edpm_swift_*" |
| 212 | +---- |
0 commit comments