-
Notifications
You must be signed in to change notification settings - Fork 296
🏃 Add e2e tests for all flavors #798
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
Merged
k8s-ci-robot
merged 1 commit into
kubernetes-sigs:master
from
sbueringer:pr-add-more-e2e-tests
Mar 30, 2021
Merged
Changes from all commits
Commits
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
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
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 |
|---|---|---|
|
|
@@ -56,7 +56,9 @@ function init_networks() { | |
| if [[ ${GCP_NETWORK_NAME} != "default" ]]; then | ||
| if ! gcloud compute networks describe "${GCP_NETWORK_NAME}" --project "${GCP_PROJECT}" > /dev/null; | ||
| then | ||
| gcloud compute networks create --project "$GCP_PROJECT" "${GCP_NETWORK_NAME}" --subnet-mode auto --quiet | ||
| gcloud compute networks create --project "$GCP_PROJECT" "${GCP_NETWORK_NAME}" --subnet-mode custom | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I got this from testing locally. I would like to keep it anyway. The idea is to not automatically create a lot of subnets as GCP is doing it with subnet mode auto |
||
| gcloud compute networks subnets create "${GCP_NETWORK_NAME}" --project "$GCP_PROJECT" --network="${GCP_NETWORK_NAME}" --range="10.0.0.0/20" --region "${GCP_REGION}" | ||
|
|
||
| gcloud compute firewall-rules create "${GCP_NETWORK_NAME}"-allow-http --project "$GCP_PROJECT" \ | ||
| --allow tcp:80 --network "${GCP_NETWORK_NAME}" --quiet | ||
| gcloud compute firewall-rules create "${GCP_NETWORK_NAME}"-allow-https --project "$GCP_PROJECT" \ | ||
|
|
@@ -124,13 +126,13 @@ main() { | |
| --project "${GCP_PROJECT}" \ | ||
| --zone "${GCP_ZONE}" \ | ||
| --image ubuntu-2004-nested \ | ||
| --boot-disk-size 100G \ | ||
| --boot-disk-size 300G \ | ||
| --boot-disk-type pd-ssd \ | ||
| --can-ip-forward \ | ||
| --tags http-server,https-server,novnc,openstack-apis \ | ||
| --min-cpu-platform "${GCP_MACHINE_MIN_CPU_PLATFORM}" \ | ||
| --machine-type "${GCP_MACHINE_TYPE}" \ | ||
| --network-interface=network="${CLUSTER_NAME}-mynetwork,subnet=${CLUSTER_NAME}-mynetwork,aliases=/24" \ | ||
| --network-interface="private-network-ip=10.0.2.15,network=${CLUSTER_NAME}-mynetwork,subnet=${CLUSTER_NAME}-mynetwork" \ | ||
| --metadata-from-file user-data=./hack/ci/devstack-cloud-init.yaml | ||
| fi | ||
|
|
||
|
|
@@ -192,13 +194,18 @@ main() { | |
| openstack availability zone list | ||
| openstack domain list | ||
|
|
||
| # the flavors are created in a way that we can execute at least 2 e2e tests in parallel (overall we have 32 vCPUs) | ||
| openstack flavor delete m1.tiny | ||
| openstack flavor create --ram 512 --disk 1 --vcpus 1 --public --id 1 m1.tiny --property hw_rng:allowed='True' | ||
| openstack flavor delete m1.small | ||
| openstack flavor create --ram 4192 --disk 10 --vcpus 2 --public --id 2 m1.small --property hw_rng:allowed='True' | ||
| openstack flavor delete m1.medium | ||
| openstack flavor create --ram 6144 --disk 10 --vcpus 4 --public --id 3 m1.medium --property hw_rng:allowed='True' | ||
|
|
||
| # Adjust the CPU quota | ||
| openstack quota set --cores 32 demo | ||
| openstack quota set --secgroups 50 demo | ||
|
|
||
| export OS_TENANT_NAME=demo | ||
| export OS_USERNAME=demo | ||
| export OS_PROJECT_NAME=demo | ||
|
|
||
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
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,91 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright 2021 The Kubernetes Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| ################################################################################ | ||
| # usage: ci-conformance.sh | ||
| # This program runs the clusterctl conformance e2e tests. | ||
| ################################################################################ | ||
|
|
||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||
| cd "${REPO_ROOT}" || exit 1 | ||
|
|
||
| # shellcheck source=../hack/ensure-go.sh | ||
| source "${REPO_ROOT}/hack/ensure-go.sh" | ||
| # shellcheck source=../hack/ensure-kind.sh | ||
| source "${REPO_ROOT}/hack/ensure-kind.sh" | ||
| # shellcheck source=../hack/ensure-kubectl.sh | ||
| source "${REPO_ROOT}/hack/ensure-kubectl.sh" | ||
|
|
||
| RESOURCE_TYPE="${RESOURCE_TYPE:-"gce-project"}" | ||
|
|
||
| ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}" | ||
| mkdir -p "${ARTIFACTS}/logs/" | ||
|
|
||
| # our exit handler (trap) | ||
| cleanup() { | ||
| # stop boskos heartbeat | ||
| [[ -z ${HEART_BEAT_PID:-} ]] || kill -9 "${HEART_BEAT_PID}" | ||
|
|
||
| # will be started by the devstack installation script | ||
| pkill sshuttle | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| #Install requests module explicitly for HTTP calls | ||
| python3 -m pip install requests | ||
|
|
||
| # If BOSKOS_HOST is set then acquire a resource of type ${RESOURCE_TYPE} from Boskos. | ||
| if [ -n "${BOSKOS_HOST:-}" ]; then | ||
| # Check out the account from Boskos and store the produced environment | ||
| # variables in a temporary file. | ||
| account_env_var_file="$(mktemp)" | ||
| python3 hack/boskos.py --get --resource-type="${RESOURCE_TYPE}" 1>"${account_env_var_file}" | ||
| checkout_account_status="${?}" | ||
|
|
||
| # If the checkout process was a success then load the account's | ||
| # environment variables into this process. | ||
| # shellcheck disable=SC1090 | ||
| [ "${checkout_account_status}" = "0" ] && . "${account_env_var_file}" | ||
|
|
||
| # Always remove the account environment variable file. It contains | ||
| # sensitive information. | ||
| rm -f "${account_env_var_file}" | ||
|
|
||
| if [ ! "${checkout_account_status}" = "0" ]; then | ||
| echo "error getting account from boskos" 1>&2 | ||
| exit "${checkout_account_status}" | ||
| fi | ||
|
|
||
| # run the heart beat process to tell boskos that we are still | ||
| # using the checked out account periodically | ||
| python3 -u hack/boskos.py --heartbeat >> "$ARTIFACTS/logs/boskos.log" 2>&1 & | ||
| HEART_BEAT_PID=$! | ||
| fi | ||
|
|
||
| "hack/ci/devstack-on-${RESOURCE_TYPE}-install.sh" | ||
|
|
||
| export OPENSTACK_CLOUD_YAML_FILE | ||
| OPENSTACK_CLOUD_YAML_FILE="$(pwd)/clouds.yaml" | ||
| make test-e2e | ||
| test_status="${?}" | ||
|
|
||
| # If Boskos is being used then release the resource back to Boskos. | ||
| [ -z "${BOSKOS_HOST:-}" ] || python3 hack/boskos.py --release >> "$ARTIFACTS/logs/boskos.log" 2>&1 | ||
|
|
||
| exit "${test_status}" |
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.
Uh oh!
There was an error while loading. Please reload this page.