Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
134 changes: 134 additions & 0 deletions modules/installation-osp-deploying-bare-metal-machines.adoc
Original file line number Diff line number Diff line change
@@ -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: <bare_metal_control_plane_flavor> <1>
...

compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
openstack:
type: <bare_metal_compute_flavor> <2>
replicas: 3
...

platform:
openstack:
machinesSubnet: <subnet_UUID> <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::[]
93 changes: 93 additions & 0 deletions modules/machineset-osp-adding-bare-metal.adoc
Original file line number Diff line number Diff line change
@@ -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: <infrastructure_ID>
machine.openshift.io/cluster-api-machine-role: <node_role>
machine.openshift.io/cluster-api-machine-type: <node_role>
name: <infrastructure_ID>-<node_role>
namespace: openshift-machine-api
spec:
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_ID>
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role>
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_ID>
machine.openshift.io/cluster-api-machine-role: <node_role>
machine.openshift.io/cluster-api-machine-type: <node_role>
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role>
spec:
providerSpec:
value:
apiVersion: openstackproviderconfig.openshift.io/v1alpha1
cloudName: openstack
cloudsSecret:
name: openstack-cloud-credentials
namespace: openshift-machine-api
flavor: <nova_flavor>
image: <glance_image_name_or_location>
kind: OpenstackProviderSpec
networks:
- filter: {}
subnets:
- filter:
name: <subnet_name>
tags: openshiftClusterID=<infrastructure_ID>
securityGroups:
- filter: {}
name: <infrastructure_ID>-<node_role>
serverMetadata:
Name: <infrastructure_ID>-<node_role>
openshiftClusterID: <infrastructure_ID>
tags:
- openshiftClusterID=<infrastructure_ID>
trunk: true
userDataSecret:
name: <node_role>-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.