Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MULTIARCH-4642: Enabling HCP with IBMZ workflow in 4.16 periodic job runs #51493

Merged
merged 16 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ tests:
MCE_VERSION: "2.4"
workflow: hypershift-mce-power-conformance
- as: e2e-mce-ibmz-conformance
cron: 0 4 * * *
cron: 0 0 * * *
steps:
cluster_profile: aws
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ tests:
LVM_OPERATOR_SUB_CHANNEL: stable-4.15
ODF_OPERATOR_SUB_CHANNEL: stable-4.14
workflow: hypershift-kubevirt-baremetalds-disconnected-conformance
- as: e2e-mce-ibmz-conformance
cron: 0 8 * * *
steps:
cluster_profile: aws
env:
MCE_VERSION: "2.6"
workflow: hypershift-mce-ibmz-conformance
- as: e2e-kubevirt-aws-csi
cron: 0 4 * * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ periodics:
secretName: result-aggregator
- agent: kubernetes
cluster: build03
cron: 0 4 * * *
cron: 0 0 * * *
decorate: true
decoration_config:
skip_cloning: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,87 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build03
cron: 0 8 * * *
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.16
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: aws
ci-operator.openshift.io/cloud-cluster-profile: aws
ci-operator.openshift.io/variant: periodics
ci.openshift.io/generator: prowgen
job-release: "4.16"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-mce-ibmz-conformance
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --secret-dir=/usr/local/e2e-mce-ibmz-conformance-cluster-profile
- --target=e2e-mce-ibmz-conformance
- --variant=periodics
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /usr/local/e2e-mce-ibmz-conformance-cluster-profile
name: cluster-profile
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: cluster-profile
secret:
secretName: cluster-secrets-aws
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build03
cron: 0 6 * * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,32 +257,33 @@ chmod 0600 ${tmp_ssh_key}
ssh_options=(-o 'PreferredAuthentications=publickey' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -o 'ServerAliveInterval=60' -i "${tmp_ssh_key}")
echo "Downloading the rootfs image locally and transferring to HTTPD server"
curl -k -L --output $HOME/rootfs.img "$rootfs_url"
scp "${ssh_options[@]}" $HOME/rootfs.img root@$httpd_vsi_ip:/var/www/html/rootfs.img
ssh "${ssh_options[@]}" root@$httpd_vsi_ip "chmod 644 /var/www/html/rootfs.img"
scp "${ssh_options[@]}" $HOME/rootfs.img root@$httpd_vsi_ip:/var/www/html/rootfs-$PROW_JOB_ID.img
ssh "${ssh_options[@]}" root@$httpd_vsi_ip "chmod 644 /var/www/html/rootfs-$PROW_JOB_ID.img"
echo "Downloading the setup script for pxeboot of agents"
curl -k -L --output $HOME/setup_pxeboot.sh "http://$httpd_vsi_ip:80/setup_pxeboot.sh"
curl -k -L --output $HOME/trigger_pxeboot.sh "http://$httpd_vsi_ip:80/trigger_pxeboot.sh"
minitrd_url="${initrd_url//&/\\&}" # Escaping & while replacing the URL
export minitrd_url
mkernel_url="${kernel_url//&/\\&}" # Escaping & while replacing the URL
export mkernel_url
sed -i "s|INITRD_URL|${minitrd_url}|" $HOME/setup_pxeboot.sh
sed -i "s|KERNEL_URL|${mkernel_url}|" $HOME/setup_pxeboot.sh
sed -i "s|HTTPD_VSI_IP|${httpd_vsi_ip}|" $HOME/setup_pxeboot.sh
chmod 700 $HOME/setup_pxeboot.sh
rootfs_url_httpd="http://$httpd_vsi_ip:80/rootfs-$PROW_JOB_ID.img"
export rootfs_url_httpd
sed -i "s|INITRD_URL|${minitrd_url}|" $HOME/trigger_pxeboot.sh
sed -i "s|KERNEL_URL|${mkernel_url}|" $HOME/trigger_pxeboot.sh
sed -i "s|ROOTFS_URL|${rootfs_url_httpd}|" $HOME/trigger_pxeboot.sh
chmod 700 $HOME/trigger_pxeboot.sh

# Booting up zVSIs as agents
for fip in "${zvsi_fip_list[@]}"; do
echo "Transferring the setup script to zVSI $fip"
scp "${ssh_options[@]}" $HOME/setup_pxeboot.sh core@$fip:/var/home/core/setup_pxeboot.sh
scp "${ssh_options[@]}" $HOME/trigger_pxeboot.sh root@$fip:/root/trigger_pxeboot.sh
echo "Triggering the script in the zVSI $fip"
ssh "${ssh_options[@]}" core@$fip "/var/home/core/setup_pxeboot.sh" &
ssh "${ssh_options[@]}" root@$fip "/root/trigger_pxeboot.sh" &
sleep 60
echo "Successfully booted the zVSI $fip as agent"
done

# Deleting the resources downloaded in the pod
rm -f $HOME/setup_pxeboot.sh $HOME/rootfs.img

rm -f $HOME/trigger_pxeboot.sh $HOME/rootfs-$PROW_JOB_ID.img
# Wait for agents to join (max: 20 min)
for ((i=50; i>=1; i--)); do
agents_count=$(oc get agents -n $hcp_ns --no-headers | wc -l)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ref:
- name: HC_NS
documentation: "Hosted Cluster namespace"
- name: ZVSI_IMAGE
default: fedora-custom-s390x-dnd
default: rhel-image-prow-ci-dnd
- name: ZVSI_PROFILE
default: 'bz2-4x16'
- name: AGENT_IBMZ_CREDENTIALS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,5 @@ ${ssh_key_string}
-----END OPENSSH PRIVATE KEY-----
EOF
chmod 0600 ${tmp_ssh_key}
ssh -o 'PreferredAuthentications=publickey' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -o 'ServerAliveInterval=60' -i "${tmp_ssh_key}" root@$httpd_vsi_ip "rm -rf /var/www/html/rootfs.img"
ssh -o 'PreferredAuthentications=publickey' -o 'StrictHostKeyChecking=no' -o 'UserKnownHostsFile=/dev/null' -o 'ServerAliveInterval=60' -i "${tmp_ssh_key}" root@$httpd_vsi_ip "rm -rf /var/www/html/rootfs-$PROW_JOB_ID.img"
echo "$(date) Successfully completed the e2e deletion chain"