Skip to content

Commit 7257d59

Browse files
authored
Increased boot volume for OKE nodes to 200G to avoid memory issues in OKE runs (#4085)
* Increased boot volume for OKE nodes to 200G to avoid memory issues in OKE runs
1 parent b3b447e commit 7257d59

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Jenkinsfile.oke

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ pipeline {
3131
weblogick8s_tenancy_ocid = 'WK8_TENANCY_OCID'
3232
weblogick8s_qa_compartment_ocid = 'WK8_QA_COMP_OCID'
3333
wkobuild_user_ocid = 'WKOBUILD_USER_OCID'
34-
wkobuild_public_cert = 'WKOBUILD_PUBLIC_CERT'
34+
wko_oke_test_sshpubcert = 'OKE_PUB_CERT'
35+
oke_test_ssh_pk = 'oke_test_ssh_pk'
3536

3637
OKE_CLUSTER='true'
3738

@@ -205,7 +206,7 @@ pipeline {
205206
TENANCY_OCID = credentials("${weblogick8s_tenancy_ocid}")
206207
COMPARTMENT_OCID = credentials("${weblogick8s_qa_compartment_ocid}")
207208
USER_OCID = credentials("${wkobuild_user_ocid}")
208-
WKOBUILD_PUBLIC_CERT = credentials("${wkobuild_public_cert}")
209+
WKOBUILD_PUBLIC_CERT = credentials("${wko_oke_test_sshpubcert}")
209210
}
210211
steps {
211212
withCredentials([file(credentialsId: 'oci_pk_file', variable: 'oci_private_key')]) {
@@ -239,6 +240,7 @@ pipeline {
239240

240241
#export IMAGE_TAG_WEBLOGIC="12.2.1.4"
241242
#export IMAGE_TAG_FMWINFRA="12.2.1.4"
243+
ssh_pubkey=`cat ${WKOBUILD_PUBLIC_CERT}`
242244

243245
#################
244246
echo "Generating property file oci.prop for terraform scripts"
@@ -259,7 +261,7 @@ pipeline {
259261
nodepool.shape=${NODE_SHAPE}
260262
nodepool.imagename=${IMAGE_ID}
261263
k8s.version=v${KUBE_VERSION}
262-
nodepool.ssh.pubkey=${WKOBUILD_PUBLIC_CERT}
264+
nodepool.ssh.pubkey=${ssh_pubkey}
263265
terraform.installdir=${WORKSPACE}/terraform/terraforminstall
264266
EOF
265267

@@ -424,6 +426,7 @@ EOF
424426
OCIR_USERNAME = credentials("${ocir_username_creds}")
425427
OCIR_PASSWORD = credentials("${ocir_password_creds}")
426428
OCIR_EMAIL = credentials("${ocir_email_creds}")
429+
OKE_SSH_PRIVATE_KEY = credentials("${oke_test_ssh_pk}")
427430
BASE_IMAGES_REPO_USERNAME = credentials("${ocir_username_creds}")
428431
BASE_IMAGES_REPO_PASSWORD = credentials("${ocir_password_creds}")
429432
BASE_IMAGES_REPO_EMAIL = credentials("${ocir_email_creds}")
@@ -444,6 +447,8 @@ EOF
444447
export OCI_CLI_CONFIG_FILE=${WORKSPACE}/oci/config
445448
export OCI_CLI_PROFILE=WKOBUILD
446449
mkdir -m777 -p "${WORKSPACE}/.mvn"
450+
cp ${OKE_SSH_PRIVATE_KEY} ${WORKSPACE}/rsaokepk
451+
chmod 600 ${WORKSPACE}/rsaokepk
447452
touch ${WORKSPACE}/.mvn/maven.config
448453
export KUBECONFIG=${kubeconfig_file}
449454
NODE_IP=`kubectl get nodes -o wide| awk '{print $7}'| tail -n+3`
@@ -457,6 +462,9 @@ EOF
457462
NODE_IP=`kubectl get nodes -o wide| awk '{print $7}'| head -n2 | tail -n1`
458463
echo "second node external IP ${NODE_IP}"
459464
export NODE_IP=${NODE_IP}
465+
echo "expand disk volume for nodes"
466+
ssh -o StrictHostKeyChecking=no -i ${WORKSPACE}/rsaokepk opc@${K8S_NODEPORT_HOST} 'sudo /usr/libexec/oci-growfs -y'
467+
ssh -o StrictHostKeyChecking=no -i ${WORKSPACE}/rsaokepk opc@${NODE_IP} 'sudo /usr/libexec/oci-growfs -y'
460468
mt_privateip_id=`oci fs mount-target list --compartment-id=${compartment_ocid} --display-name=${clusterName}-mt --availability-domain=${availability_domain} | jq -r '.data[] | ."private-ip-ids"[]'`
461469

462470
mt_private_ip=`oci network private-ip get --private-ip-id "${mt_privateip_id}" | jq -r '.data | ."ip-address"'`

integration-tests/src/test/resources/oke/terraform/node-pool.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ resource "oci_containerengine_node_pool" "tfsample_node_pool" {
2727
node_source_details {
2828
image_id = var.node_pool_node_image_name
2929
source_type = "image"
30+
boot_volume_size_in_gbs = "200"
3031
}
3132

3233
# Optional

0 commit comments

Comments
 (0)