mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
Add OSP MachineSet docs - BZ1822065
Change should be followed up as per discussion in openshift-docs PR #21896
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
5078c5b91f
commit
f5160f469f
@@ -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
|
||||
|
||||
@@ -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]
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
79
modules/machineset-yaml-osp.adoc
Normal file
79
modules/machineset-yaml-osp.adoc
Normal file
@@ -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/<node_role>: ""`
|
||||
|
||||
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: <infrastructure_ID> <1>
|
||||
machine.openshift.io/cluster-api-machine-role: <node_role> <2>
|
||||
machine.openshift.io/cluster-api-machine-type: <node_role> <2>
|
||||
name: <infrastructure_ID>-<node_role> <3>
|
||||
namespace: openshift-machine-api
|
||||
spec:
|
||||
replicas: <number_of_replicas>
|
||||
selector:
|
||||
matchLabels:
|
||||
machine.openshift.io/cluster-api-cluster: <infrastructure_ID> <1>
|
||||
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role> <3>
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
machine.openshift.io/cluster-api-cluster: <infrastructure_ID> <1>
|
||||
machine.openshift.io/cluster-api-machine-role: <node_role> <2>
|
||||
machine.openshift.io/cluster-api-machine-type: <node_role> <2>
|
||||
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role> <3>
|
||||
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 <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.
|
||||
Reference in New Issue
Block a user