diff --git a/_topic_map.yml b/_topic_map.yml index 97171bea37..7c4e290583 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -986,6 +986,8 @@ Topics: File: creating-machineset-azure - Name: Creating a MachineSet on GCP File: creating-machineset-gcp + - Name: Creating a MachineSet on OpenStack + File: creating-machineset-osp - Name: Manually scaling a MachineSet File: manually-scaling-machineset - Name: Modifying a MachineSet diff --git a/machine_management/creating_machinesets/creating-machineset-osp.adoc b/machine_management/creating_machinesets/creating-machineset-osp.adoc new file mode 100644 index 0000000000..385b11922e --- /dev/null +++ b/machine_management/creating_machinesets/creating-machineset-osp.adoc @@ -0,0 +1,17 @@ +[id="creating-machineset-osp"] += Creating a MachineSet on OpenStack +include::modules/common-attributes.adoc[] +:context: creating-machineset-osp + +You can create a different MachineSet to serve a specific purpose in your +{product-title} cluster on {rh-openstack-first}. For example, you might +create infrastructure MachineSets and related Machines so that you can move +supporting workloads to the new Machines. + +toc::[] + +include::modules/machine-api-overview.adoc[leveloffset=+1] + +include::modules/machineset-yaml-osp.adoc[leveloffset=+1] + +include::modules/machineset-creating.adoc[leveloffset=+1] diff --git a/modules/machine-api-overview.adoc b/modules/machine-api-overview.adoc index f11a0000a5..afdddc8d32 100644 --- a/modules/machine-api-overview.adoc +++ b/modules/machine-api-overview.adoc @@ -3,6 +3,7 @@ // * machine_management/creating_machinesets/creating-machineset-aws.adoc // * machine_management/creating_machinesets/creating-machineset-azure.adoc // * machine_management/creating_machinesets/creating-machineset-gcp.adoc +// * machine_management/creating_machinesets/creating-machineset-osp.adoc [id="machine-api-overview_{context}"] = Machine API overview diff --git a/modules/machineset-creating.adoc b/modules/machineset-creating.adoc index 2a16aa15df..454945de67 100644 --- a/modules/machineset-creating.adoc +++ b/modules/machineset-creating.adoc @@ -4,6 +4,7 @@ // * machine_management/creating_machinesets/creating-machineset-aws.adoc // * machine_management/creating_machinesets/creating-machineset-azure.adoc // * machine_management/creating_machinesets/creating-machineset-gcp.adoc +// * machine_management/creating_machinesets/creating-machineset-osp.adoc [id="machineset-creating_{context}"] = Creating a MachineSet diff --git a/modules/machineset-yaml-osp.adoc b/modules/machineset-yaml-osp.adoc new file mode 100644 index 0000000000..b899a83fef --- /dev/null +++ b/modules/machineset-yaml-osp.adoc @@ -0,0 +1,79 @@ +// Module included in the following assemblies: +// +// * machine_management/creating-infrastructure-machinesets.adoc +// * machine_management/creating_machinesets/creating-machineset-osp.adoc + +[id="machineset-yaml-osp_{context}"] += Sample YAML for a MachineSet Custom Resource on {rh-openstack} + +This sample YAML defines a MachineSet that runs on +{rh-openstack-first} and creates nodes that are labeled with +`node-role.openshift.io/: ""` + +In this sample, `infrastructure_ID` is the infrastructure ID label that is +based on the cluster ID that you set when you provisioned +the cluster, and `node_role` is the node label to add. + +[source,yaml] +---- +apiVersion: machine.openshift.io/v1beta1 +kind: MachineSet +metadata: + labels: + machine.openshift.io/cluster-api-cluster: <1> + machine.openshift.io/cluster-api-machine-role: <2> + machine.openshift.io/cluster-api-machine-type: <2> + name: - <3> + namespace: openshift-machine-api +spec: + replicas: + selector: + matchLabels: + machine.openshift.io/cluster-api-cluster: <1> + machine.openshift.io/cluster-api-machineset: - <3> + template: + metadata: + labels: + machine.openshift.io/cluster-api-cluster: <1> + machine.openshift.io/cluster-api-machine-role: <2> + machine.openshift.io/cluster-api-machine-type: <2> + machine.openshift.io/cluster-api-machineset: - <3> + 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 <2> +---- +<1> Specify the infrastructure ID that is based on the cluster ID that +you set when you provisioned the cluster. If you have the OpenShift CLI and `jq` +package installed, you can obtain the infrastructure ID by running the following +command: ++ +---- +$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster +---- +<2> Specify the node label to add. +<3> Specify the infrastructure ID and node label.