@@ -31,7 +31,8 @@ pipeline {
31
31
weblogick8s_tenancy_ocid = 'WK8_TENANCY_OCID'
32
32
weblogick8s_qa_compartment_ocid = 'WK8_QA_COMP_OCID'
33
33
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'
35
36
36
37
OKE_CLUSTER='true'
37
38
@@ -205,7 +206,7 @@ pipeline {
205
206
TENANCY_OCID = credentials("${weblogick8s_tenancy_ocid}")
206
207
COMPARTMENT_OCID = credentials("${weblogick8s_qa_compartment_ocid}")
207
208
USER_OCID = credentials("${wkobuild_user_ocid}")
208
- WKOBUILD_PUBLIC_CERT = credentials("${wkobuild_public_cert }")
209
+ WKOBUILD_PUBLIC_CERT = credentials("${wko_oke_test_sshpubcert }")
209
210
}
210
211
steps {
211
212
withCredentials([file(credentialsId: 'oci_pk_file', variable: 'oci_private_key')]) {
@@ -239,6 +240,7 @@ pipeline {
239
240
240
241
#export IMAGE_TAG_WEBLOGIC="12.2.1.4"
241
242
#export IMAGE_TAG_FMWINFRA="12.2.1.4"
243
+ ssh_pubkey=`cat ${WKOBUILD_PUBLIC_CERT}`
242
244
243
245
#################
244
246
echo "Generating property file oci.prop for terraform scripts"
@@ -259,7 +261,7 @@ pipeline {
259
261
nodepool.shape=${NODE_SHAPE}
260
262
nodepool.imagename=${IMAGE_ID}
261
263
k8s.version=v${KUBE_VERSION}
262
- nodepool.ssh.pubkey=${WKOBUILD_PUBLIC_CERT }
264
+ nodepool.ssh.pubkey=${ssh_pubkey }
263
265
terraform.installdir=${WORKSPACE}/terraform/terraforminstall
264
266
EOF
265
267
424
426
OCIR_USERNAME = credentials("${ocir_username_creds}")
425
427
OCIR_PASSWORD = credentials("${ocir_password_creds}")
426
428
OCIR_EMAIL = credentials("${ocir_email_creds}")
429
+ OKE_SSH_PRIVATE_KEY = credentials("${oke_test_ssh_pk}")
427
430
BASE_IMAGES_REPO_USERNAME = credentials("${ocir_username_creds}")
428
431
BASE_IMAGES_REPO_PASSWORD = credentials("${ocir_password_creds}")
429
432
BASE_IMAGES_REPO_EMAIL = credentials("${ocir_email_creds}")
444
447
export OCI_CLI_CONFIG_FILE=${WORKSPACE}/oci/config
445
448
export OCI_CLI_PROFILE=WKOBUILD
446
449
mkdir -m777 -p "${WORKSPACE}/.mvn"
450
+ cp ${OKE_SSH_PRIVATE_KEY} ${WORKSPACE}/rsaokepk
451
+ chmod 600 ${WORKSPACE}/rsaokepk
447
452
touch ${WORKSPACE}/.mvn/maven.config
448
453
export KUBECONFIG=${kubeconfig_file}
449
454
NODE_IP=`kubectl get nodes -o wide| awk '{print $7}'| tail -n+3`
457
462
NODE_IP=`kubectl get nodes -o wide| awk '{print $7}'| head -n2 | tail -n1`
458
463
echo "second node external IP ${NODE_IP}"
459
464
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'
460
468
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"[]'`
461
469
462
470
mt_private_ip=`oci network private-ip get --private-ip-id "${mt_privateip_id}" | jq -r '.data | ."ip-address"'`
0 commit comments