-
Notifications
You must be signed in to change notification settings - Fork 2.1k
WIP Adding e2e kubevirt #13165
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
Closed
Closed
WIP Adding e2e kubevirt #13165
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9d6a1ba
Adding e2e-kubevirt
bardielle 8bd2070
Adding test e2e-kubevirt
bardielle 73113c9
Adding logs
bardielle e52432c
Adding new ipi-conf for kubevirt
bardielle d152387
Adding new install-kubevirt chain
bardielle bb08988
Debugging
bardielle 849af0f
Removing parts from install config
bardielle 172660a
Changing the installer
bardielle b0b4f1b
Using new binary
bardielle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...ster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master-presubmits.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| approvers: | ||
| - bardielle | ||
| - ravidbro | ||
| - nirarg | ||
| - rgolangh | ||
| - chenyosef |
29 changes: 29 additions & 0 deletions
29
ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| cluster_name=${NAMESPACE}-${JOB_NAME_HASH} | ||
|
|
||
| out=${SHARED_DIR}/install-config.yaml | ||
|
|
||
| if [[ -z "$RELEASE_IMAGE_LATEST" ]]; then | ||
| echo "RELEASE_IMAGE_LATEST is an empty string, exiting" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Installing from release ${RELEASE_IMAGE_LATEST}" | ||
|
|
||
| ssh_pub_key=$(<"${CLUSTER_PROFILE_DIR}/ssh-publickey") | ||
| pull_secret=$(<"${CLUSTER_PROFILE_DIR}/pull-secret") | ||
|
|
||
| cat > "${out}" << EOF | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: ${cluster_name} | ||
| pullSecret: > | ||
| ${pull_secret} | ||
| sshKey: | | ||
| ${ssh_pub_key} | ||
| EOF |
12 changes: 12 additions & 0 deletions
12
ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "path": "ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bardielle", | ||
| "ravidbro", | ||
| "nirarg", | ||
| "rgolangh", | ||
| "chenyosef" | ||
| ] | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ref: | ||
| as: ipi-conf-kubevirt-env | ||
| from_image: | ||
| namespace: origin | ||
| name: centos | ||
| tag: '8' | ||
| commands: ipi-conf-kubevirt-env-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| memory: 100Mi | ||
| env: | ||
| - name: RELEASE_IMAGE_LATEST | ||
| default: "docker.io/kubevirtplatformipi/installer:dbarda" | ||
| # default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" | ||
| documentation: |- | ||
| The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| approvers: | ||
| - bardielle | ||
| - ravidbro | ||
| - nirarg | ||
| - rgolangh | ||
| - chenyosef |
81 changes: 81 additions & 0 deletions
81
ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| #!/bin/bash -x | ||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
|
||
| if [[ -z "$OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE" ]]; then | ||
| echo "OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE is an empty string, exiting" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "**** 1 Installing from release ${OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE}" | ||
| export SSH_PRIV_KEY_PATH=${CLUSTER_PROFILE_DIR}/ssh-privatekey | ||
| export PULL_SECRET_PATH=${CLUSTER_PROFILE_DIR}/pull-secret | ||
| export OPENSHIFT_INSTALL_INVOKER=openshift-internal-ci/${JOB_NAME}/${BUILD_ID} | ||
| export HOME=/tmp | ||
|
|
||
| case "${CLUSTER_TYPE}" in | ||
| aws) export AWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred;; | ||
| azure4) export AZURE_AUTH_LOCATION=${CLUSTER_PROFILE_DIR}/osServicePrincipal.json;; | ||
| gcp) export GOOGLE_CLOUD_KEYFILE_JSON=${CLUSTER_PROFILE_DIR}/gce.json;; | ||
| kubevirt) export KUBEVIRT_KUBECONFIG=${HOME}/.kube/config;; | ||
| vsphere) ;; | ||
| openstack) export OS_CLIENT_CONFIG_FILE=${CLUSTER_PROFILE_DIR}/clouds.yaml ;; | ||
| openstack-vexxhost) export OS_CLIENT_CONFIG_FILE=${CLUSTER_PROFILE_DIR}/clouds.yaml ;; | ||
| *) echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'" | ||
| esac | ||
|
|
||
| echo "**** 2 " $PWD | ||
|
|
||
| dir=/tmp/installer | ||
| mkdir "${dir}/" | ||
| cp "${SHARED_DIR}/install-config.yaml" "${dir}/" | ||
|
|
||
| # move private key to ~/.ssh/ so that installer can use it to gather logs on | ||
| # bootstrap failure | ||
| mkdir -p ~/.ssh | ||
| cp "${SSH_PRIV_KEY_PATH}" ~/.ssh/ | ||
|
|
||
| echo "**** 3 " | ||
| ls | ||
|
|
||
| #sleep 2h | ||
| echo "curl from dropbox" | ||
| curl -k -L https://www.dropbox.com/s/vwkw15z7a47pwlt/openshift-install?dl=0 -o openshift-install-binary | ||
| #OPENSHIFT_INSTALL_BINARY=$(curl -k -L https://www.dropbox.com/s/vwkw15z7a47pwlt/openshift-install?dl=0) | ||
|
|
||
|
|
||
| echo "chmod" | ||
| chmod +x openshift-install-binary | ||
|
|
||
| echo "run create manifest" | ||
| openshift-install-binary --dir="${dir}" create manifests & | ||
| #openshift-install --dir="${dir}" create manifests & | ||
|
|
||
| wait "$!" | ||
|
|
||
| sed -i '/^ channel:/d' "${dir}/manifests/cvo-overrides.yaml" | ||
|
|
||
| while IFS= read -r -d '' item | ||
| do | ||
| manifest="$( basename "${item}" )" | ||
| cp "${item}" "${dir}/manifests/${manifest##manifest_}" | ||
| done < <( find "${SHARED_DIR}" -name "manifest_*.yml" -print0) | ||
|
|
||
| TF_LOG=debug openshift-install --dir="${dir}" create cluster 2>&1 | grep --line-buffered -v password & | ||
|
|
||
| set +e | ||
| wait "$!" | ||
| ret="$?" | ||
| cp "${dir}"/log-bundle-*.tar.gz "${ARTIFACT_DIR}/" 2>/dev/null | ||
| set -e | ||
|
|
||
| sed 's/password: .*/password: REDACTED/' "${dir}/.openshift_install.log" >"${ARTIFACT_DIR}/.openshift_install.log" | ||
| cp \ | ||
| -t "${SHARED_DIR}" \ | ||
| "${dir}/auth/kubeconfig" \ | ||
| "${dir}/auth/kubeadmin-password" \ | ||
| "${dir}/metadata.json" | ||
| exit "$ret" | ||
12 changes: 12 additions & 0 deletions
12
...rator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "path": "ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bardielle", | ||
| "ravidbro", | ||
| "nirarg", | ||
| "rgolangh", | ||
| "chenyosef" | ||
| ] | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| ref: | ||
| as: ipi-conf-kubevirt-install | ||
| from: installer | ||
| # from_image: | ||
| # name: test_installer | ||
| # namespace: ocp | ||
| # tag: test_installer | ||
| commands: ipi-conf-kubevirt-install-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 1000m | ||
| memory: 2Gi | ||
| # dependencies: | ||
| # - name: "release:latest" | ||
| # env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE | ||
| # - name: "release:latest" | ||
| # env: RELEASE_IMAGE_LATEST | ||
| env: | ||
| - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE | ||
| default: "docker.io/kubevirtplatformipi/installer:dbarda" | ||
| - name: CLUSTER_TYPE | ||
| default: "kubevirt" | ||
| documentation: |- | ||
| The IPI install step runs the OpenShift Installer in order to bring up an OpenShift cluster, using the provided cluster profile to choose a target IaaS platform. Anything that needs to be configured using manifests should generate them before this step and put them in the SHARED_DIR with the filename manifest_(manifest_name).yml so that this step can pull in the manifest in. |
2 changes: 1 addition & 1 deletion
2
ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,4 @@ platform: | |
| persistentVolumeAccessMode: ${KUBEVIRT_VOLUME_ACCESS_MODE} | ||
| EOF | ||
|
|
||
| cat ${CONFIG} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| approvers: | ||
| - bardielle | ||
| - ravidbro | ||
| - nirarg | ||
| - rgolangh | ||
| - chenyosef |
12 changes: 12 additions & 0 deletions
12
ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "path": "ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bardielle", | ||
| "ravidbro", | ||
| "nirarg", | ||
| "rgolangh", | ||
| "chenyosef" | ||
| ] | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| chain: | ||
| as: ipi-install-kubevirt | ||
| steps: | ||
| - ref: ipi-install-rbac | ||
| - ref: ipi-conf-kubevirt-install | ||
| documentation: |- | ||
| The IPI install step chain contains all the individual steps necessary to install an OpenShift cluster. |
1 change: 0 additions & 1 deletion
1
ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| approvers: | ||
| - bardielle | ||
| - ravidbro | ||
| - nirarg | ||
| - rgolangh | ||
| - chenyosef |
12 changes: 12 additions & 0 deletions
12
...erator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "path": "openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "bardielle", | ||
| "ravidbro", | ||
| "nirarg", | ||
| "rgolangh", | ||
| "chenyosef" | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does a file names ipi-conf-kubevirt-install-commands.sh should handle cases of other CLUSTER_TYPES ? I would expect to get the Unsupported cluster type for all types except for kubevirt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a side branch for testing our usecase
It's only for testing our image - I must duplicate the commands.sh file but use env variable with our image