Skip to content

Commit f59e3b5

Browse files
gparvinopenshift-merge-bot[bot]
authored andcommitted
Increase memory and CPU so OPP products will install on vmware
The attempt to install OPP failed because more CPU and Memory was needed. Increasing vmware resources to match what AWS uses. The adjustments to the configmap usage had to be re-organized too, since the configmap needs to exist ahead of time to resolve the template values. Referenced bug: - https://issues.redhat.com/browse/OCPQE-21328 Signed-off-by: Gus Parvin <[email protected]>
1 parent 160924e commit f59e3b5

File tree

3 files changed

+51
-36
lines changed

3 files changed

+51
-36
lines changed

policygenerator/policy-sets/community/openshift-plus-setup/machine-sets.yaml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# This manifest creates 3 OpenShift MachineSets that are intended for installing OpenShift Cluster Storage on AWS.
1+
# This manifest creates storage nodes necessary for installing OPP on an AWS or VMWare OpenShift cluster.
2+
# - AWS creates 2 replicas in each of 3 zones.
3+
# - VMWare creates 6 replicas
4+
# Review the content of the machine sets to determine if you need to make customizations.
25
#
36
# More details on installing OCS including the creation of the MachineSets is located here:
47
# https://red-hat-storage.github.io/ocs-training/training/ocs4/ocs.html#_scale_ocp_cluster_and_add_new_worker_nodes
58
#
69
# This policy contains an Amazon Machine Identifier which must be updated in the policy. Obtain the AMI id from:
710
# https://access.redhat.com/documentation/en-us/openshift_container_platform/4.12/html/installing/installing-on-aws#installation-aws-user-infra-rhcos-ami_installing-aws-user-infra
11+
# AMI IDs are provided in a settings configmap which can be adjusted as desired.
812
#
913
apiVersion: policy.open-cluster-management.io/v1
1014
kind: ConfigurationPolicy
@@ -15,30 +19,6 @@ spec:
1519
severity: low
1620
object-templates-raw: |
1721
{{- if (eq (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type "AWS") }}
18-
- complianceType: musthave
19-
objectDefinition:
20-
apiVersion: v1
21-
data:
22-
us-east-1-4.16: ami-057df4d0cb8cbae0d
23-
us-east-2-4.16: ami-0f736c64d5751d7d3
24-
us-east-1-4.15: ami-0b56cb92505dea7ed
25-
us-east-2-4.15: ami-0b577c67f5371f6d1
26-
us-east-1-4.14: ami-0b56cb92505dea7ed
27-
us-east-2-4.14: ami-0dc6c4d1bd5161f13
28-
us-east-1-4.13: ami-0624891c612b5eaa0
29-
us-east-2-4.13: ami-0dc6c4d1bd5161f13
30-
us-east-1-4.12: ami-0fe05b1aa8dacfa90
31-
us-east-2-4.12: ami-0ff64f495c7e977cf
32-
us-east-1-4.11: ami-0722eb0819717090f
33-
us-east-2-4.11: ami-026e5701f495c94a2
34-
us-east-1-4.10: ami-0c72f473496a7b1c2
35-
us-east-2-4.10: ami-09e637fc5885c13cc
36-
replicas: "2"
37-
instanceType: m6a.2xlarge
38-
kind: ConfigMap
39-
metadata:
40-
name: aws-ocp-ami-ids
41-
namespace: policies
4222
{{- range $i, $zone := list "a" "b" "c" }}
4323
- complianceType: musthave
4424
objectDefinition:
@@ -52,7 +32,7 @@ spec:
5232
name: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-workerocs-{{ list (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region $zone | join "" }}
5333
namespace: openshift-machine-api
5434
spec:
55-
replicas: '{{ fromConfigMap "policies" "aws-ocp-ami-ids" "replicas" | toInt }}'
35+
replicas: '{{ fromConfigMap "policies" "opp-settings" "awsReplicas" | toInt }}'
5636
selector:
5737
matchLabels:
5838
machine.openshift.io/cluster-api-cluster: '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}'
@@ -72,7 +52,7 @@ spec:
7252
providerSpec:
7353
value:
7454
ami:
75-
id: '{{ fromConfigMap "policies" "aws-ocp-ami-ids" (printf "%s-%s" (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region (fromClusterClaim "openshiftversion-major-minor")) }}'
55+
id: '{{ fromConfigMap "policies" "opp-settings" (printf "%s-%s" (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.platformStatus.aws.region (fromClusterClaim "openshiftversion-major-minor")) }}'
7656
apiVersion: awsproviderconfig.openshift.io/v1beta1
7757
blockDevices:
7858
- ebs:
@@ -84,7 +64,7 @@ spec:
8464
deviceIndex: 0
8565
iamInstanceProfile:
8666
id: '{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-worker-profile'
87-
instanceType: '{{ fromConfigMap "policies" "aws-ocp-ami-ids" "instanceType" }}'
67+
instanceType: '{{ fromConfigMap "policies" "opp-settings" "awsInstanceType" }}'
8868
kind: AWSMachineProviderConfig
8969
metadata:
9070
creationTimestamp: null
@@ -115,14 +95,14 @@ spec:
11595
kind: MachineSet
11696
metadata:
11797
annotations:
118-
machine.openshift.io/memoryMb: "16384"
119-
machine.openshift.io/vCPU: "4"
98+
machine.openshift.io/memoryMb: '{{ fromConfigMap "policies" "opp-settings" "vmwareMemory" }}'
99+
machine.openshift.io/vCPU: '{{ fromConfigMap "policies" "opp-settings" "vmwareCPU" }}'
120100
labels:
121101
machine.openshift.io/cluster-api-cluster: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}
122102
name: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-storage
123103
namespace: openshift-machine-api
124104
spec:
125-
replicas: 6
105+
replicas: '{{ fromConfigMap "policies" "opp-settings" "vmwareReplicas" | toInt }}'
126106
selector:
127107
matchLabels:
128108
machine.openshift.io/cluster-api-cluster: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}
@@ -146,13 +126,13 @@ spec:
146126
name: vsphere-cloud-credentials
147127
diskGiB: 120
148128
kind: VSphereMachineProviderSpec
149-
memoryMiB: 16384
129+
memoryMiB: '{{ fromConfigMap "policies" "opp-settings" "vmwareMemory" | toInt }}'
150130
metadata:
151131
creationTimestamp: null
152132
network:
153133
devices:
154134
- networkName: {{ (index (index (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.vsphere.failureDomains 0).topology.networks 0) }}
155-
numCPUs: 4
135+
numCPUs: '{{ fromConfigMap "policies" "opp-settings" "vmwareCPU" | toInt }}'
156136
numCoresPerSocket: 4
157137
snapshot: ""
158138
template: {{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").status.infrastructureName }}-rhcos-generated-region-generated-zone
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: opp-settings
5+
namespace: policies
6+
data:
7+
vmwareReplicas: "6"
8+
vmwareCPU: "8"
9+
vmwareMemory: "32768"
10+
awsReplicas: "2"
11+
awsInstanceType: m6a.2xlarge
12+
us-east-1-4.10: ami-0c72f473496a7b1c2
13+
us-east-1-4.11: ami-0722eb0819717090f
14+
us-east-1-4.12: ami-0fe05b1aa8dacfa90
15+
us-east-1-4.13: ami-0624891c612b5eaa0
16+
us-east-1-4.14: ami-0b56cb92505dea7ed
17+
us-east-1-4.15: ami-0b56cb92505dea7ed
18+
us-east-1-4.16: ami-057df4d0cb8cbae0d
19+
us-east-2-4.10: ami-09e637fc5885c13cc
20+
us-east-2-4.11: ami-026e5701f495c94a2
21+
us-east-2-4.12: ami-0ff64f495c7e977cf
22+
us-east-2-4.13: ami-0dc6c4d1bd5161f13
23+
us-east-2-4.14: ami-0dc6c4d1bd5161f13
24+
us-east-2-4.15: ami-0b577c67f5371f6d1
25+
us-east-2-4.16: ami-0f736c64d5751d7d3
26+
zone1: a
27+
zone2: b
28+
zone3: c

policygenerator/policy-sets/community/openshift-plus-setup/policyGenerator.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,21 @@ policies:
2020
- name: policy-opp-prereq-ns
2121
manifests:
2222
- path: namespace.yaml
23-
- name: policy-opp-prereq-machines
24-
manifests:
25-
- path: machine-sets.yaml
2623
- name: policy-opp-prereq-binding
2724
dependencies:
2825
- name: policy-opp-prereq-ns
2926
manifests:
3027
- path: managedclustersetbinding.yaml
28+
- name: policy-opp-settings
29+
dependencies:
30+
- name: policy-opp-prereq-ns
31+
manifests:
32+
- path: opp-settings.yaml
33+
- name: policy-opp-prereq-machines
34+
dependencies:
35+
- name: policy-opp-settings
36+
manifests:
37+
- path: machine-sets.yaml
3138
policySets:
3239
- description: Applies the OpenShift Plus prerequisites to the ACM hub cluster
3340
name: openshift-plus-prereqs

0 commit comments

Comments
 (0)