diff --git a/installing/installing_openstack/installing-openstack-installer-custom.adoc b/installing/installing_openstack/installing-openstack-installer-custom.adoc index 67341dccaefe..7b51b6225005 100644 --- a/installing/installing_openstack/installing-openstack-installer-custom.adoc +++ b/installing/installing_openstack/installing-openstack-installer-custom.adoc @@ -32,6 +32,7 @@ include::modules/installation-obtaining-installer.adoc[leveloffset=+1] include::modules/installation-initializing.adoc[leveloffset=+1] include::modules/installation-configuration-parameters.adoc[leveloffset=+1] include::modules/installation-osp-custom-subnet.adoc[leveloffset=+2] +include::modules/installation-osp-deploying-bare-metal-machines.adoc[leveloffset=+2] include::modules/installation-osp-config-yaml.adoc[leveloffset=+2] include::modules/ssh-agent-using.adoc[leveloffset=+1] include::modules/installation-osp-accessing-api.adoc[leveloffset=+1] diff --git a/installing/installing_openstack/installing-openstack-user.adoc b/installing/installing_openstack/installing-openstack-user.adoc index af5c35a6c5f9..5c6c1a9782cf 100644 --- a/installing/installing_openstack/installing-openstack-user.adoc +++ b/installing/installing_openstack/installing-openstack-user.adoc @@ -41,14 +41,18 @@ include::modules/installation-osp-accessing-api-no-floating.adoc[leveloffset=+2] include::modules/installation-osp-describing-cloud-parameters.adoc[leveloffset=+1] include::modules/installation-initializing.adoc[leveloffset=+1] include::modules/installation-configuration-parameters.adoc[leveloffset=+1] -include::modules/installation-osp-custom-subnet.adoc[leveloffset=+2] include::modules/installation-osp-config-yaml.adoc[leveloffset=+2] +include::modules/installation-osp-custom-subnet.adoc[leveloffset=+2] include::modules/installation-osp-fixing-subnet.adoc[leveloffset=+2] include::modules/installation-osp-emptying-worker-pools.adoc[leveloffset=+2] include::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+1] include::modules/installation-osp-converting-ignition-resources.adoc[leveloffset=+1] include::modules/installation-osp-creating-control-plane-ignition.adoc[leveloffset=+1] include::modules/installation-osp-creating-network-resources.adoc[leveloffset=+1] + +Optionally, you can use the the `inventory.yaml` file that you created to customize your installation. For example, you can deploy a cluster that uses bare metal machines. + +include::modules/installation-osp-deploying-bare-metal-machines.adoc[leveloffset=+2] include::modules/installation-osp-creating-bootstrap-machine.adoc[leveloffset=+1] include::modules/installation-osp-creating-control-plane.adoc[leveloffset=+1] include::modules/cli-logging-in-kubeadmin.adoc[leveloffset=+1] diff --git a/machine_management/creating_machinesets/creating-machineset-osp.adoc b/machine_management/creating_machinesets/creating-machineset-osp.adoc index 9476970d5e94..def10e2d4206 100644 --- a/machine_management/creating_machinesets/creating-machineset-osp.adoc +++ b/machine_management/creating_machinesets/creating-machineset-osp.adoc @@ -12,3 +12,6 @@ include::modules/machine-api-overview.adoc[leveloffset=+1] include::modules/machineset-yaml-osp.adoc[leveloffset=+1] include::modules/machineset-creating.adoc[leveloffset=+1] + +// Mothballed - re-add when available +// include::modules/machineset-osp-adding-bare-metal.adoc[leveloffset=+1] \ No newline at end of file diff --git a/modules/installation-osp-deploying-bare-metal-machines.adoc b/modules/installation-osp-deploying-bare-metal-machines.adoc new file mode 100644 index 000000000000..aca165da194e --- /dev/null +++ b/modules/installation-osp-deploying-bare-metal-machines.adoc @@ -0,0 +1,134 @@ +// Module included in the following assemblies: +// +// * installing/installing_openstack/installing-openstack-installer-custom.adoc +// * installing/installing_openstack/installing-openstack-user.adoc + +ifeval::["{context}" == "installing-openstack-installer-custom"] +:osp-ipi: +endif::[] + +[id="installation-osp-deploying-bare-metal-machines_{context}"] += Deploying a cluster with bare metal machines + +If you want your cluster to use bare metal machines, modify the +ifdef::osp-ipi[`install-config.yaml`] +ifndef::osp-ipi[`inventory.yaml`] +file. Your cluster can have both control plane and compute machines running on bare metal, or just compute machines. + +Bare-metal compute machines are not supported on clusters that use Kuryr. + +[NOTE] +==== +Be sure that your `install-config.yaml` file reflects whether the {rh-openstack} network that you use for bare metal workers supports floating IP addresses or not. + +==== + +.Prerequisites + +* The {rh-openstack} link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/bare_metal_provisioning/index[Bare Metal service (Ironic)] is enabled and accessible via the {rh-openstack} Compute API. + +* Bare metal is available as link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/bare_metal_provisioning/sect-configure#creating_the_bare_metal_flavor[a {rh-openstack} flavor]. + +* The {rh-openstack} network supports both VM and bare metal server attachment. + +* Your network configuration does not rely on a provider network. Provider networks are not supported. + +* If you want to deploy the machines on a pre-existing network, a {rh-openstack} subnet is provisioned. + +* If you want to deploy the machines on an installer-provisioned network, the {rh-openstack} Bare Metal service (Ironic) is able to listen for and interact with Preboot eXecution Environment (PXE) boot machines that run on tenant networks. + +ifdef::osp-ipi[] +* You created an `install-config.yaml` file as part of the {product-title} installation process. +endif::osp-ipi[] + +ifndef::osp-ipi[] +* You created an `inventory.yaml` file as part of the {product-title} installation process. +endif::osp-ipi[] + +.Procedure + +ifdef::osp-ipi[] +. In the `install-config.yaml` file, edit the flavors for machines: +.. If you want to use bare-metal control plane machines, change the value of `controlPlane.platform.openstack.type` to a bare metal flavor. +.. Change the value of `compute.platform.openstack.type` to a bare metal flavor. +.. If you want to deploy your machines on a pre-existing network, change the value of `platform.openstack.machinesSubnet` to the {rh-openstack} subnet UUID of the network. Control plane and compute machines must use the same subnet. ++ +.An example bare metal `install-config.yaml` file +[source,yaml] +---- +controlPlane: + platform: + openstack: + type: <1> +... + +compute: + - architecture: amd64 + hyperthreading: Enabled + name: worker + platform: + openstack: + type: <2> + replicas: 3 +... + +platform: + openstack: + machinesSubnet: <3> +... +---- +<1> If you want to have bare-metal control plane machines, change this value to a bare metal flavor. +<2> Change this value to a bare metal flavor to use for compute machines. +<3> If you want to use a pre-existing network, change this value to the UUID of the {rh-openstack} subnet. + + +Use the updated `install-config.yaml` file to complete the installation process. +The compute machines that are created during deployment use the flavor that you +added to the file. +endif::osp-ipi[] + +ifndef::osp-ipi[] +. In the `inventory.yaml` file, edit the flavors for machines: +.. If you want to use bare-metal control plane machines, change the value of `os_flavor_master` to a bare metal flavor. +.. Change the value of `os_flavor_worker` to a bare metal flavor. ++ +.An example bare metal `inventory.yaml` file +[source,yaml] +---- +all: + hosts: + localhost: + ansible_connection: local + ansible_python_interpreter: "{{ansible_playbook_python}}" + + # User-provided values + os_subnet_range: '10.0.0.0/16' + os_flavor_master: 'my-bare-metal-flavor' <1> + os_flavor_worker: 'my-bare-metal-flavor' <2> + os_image_rhcos: 'rhcos' + os_external_network: 'external' +... +---- +<1> If you want to have bare-metal control plane machines, change this value to a bare metal flavor. +<2> Change this value to a bare metal flavor to use for compute machines. + +Use the updated `inventory.yaml` file to complete the installation process. +Machines that are created during deployment use the flavor that you +added to the file. +endif::osp-ipi[] + +[NOTE] +==== +The installer may time out while waiting for bare metal machines to boot. + +If the installer times out, restart and then complete the deployment by using the `wait-for` command of the installer. For example: + +[source,terminal] +---- +./openshift-install wait-for install-complete --log-level debug +---- +==== + +ifeval::["{context}" == "installing-openstack-installer-custom"] +:!osp-ipi: +endif::[] diff --git a/modules/machineset-osp-adding-bare-metal.adoc b/modules/machineset-osp-adding-bare-metal.adoc new file mode 100644 index 000000000000..fb66a98eb577 --- /dev/null +++ b/modules/machineset-osp-adding-bare-metal.adoc @@ -0,0 +1,93 @@ +[id="machineset-osp-adding-bare-metal_{context}"] += Adding bare-metal compute machines to a {rh-openstack} cluster +// TODO +// Mothballed +// Reintroduce when feature is available. +You can add bare-metal compute machines to an {product-title} cluster after you deploy it +on {rh-openstack-first}. In this configuration, all machines are attached to an +existing, installer-provisioned network, and traffic between control plane and +compute machines is routed between subnets. + +[NOTE] +==== +Bare-metal compute machines are not supported on clusters that use Kuryr. +==== + +.Prerequisites + +* The {rh-openstack} link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/bare_metal_provisioning/index[Bare Metal service (Ironic)] is enabled and accessible by using the {rh-openstack} Compute API. + +* Bare metal is available as link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html/bare_metal_provisioning/sect-configure#creating_the_bare_metal_flavor[an {rh-openstack} flavor]. + +* You deployed a {product-title} cluster on installer-provisioned infrastructure. + +* Your {rh-openstack} cloud provider is configured to route traffic between the installer-created VM +subnet and the pre-existing bare metal subnet. + +.Procedure +. Create a file called `baremetalMachineSet.yaml`, and then add the bare metal flavor to it: ++ +FIXME: May require update before publication. +.A sample bare metal MachineSet file +[source,yaml] +---- +apiVersion: machine.openshift.io/v1beta1 +kind: MachineSet +metadata: + labels: + machine.openshift.io/cluster-api-cluster: + machine.openshift.io/cluster-api-machine-role: + machine.openshift.io/cluster-api-machine-type: + name: - + namespace: openshift-machine-api +spec: + replicas: + selector: + matchLabels: + machine.openshift.io/cluster-api-cluster: + machine.openshift.io/cluster-api-machineset: - + template: + metadata: + labels: + machine.openshift.io/cluster-api-cluster: + machine.openshift.io/cluster-api-machine-role: + machine.openshift.io/cluster-api-machine-type: + machine.openshift.io/cluster-api-machineset: - + spec: + providerSpec: + value: + apiVersion: openstackproviderconfig.openshift.io/v1alpha1 + cloudName: openstack + cloudsSecret: + name: openstack-cloud-credentials + namespace: openshift-machine-api + flavor: + image: + kind: OpenstackProviderSpec + networks: + - filter: {} + subnets: + - filter: + name: + tags: openshiftClusterID= + securityGroups: + - filter: {} + name: - + serverMetadata: + Name: - + openshiftClusterID: + tags: + - openshiftClusterID= + trunk: true + userDataSecret: + name: -user-data +---- + +. On a command line, to create the MachineSet resource, type: ++ +[source,terminal] +---- +oc create -v baremetalMachineSet.yaml +---- + +You can now use bare-metal compute machines in your {product-title} cluster.