|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * machine_management/creating-machinesets/creating-machineset-aws.adoc |
| 4 | +// * machine_management/control_plane_machine_management/cpmso-using.adoc |
| 5 | + |
| 6 | +ifeval::["{context}" == "cpmso-using"] |
| 7 | +:cpmso: |
| 8 | +endif::[] |
| 9 | + |
| 10 | +:_content-type: PROCEDURE |
| 11 | +[id="machineset-aws-existing-placement-group_{context}"] |
| 12 | += Assigning machines to placement groups for Elastic Fabric Adapter instances by using machine sets |
| 13 | + |
| 14 | +You can configure a machine set to deploy machines on link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html[Elastic Fabric Adapter] (EFA) instances within an existing AWS placement group. |
| 15 | + |
| 16 | +EFA instances do not require placement groups, and you can use placement groups for purposes other than configuring an EFA. This example uses both to demonstrate a configuration that can improve network performance for machines within the specified placement group. |
| 17 | + |
| 18 | +.Prerequisites |
| 19 | + |
| 20 | +* You created a placement group in the AWS console. |
| 21 | ++ |
| 22 | +[NOTE] |
| 23 | +==== |
| 24 | +Ensure that the link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html#limitations-placement-groups[rules and limitations] for the type of placement group that you create are compatible with your intended use case. |
| 25 | +ifdef::cpmso[] |
| 26 | +The control plane machine set spreads the control plane machines across multiple failure domains when possible. To use placement groups for the control plane, you must use a placement group type that can span multiple Availability Zones. |
| 27 | +endif::cpmso[] |
| 28 | +==== |
| 29 | +
|
| 30 | +.Procedure |
| 31 | + |
| 32 | +. In a text editor, open the YAML file for an existing machine set or create a new one. |
| 33 | + |
| 34 | +. Edit the following lines under the `providerSpec` field: |
| 35 | ++ |
| 36 | +[source,yaml] |
| 37 | +---- |
| 38 | +ifndef::cpmso[] |
| 39 | +apiVersion: machine.openshift.io/v1beta1 |
| 40 | +kind: MachineSet |
| 41 | +endif::cpmso[] |
| 42 | +ifdef::cpmso[] |
| 43 | +apiVersion: machine.openshift.io/v1 |
| 44 | +kind: ControlPlaneMachineSet |
| 45 | +endif::cpmso[] |
| 46 | +# ... |
| 47 | +spec: |
| 48 | + template: |
| 49 | + spec: |
| 50 | + providerSpec: |
| 51 | + value: |
| 52 | + instanceType: <supported_instance_type> # <1> |
| 53 | + networkInterfaceType: EFA # <2> |
| 54 | + placement: |
| 55 | + availabilityZone: <zone> # <3> |
| 56 | + region: <region> # <4> |
| 57 | + placementGroupName: <placement_group> # <5> |
| 58 | +# ... |
| 59 | +---- |
| 60 | +<1> Specify an instance type that link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html#efa-instance-types[supports EFAs]. |
| 61 | +<2> Specify the `EFA` network interface type. |
| 62 | +<3> Specify the zone, for example, `us-east-1a`. |
| 63 | +<4> Specify the region, for example, `us-east-1`. |
| 64 | +<5> Specify the name of the existing AWS placement group to deploy machines in. |
| 65 | + |
| 66 | +.Verification |
| 67 | + |
| 68 | +* In the AWS console, find a machine that the machine set created and verify the following in the machine properties: |
| 69 | +
|
| 70 | +** The placement group field has the value that you specified for the `placementGroupName` parameter in the machine set. |
| 71 | + |
| 72 | +** The interface type field indicates that it uses an EFA. |
| 73 | + |
| 74 | +ifeval::["{context}" == "cpmso-using"] |
| 75 | +:!cpmso: |
| 76 | +endif::[] |
0 commit comments