|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="migrating-br-ex-bridge-nmstate_{context}"] |
| 7 | += Migrating a configured br-ex bridge to NMState |
| 8 | + |
| 9 | +If you used the `configure-ovs.sh` shell script to set a `br-ex` bridge during cluster installation, you can migrate the `br-ex` bridge to NMState as a postinstallation task. NMState provides a declarative and idempotent way to handle configuring the `br-ex` bridge. |
| 10 | + |
| 11 | +[NOTE] |
| 12 | +==== |
| 13 | +The initial steps in the procedure do not show example configurations. For detailed example configurations that would represent objects to create during cluster installation, see the "Creating a manifest object that includes a customized br-ex bridge" link in the _Additional resources_ section. |
| 14 | +==== |
| 15 | + |
| 16 | +After you migrate your configured `br-ex` bridge to NMState, you cannot reverse the operation. This means that you cannot migrate back to the shell script version of the `br-ex` bridge. |
| 17 | + |
| 18 | +[IMPORTANT] |
| 19 | +==== |
| 20 | +Misconfiguring any files that form part of the migration operation can cause disruptive changes to your cluster. Reverting these changes might not always be possible. |
| 21 | +==== |
| 22 | + |
| 23 | +.Prerequisties |
| 24 | + |
| 25 | +* You used the `configure-ovs.sh` shell script to set a `br-ex` bridge for your cluster. |
| 26 | +
|
| 27 | +.Procedure |
| 28 | + |
| 29 | +. Create an NMState configuration file that has decoded base64 information for your customized `br-ex` bridge network. |
| 30 | + |
| 31 | +. Create a `MachineConfig` manifest file that has decoded base64 information and define a customized `br-ex` bridge network configuration in the file. |
| 32 | + |
| 33 | +. Use the `cat` command to base64-encode the contents of the `MachineConfig` manifest file: |
| 34 | ++ |
| 35 | +[source,terminal] |
| 36 | +---- |
| 37 | +$ cat <machine_config>.yaml | base64 <1> |
| 38 | +---- |
| 39 | +<1> Replace `<machine_config>` with the name of your NMState resource YAML file. |
| 40 | + |
| 41 | +. Apply the updates from the MachineConfig object to your cluster by entering the following command: |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +$ oc apply -f <machine_config>.yml |
| 46 | +---- |
| 47 | + |
| 48 | +. Create a bare `MachineConfig` object but do not make any configuration changes to the file. |
| 49 | + |
| 50 | +. Start a reboot operation by applying the bare `MachineConfig` object configuration to your cluster by entering the following command: |
| 51 | ++ |
| 52 | +[source,terminal] |
| 53 | +---- |
| 54 | +$ oc apply -f <bare_machine_config>.yml |
| 55 | +---- |
| 56 | + |
| 57 | +. Delete the bare `MachineConfig` object by entering the following command: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ oc delete machineconfig <machine_config_name> |
| 62 | +---- |
| 63 | + |
| 64 | +.Verification |
| 65 | + |
| 66 | +* Use the `nmstatectl` tool to check the configuration for the `br-ex` bridge interface by running the following command. The tool checks a node that runs the `br-ex` bridge interface and not the location where you deployed the `MachineConfig` objects. |
| 67 | ++ |
| 68 | +[source,terminal] |
| 69 | +---- |
| 70 | +$ sudo nmstatectl show br-ex |
| 71 | +---- |
0 commit comments