@@ -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
264266EOF
265267
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}")
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`
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"'`
0 commit comments