Skip to content

Commit 5590d30

Browse files
committed
compute: creating generic compute var to allow customization
1 parent ff0a91a commit 5590d30

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

docs/guides/installing-agnostic-oci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ OCP_RELEASE_413="quay.io/openshift-release-dev/ocp-release:4.13.0-ec.4-x86_64"
160160
EOF
161161
source ~/.openshift/env
162162

163-
CLUSTER_NAME=oci-t12
163+
CLUSTER_NAME=oci-t13
164164
VAR_FILE=./vars-oci-ha_${CLUSTER_NAME}.yaml
165165

166166
cat <<EOF > ${VAR_FILE}
@@ -227,7 +227,7 @@ config_patches:
227227
- mc-kubelet-providerid
228228
#- platform-external-kcmo
229229
- deploy-oci-ccm
230-
- deploy-oci-csi
230+
#- deploy-oci-csi
231231
- yaml_patch # working for OCI, but need to know the path
232232
#- line_regex_patch # ideal, but not working as expected
233233

docs/guides/validate-cluster-with-opct.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
```bash
88
# Create OPCT node
99
ansible-playbook mtulio.okd_installer.create_node \
10-
-e node_role=opct \
10+
-e node_role=generic -e sufix=opct-01 -e cpu=4 -e mem=16 \
11+
-e subnet=private -e nsg=compute \
1112
-e @$VAR_FILE
1213
```
1314

@@ -16,11 +17,11 @@ ansible-playbook mtulio.okd_installer.create_node \
1617
```bash
1718

1819
# Set the OPCT requirements (registry, labels, wait-for COs stable)
19-
ansible-playbook ../opct/hack/opct-runner/opct-run-tool-preflight.yaml -e cluster_name=oci-t11 -D
20-
2120
oc label node opct-01.priv.ocp.oraclevcn.com node-role.kubernetes.io/tests=""
2221
oc adm taint node opct-01.priv.ocp.oraclevcn.com node-role.kubernetes.io/tests="":NoSchedule
2322

23+
ansible-playbook ../opct/hack/opct-runner/opct-run-tool-preflight.yaml -e cluster_name=oci-t11 -D
24+
2425
```
2526

2627
- OPCT regular

playbooks/vars/oci/profiles/ha/node-opct.yaml renamed to playbooks/vars/oci/profiles/ha/node-generic.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ compute_resources:
1616
image_compartment_id: "{{ oci_compartment_id_image | d(oci_compartment_id) }}"
1717

1818
# Network details
19-
vnic_subnet_name: "{{ cluster_state.infra_id }}-net-private"
19+
vnic_subnet_name: "{{ cluster_state.infra_id }}-net-{{ subnet | d('net-private') }}"
2020
network_security_group_names:
21-
- "{{ cluster_state.infra_id }}-nsg-compute"
21+
- "{{ cluster_state.infra_id }}-nsg-{{ nsg | d('nsg-compute') }}"
2222

2323
# OCI spec
2424
spec:
2525
state: present
2626
wait: yes
2727
compartment_id: "{{ oci_compartment_id }}"
28-
display_name: "{{ cluster_state.infra_id }}-opct-01"
28+
display_name: "{{ cluster_state.infra_id }}-{{ sufix | d ('generic-01') }}"
2929
region: "{{ config_cluster_region }}"
3030
#freeform_tags: {'Department': 'Finance'}
3131
#defined_tags: {'Operations': {'CostCenter': 'US'}}
@@ -36,8 +36,8 @@ compute_resources:
3636
# type: AMD_VM
3737
shape: "VM.Standard.E4.Flex"
3838
shape_config:
39-
ocpus: 4
40-
memory_in_gbs: 16
39+
ocpus: "{{ cpu | d(2) }}"
40+
memory_in_gbs: "{{ mem | d(8) }}"
4141
#baseline_ocpu_utilization: BASELINE_1_8
4242
#nvmes: 1
4343
agent_config:
@@ -49,9 +49,9 @@ compute_resources:
4949
boot_volume_vpus_per_gb: 20
5050

5151
create_vnic_details:
52-
display_name: "{{ cluster_state.infra_id }}-opct-01-vnic0"
52+
display_name: "{{ cluster_state.infra_id }}-{{ sufix | d ('generic-01') }}-vnic0"
5353
assign_public_ip: false
5454
assign_private_dns_record: true
55-
hostname_label: "opct-01"
55+
hostname_label: "{{ sufix | d ('generic-01') }}"
5656
metadata:
5757
user_data: "{{ lookup('file', _userdata_path) | b64encode }}"

0 commit comments

Comments
 (0)