Skip to content

Commit

Permalink
Introduce metal job for testing
Browse files Browse the repository at this point in the history
Job is to test connecitivty between Prow and Metal lab

Signed-off-by: Joe Talerico <[email protected]>
  • Loading branch information
Joe Talerico committed May 13, 2024
1 parent 2c7c896 commit b1b4eba
Show file tree
Hide file tree
Showing 15 changed files with 483 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
build_root:
image_stream_tag:
name: ci-tools-build-root
namespace: ci
tag: latest
images:
- dockerfile_path: prow/Dockerfile
to: ocp-qe-perfscale-ci-metal-415
promotion:
to:
- namespace: ci
tag: latest
releases:
latest:
candidate:
product: ocp
stream: nightly
version: "4.15"
resources:
'*':
requests:
cpu: 100m
memory: 200Mi
tests:
- always_run: false
as: node-density-heavy-6nodes
cluster: build05
steps:
cluster_profile: metal-perscale-cpt
env:
BAREMETAL: "true"
NUM_WORKER_NODES: "6"
RUN_CERBERUS: "false"
test:
- chain: openshift-qe-installer-bm-ping
- chain: openshift-qe-installer-bm-deploy
- chain: openshift-qe-node-density-heavy
timeout: 7h0m0s
zz_generated_metadata:
branch: main
org: openshift-qe
repo: ocp-qe-perfscale-ci
variant: metal-4.15-nightly-x86
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,69 @@ postsubmits:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
always_run: true
branches:
- ^main$
cluster: build04
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/is-promotion: "true"
ci-operator.openshift.io/variant: metal-4.15-nightly-x86
ci.openshift.io/generator: prowgen
job-release: "4.15"
max_concurrency: 1
name: branch-ci-openshift-qe-ocp-qe-perfscale-ci-main-metal-4.15-nightly-x86-images
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson
- --promote
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --variant=metal-4.15-nightly-x86
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- 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/push-secret
name: push-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: push-secret
secret:
secretName: registry-push-credentials-ci-central
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
always_run: true
branches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10790,6 +10790,149 @@ presubmits:
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )(ibmcloud-4.16-nightly-x86-ingress-perf-40nodes|remaining-required),?($|\s.*)
- agent: kubernetes
always_run: true
branches:
- ^main$
- ^main-
cluster: build02
context: ci/prow/metal-4.15-nightly-x86-images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/variant: metal-4.15-nightly-x86
ci.openshift.io/generator: prowgen
job-release: "4.15"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-qe-ocp-qe-perfscale-ci-main-metal-4.15-nightly-x86-images
rerun_command: /test metal-4.15-nightly-x86-images
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --variant=metal-4.15-nightly-x86
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- 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: 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
trigger: (?m)^/test( | .* )metal-4.15-nightly-x86-images,?($|\s.*)
- agent: kubernetes
always_run: false
branches:
- ^main$
- ^main-
cluster: build05
context: ci/prow/metal-4.15-nightly-x86-node-density-heavy-6nodes
decorate: true
decoration_config:
skip_cloning: true
timeout: 7h0m0s
labels:
ci-operator.openshift.io/cloud: metal-perscale-cpt
ci-operator.openshift.io/cloud-cluster-profile: metal-perscale-cpt
ci-operator.openshift.io/cluster: build05
ci-operator.openshift.io/variant: metal-4.15-nightly-x86
ci.openshift.io/generator: prowgen
job-release: "4.15"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-qe-ocp-qe-perfscale-ci-main-metal-4.15-nightly-x86-node-density-heavy-6nodes
rerun_command: /test metal-4.15-nightly-x86-node-density-heavy-6nodes
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/node-density-heavy-6nodes-cluster-profile
- --target=node-density-heavy-6nodes
- --variant=metal-4.15-nightly-x86
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/node-density-heavy-6nodes-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-metal-perscale-cpt
- 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
trigger: (?m)^/test( | .* )(metal-4.15-nightly-x86-node-density-heavy-6nodes|remaining-required),?($|\s.*)
- agent: kubernetes
always_run: true
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"path": "openshift-qe/installer/bm/deploy/openshift-qe-installer-bm-deploy-chain.yaml",
"owners": {
"approvers": [
"qiliredhat",
"paigerube14",
"mffiedler",
"jtaleric",
"svetsa-rh"
],
"reviewers": [
"jogeo",
"memodi",
"mffiedler",
"paigerube14",
"rpattath",
"skordas",
"jtaleric",
"svetsa-rh",
"shahsahil264",
"liqcui",
"krishvoor",
"afcollins",
"rsevilla87",
"vishnuchalla",
"sachinninganure",
"chaitanyaenr"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
chain:
as: openshift-qe-installer-bm-deploy
steps:
- ref: openshift-qe-installer-bm-deploy
documentation: |-
Test connectivity to the bastion host
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
set -x


# Fix UID issue (from Telco QE Team)
~/fix_uid.sh

bastion=$(cat "/secret/address")

cat <<EOF >>/tmp/all.yml
---
lab: scalelab
lab_cloud:
cluster_type: $TYPE
worker_node_count: $NUM_WORKER_NODES
sno_node_count:
public_vlan: false
ocp_release_image: $OCP_RELEASE_IMAGE
openshift_version: "$OCP_VERSION_SHORT"
networktype: OVNKubernetes
enable_fips: $FIPS
ssh_private_key_file: ~/.ssh/id_rsa
ssh_public_key_file: ~/.ssh/id_rsa.pub
pull_secret: "{{ lookup('file', '../pull_secret.txt') }}"
bastion_cluster_config_dir: /root/{{ cluster_type }}
smcipmitool_url:
bastion_lab_interface: eno12399
bastion_controlplane_interface: ens6f0
controlplane_network: 192.168.216.1/21
controlplane_network_prefix: 21
bastion_vlaned_interface: ens1f1
setup_bastion_gogs: false
setup_bastion_registry: false
use_bastion_registry: false
controlplane_lab_interface: eno1np0
controlplane_pub_network_cidr:
controlplane_pub_network_gateway:
jumbo_mtu: false
rwn_lab_interface: eno1np0
rwn_network_interface: ens1f0
EOF

envsubst < /tmp/all.yml > /tmp/all-updated.yml

sshpass -p "$(cat /secret/login)" scp -q -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null /tmp/all-updated.yml root@${bastion}:~/jetlag/ansible/vars/all.yml
sshpass -p "$(cat /secret/login)" scp -q -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null /secret/inventory root@${bastion}:~/jetlag/ansible/inventory/telco.inv

# Clean up previous attempts
sshpass -p "$(cat /secret/login)" ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null root@${bastion} "./clean-resources.sh"

# Setup Bastion
sshpass -p "$(cat /secret/login)" ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null root@${bastion} "cd jetlag; source bootstrap.sh; ansible-playbook -i ansible/inventory/telco.inv ansible/setup-bastion.yml"

# Attempt Deployment
sshpass -p "$(cat /secret/login)" ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null root@${bastion} "cd jetlag; source bootstrap.sh; ansible-playbook -i ansible/inventory/telco.inv ansible/bm-deploy.yml -v"
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"path": "openshift-qe/installer/bm/deploy/openshift-qe-installer-bm-deploy-ref.yaml",
"owners": {
"approvers": [
"qiliredhat",
"paigerube14",
"mffiedler",
"jtaleric",
"svetsa-rh"
],
"reviewers": [
"jogeo",
"memodi",
"mffiedler",
"paigerube14",
"rpattath",
"skordas",
"jtaleric",
"svetsa-rh",
"shahsahil264",
"liqcui",
"krishvoor",
"afcollins",
"rsevilla87",
"vishnuchalla",
"sachinninganure",
"chaitanyaenr"
]
}
}
Loading

0 comments on commit b1b4eba

Please sign in to comment.