// This is included in the following assemblies:
//
// bare-metal-postinstallation-configuration.adoc

:_mod-docs-content-type: PROCEDURE
[id="enabling-a-provisioning-network-after-installation_{context}"]

= Enabling a provisioning network after installation

[role="_abstract"]
The {ai-full} and installer-provisioned installation for bare-metal clusters provide the ability to deploy a cluster without a `provisioning` network. This capability is for scenarios such as proof-of-concept clusters or deploying exclusively with Redfish virtual media when each node's baseboard management controller is routable via the `bare-metal` network.

You can enable a `provisioning` network after installation using the Cluster Baremetal Operator (CBO).

.Prerequisites

* A dedicated physical network must exist, connected to all worker and control plane nodes.
* You must isolate the native, untagged physical network.
* The network cannot have a DHCP server when the `provisioningNetwork` configuration setting is set to `Managed`.
* You can omit the `provisioningInterface` setting in {product-title} 4.10 to use the `bootMACAddress` configuration setting.

.Procedure

. When setting the `provisioningInterface` setting, first identify the provisioning interface name for the cluster nodes. For example, `eth0` or `eno1`.

. Enable the Preboot eXecution Environment (PXE) on the `provisioning` network interface of the cluster nodes.

. Retrieve the current state of the `provisioning` network and save it to a provisioning custom resource (CR) file:
+
[source,terminal]
----
$ oc get provisioning -o yaml > enable-provisioning-nw.yaml
----

. Modify the provisioning CR file:
+
[source,terminal]
----
$ vim ~/enable-provisioning-nw.yaml
----
+
Scroll down to the `provisioningNetwork` configuration setting and change it from `Disabled` to `Managed`. Then, add the `provisioningIP`, `provisioningNetworkCIDR`, `provisioningDHCPRange`, `provisioningInterface`, and `watchAllNameSpaces` configuration settings after the `provisioningNetwork` setting. Provide appropriate values for each setting.
+
[source,yaml]
----
apiVersion: v1
items:
- apiVersion: metal3.io/v1alpha1
  kind: Provisioning
  metadata:
    name: provisioning-configuration
  spec:
    provisioningNetwork:
    provisioningIP:
    provisioningNetworkCIDR:
    provisioningDHCPRange:
    provisioningInterface:
    watchAllNameSpaces:
----
+
where:
+
--
`items.spec.provisioningNetwork:`:: Specifies the provisioning network type: `Managed`, `Unmanaged`, or `Disabled`. When set to `Managed`, Metal3 manages the provisioning network and the CBO deploys the Metal3 pod with a configured DHCP server. When set to `Unmanaged`, the system administrator configures the DHCP server manually.
`items.spec.provisioningIP:`:: Specifies the static IP address that the DHCP server and ironic use to provision the network. This static IP address must be within the `provisioning` subnet, and outside of the DHCP range. If you configure this setting, it must have a valid IP address even if the `provisioning` network is `Disabled`. The static IP address is bound to the metal3 pod. If the metal3 pod fails and moves to another server, the static IP address also moves to the new server.
`items.spec.provisioningNetworkCIDR:`:: Specifies the Classless Inter-Domain Routing (CIDR) address. If you configure this setting, it must have a valid CIDR address even if the `provisioning` network is `Disabled`. For example: `192.168.0.1/24`.
`items.spec.provisioningDHCPRange:`:: Specifies the DHCP range. This setting is only applicable to a `Managed` provisioning network. Omit this configuration setting if the `provisioning` network is `Disabled`. For example: `192.168.0.64, 192.168.0.253`.
`items.spec.provisioningInterface:`:: Specifies the NIC name for the `provisioning` interface on cluster nodes. The `provisioningInterface` setting is only applicable to `Managed` and `Unmanaged` provisioning networks. Omit the `provisioningInterface` configuration setting if the `provisioning` network is `Disabled`. Omit the `provisioningInterface` configuration setting to use the `bootMACAddress` configuration setting instead.
`items.spec.watchAllNameSpaces:`:: Specifies whether metal3 watches namespaces other than the default `openshift-machine-api` namespace. Set to `true` to watch all namespaces. The default value is `false`.
--

. Save the changes to the provisioning CR file.

. Apply the provisioning CR file to the cluster:
+
[source,terminal]
----
$ oc apply -f enable-provisioning-nw.yaml
----
