vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,6 @@
approvers:
- dashpole
- krzyzacy
- Random-Liu
- yguo0905
- yujuhong

View File

@ -0,0 +1,20 @@
# Node e2e job migration notice:
Sig-testing is actively migrating node e2e jobs from Jenkins to [Prow],
and we are moving *.property and image-config.yaml files to [test-infra]
If you want to update those files, please also update them in [test-infra].
If you have any questions, please contact @krzyzacy or #sig-testing.
## Test-infra Links:
Here's where the existing node e2e job config live:
[Image config files](https://github.com/kubernetes/test-infra/tree/master/jobs/e2e_node)
[Node test job args (.properties equivalent)](https://github.com/kubernetes/test-infra/blob/master/jobs/config.json)
[test-infra]: https://github.com/kubernetes/test-infra
[Prow]: https://github.com/kubernetes/test-infra/tree/master/prow

View File

@ -0,0 +1,221 @@
---
images:
containervm-density1:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'create 35 pods with 0s? interval \[Benchmark\]'
containervm-density2:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'create 105 pods with 0s? interval \[Benchmark\]'
containervm-density2-qps60:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'create 105 pods with 0s? interval \(QPS 60\) \[Benchmark\]'
containervm-density3:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-2
tests:
- 'create 105 pods with 0s? interval \[Benchmark\]'
containervm-density4:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'create 105 pods with 100ms interval \[Benchmark\]'
containervm-resource1:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
containervm-resource2:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
containervm-resource3:
image: e2e-node-containervm-v20161208-image
project: kubernetes-node-e2e-images
machine: n1-standard-1
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
cosstable2-resource1:
image: cos-stable-59-9460-64-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
cosstable2-resource2:
image: cos-stable-59-9460-64-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
cosstable2-resource3:
image: cos-stable-59-9460-64-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
cosstable1-resource1:
image: cos-stable-60-9592-76-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
cosstable1-resource2:
image: cos-stable-60-9592-76-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
cosstable1-resource3:
image: cos-stable-60-9592-76-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
cosdev-resource1:
image: cos-beta-61-9765-31-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
cosdev-resource2:
image: cos-beta-61-9765-31-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
cosdev-resource3:
image: cos-beta-61-9765-31-0
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
cos-docker112-resource1:
image: cos-stable-60-9592-76-0
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
cos-docker112-resource2:
image: cos-stable-60-9592-76-0
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
cos-docker112-resource3:
image: cos-stable-60-9592-76-0
image_description: cos-stable-60-9592-76-0 with docker 1.12.6
project: cos-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/cos-init-docker.yaml,gci-update-strategy=update_disabled,gci-docker-version=1.12.6"
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
coreosalpha-resource1:
image: coreos-alpha-1478-0-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
coreosalpha-resource2:
image: coreos-alpha-1478-0-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
coreosalpha-resource3:
image: coreos-alpha-1478-0-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
coreosstable-resource1:
image: coreos-stable-1409-7-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
coreosstable-resource2:
image: coreos-stable-1409-7-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
coreosstable-resource3:
image: coreos-stable-1409-7-0-v20170719
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
machine: n1-standard-1
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
ubuntustable-resource1:
image: ubuntu-gke-1604-xenial-v20170816-1
project: ubuntu-os-gke-cloud
machine: n1-standard-1
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
ubuntustable-resource2:
image: ubuntu-gke-1604-xenial-v20170816-1
project: ubuntu-os-gke-cloud
machine: n1-standard-1
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
ubuntustable-resource3:
image: ubuntu-gke-1604-xenial-v20170816-1
project: ubuntu-os-gke-cloud
machine: n1-standard-1
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'
ubuntustable-docker112-resource1:
image: ubuntu-gke-1604-xenial-v20170816-1
image_description: ubuntu-gke-1604-xenial-v20170816-1 with docker 1.12.6
project: ubuntu-os-gke-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/ubuntu-init-docker.yaml,ubuntu-docker-version=1.12.6"
tests:
- 'resource tracking for 0 pods per node \[Benchmark\]'
ubuntustable-docker112-resource2:
image: ubuntu-gke-1604-xenial-v20170816-1
image_description: ubuntu-gke-1604-xenial-v20170816-1 with docker 1.12.6
project: ubuntu-os-gke-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/ubuntu-init-docker.yaml,ubuntu-docker-version=1.12.6"
tests:
- 'resource tracking for 35 pods per node \[Benchmark\]'
ubuntustable-docker112-resource3:
image: ubuntu-gke-1604-xenial-v20170816-1
image_description: ubuntu-gke-1604-xenial-v20170816-1 with docker 1.12.6
project: ubuntu-os-gke-cloud
machine: n1-standard-1
metadata: "user-data<test/e2e_node/jenkins/ubuntu-init-docker.yaml,ubuntu-docker-version=1.12.6"
tests:
- 'resource tracking for 105 pods per node \[Benchmark\]'

View File

@ -0,0 +1,9 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/benchmark/benchmark-config.yaml
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ci-node-e2e
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]"'
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
PARALLELISM=1

View File

@ -0,0 +1,43 @@
#!/bin/bash
# Copyright 2016 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.
# Script executed by jenkins to run node conformance test against gce
# Usage: test/e2e_node/jenkins/conformance-node-jenkins.sh <path to properties>
set -e
set -x
: "${1:?Usage test/e2e_node/jenkins/conformance-node-jenkins.sh <path to properties>}"
. $1
make generated_files
WORKSPACE=${WORKSPACE:-"/tmp/"}
ARTIFACTS=${WORKSPACE}/_artifacts
TIMEOUT=${TIMEOUT:-"45m"}
mkdir -p ${ARTIFACTS}
go run test/e2e_node/runner/remote/run_remote.go --test-suite=conformance \
--logtostderr --vmodule=*=4 --ssh-env="gce" --ssh-user="$GCE_USER" \
--zone="$GCE_ZONE" --project="$GCE_PROJECT" --hosts="$GCE_HOSTS" \
--images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
--image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \
--results-dir="$ARTIFACTS" --test-timeout="$TIMEOUT" \
--test_args="--kubelet-flags=\"$KUBELET_ARGS\"" \
--instance-metadata="$GCE_INSTANCE_METADATA" \
--system-spec-name="$SYSTEM_SPEC_NAME"

View File

@ -0,0 +1,6 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/image-config.yaml
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ci-node-e2e
CLEANUP=true
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'

View File

@ -0,0 +1,44 @@
#!/bin/bash
# Copyright 2016 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: copy-e2e-image.sh <image-name> <from-project-name> <to-project-name>
# See *.properties for list of images to copy,
# typically from kubernetes-node-e2e-images
set -e
print_usage() {
echo "This script helps copy a GCE image from a source to a target project"
echo -e "\nUsage:\n$0 <from-image-name> <from-project-name> <to-project-name> <to-image-name>\n"
}
if [ $# -ne 4 ]; then
print_usage
exit 1
fi
FROM_IMAGE=$1
FROM_PROJECT=$2
TO_PROJECT=$3
TO_IMAGE=$4
echo "Copying image $FROM_IMAGE from project $FROM_PROJECT to project $TO_PROJECT as image $TO_IMAGE..."
gcloud compute --project $TO_PROJECT disks create $TO_IMAGE --image=https://www.googleapis.com/compute/v1/projects/$FROM_PROJECT/global/images/$FROM_IMAGE
gcloud compute --project $TO_PROJECT images create $TO_IMAGE \
--source-disk=$TO_IMAGE \
--description="Cloned from projects/$2/global/images/$1 by $USER on $(date)"
gcloud -q compute --project $TO_PROJECT disks delete $TO_IMAGE

View File

@ -0,0 +1,44 @@
{
"ignition":{"version": "2.0.0"},
"systemd": {
"units": [{
"name": "update-engine.service",
"mask": true
},
{
"name": "locksmithd.service",
"mask": true
},
{
"name": "docker.service",
"dropins": [{
"name": "10-disable-systemd-cgroup-driver.conf",
"contents": "[Service]\nCPUAccounting=yes\nMemoryAccounting=yes\nEnvironment=\"DOCKER_CGROUPS=\""
}]
}]
},
"passwd": {
"users": [{
"name": "jenkins",
"create": {
"groups": ["docker", "sudo"]
}
}]
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/ssh/sshd_config",
"contents": {
"source": "data:,%23%20Use%20most%20defaults%20for%20sshd%20configuration.%0AUsePrivilegeSeparation%20sandbox%0ASubsystem%20sftp%20internal-sftp%0AClientAliveInterval%20180%0AUseDNS%20no%0AUsePAM%20yes%0APrintLastLog%20no%20%23%20handled%20by%20PAM%0APrintMotd%20no%20%23%20handled%20by%20PAM%0AAuthenticationMethods%20publickey",
"verification": {}
},
"mode": 384,
"user": {},
"group": {}
}
]
}
}

View File

@ -0,0 +1,23 @@
#cloud-config
#
# This cloud-init configuration file disables Docker live-restore.
runcmd:
- cp /usr/lib/systemd/system/docker.service /etc/systemd/system/docker.service
- sed -i '/^ExecStart=\/usr\/bin\/dockerd/ s/$/ --live-restore=false/' /etc/systemd/system/docker.service
- systemctl daemon-reload
- systemctl restart docker
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar

View File

@ -0,0 +1,127 @@
#cloud-config
write_files:
- path: /etc/systemd/system/upgrade-docker.service
permissions: 0644
owner: root
content: |
[Unit]
Description=Upgrade Docker Binaries
Requires=network-online.target
After=network-online.target docker.service
[Service]
Type=oneshot
# RemainAfterExit so the service runs exactly once.
RemainAfterExit=yes
ExecStartPre=/bin/mkdir -p /home/upgrade-docker/bin
ExecStartPre=/bin/mount --bind /home/upgrade-docker/bin /home/upgrade-docker/bin
ExecStartPre=/bin/mount -o remount,exec /home/upgrade-docker/bin
ExecStart=/bin/bash /tmp/upgrade-docker/upgrade.sh
ExecStartPost=-/bin/rm -rf /home/upgrade-docker/download
[Install]
WantedBy=multi-user.target
- path: /tmp/upgrade-docker/upgrade.sh
permissions: 0644
owner: root
content: |
# This script reads a GCE metadata key for the user speficied Docker
# version, downloads, and replaces the builtin Docker with it.
set -x
set -o errexit
set -o nounset
set -o pipefail
# Checks if a Docker binary is the version we want.
# $1: Docker binary
# $2: Requested version
check_installed() {
local docker_bin="$1"
local requested_version="$2"
[[ "$(${docker_bin} --version)" =~ "Docker version ${requested_version}," ]]
}
# $1: Docker version
download_and_install_docker() {
local requested_version="$1"
local download_dir=/home/upgrade-docker/download/docker-"${requested_version}"
local install_location=/home/upgrade-docker/bin
local docker_tgz="docker-${requested_version}.tgz"
if [[ "${requested_version}" =~ "rc" ]]; then
# RC releases all have the word "rc" in their version
# number, e.g., "1.11.1-rc1".
download_url="https://test.docker.com/builds/Linux/x86_64/${docker_tgz}"
else
download_url="https://get.docker.com/builds/Linux/x86_64/${docker_tgz}"
fi
echo "Downloading Docker version ${requested_version} from "\
"${download_url} to ${download_dir} ..."
# Download and install the binaries.
mkdir -p "${download_dir}"/binaries
/usr/bin/curl -o "${download_dir}/${docker_tgz}" --fail "${download_url}"
tar xzf "${download_dir}/${docker_tgz}" -C "${download_dir}"/binaries
cp "${download_dir}"/binaries/docker/docker* "${install_location}"
mount --bind "${install_location}"/docker /usr/bin/docker
mount --bind "${install_location}"/docker-containerd /usr/bin/docker-containerd
mount --bind "${install_location}"/docker-containerd-shim /usr/bin/docker-containerd-shim
mount --bind "${install_location}"/dockerd /usr/bin/dockerd
mount --bind "${install_location}"/docker-proxy /usr/bin/docker-proxy
mount --bind "${install_location}"/docker-runc /usr/bin/docker-runc
echo "PATH=/home/upgrade-docker/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/default/docker
}
# $1: Metadata key
get_metadata() {
/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error \
-H "X-Google-Metadata-Request: True" \
http://metadata.google.internal/computeMetadata/v1/instance/attributes/"$1"
}
main() {
# Get the desired Docker version through the following metadata key.
local requested_version="$(get_metadata "gci-docker-version")"
if [[ -z "${requested_version}" ]]; then
exit 0
fi
# Check if we have the requested version installed.
if check_installed /usr/bin/docker "${requested_version}"; then
echo "Requested version already installed. Exiting."
exit 0
fi
# Stop the docker daemon during upgrade.
/usr/bin/systemctl stop docker
download_and_install_docker "${requested_version}"
# Assert that the upgrade was successful.
local rc=0
check_installed /usr/bin/docker "${requested_version}" || rc=1
/usr/bin/systemctl start docker && exit $rc
}
main "$@"
runcmd:
- systemctl daemon-reload
- systemctl start upgrade-docker.service
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar

View File

@ -0,0 +1,22 @@
#cloud-config
runcmd:
- cp /usr/lib/systemd/system/docker.service /etc/systemd/system/
- sed -i -e 's/-s overlay/-s overlay2/g' /etc/systemd/system/docker.service
- systemctl daemon-reload
- echo '{"live-restore":true}' > /etc/docker/daemon.json
- systemctl restart docker
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar

View File

@ -0,0 +1,15 @@
GCI_IMAGE_PROJECT=container-vm-image-staging
GCI_IMAGE_FAMILY=gci-next-canary
GCI_IMAGE=$(gcloud compute images describe-from-family ${GCI_IMAGE_FAMILY} --project=${GCI_IMAGE_PROJECT} --format="value(name)")
GCI_CLOUD_INIT=test/e2e_node/jenkins/gci-init.yaml
GCE_HOSTS=
GCE_IMAGES=${GCI_IMAGE}
GCE_IMAGE_PROJECT=${GCI_IMAGE_PROJECT}
GCE_ZONE=us-central1-f
GCE_PROJECT=node-cos-docker-validation
# user-data is the GCI cloud init config file.
GCE_INSTANCE_METADATA="user-data<${GCI_CLOUD_INIT},gci-update-strategy=update_disabled"
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
TIMEOUT=1h

View File

@ -0,0 +1,21 @@
#!/bin/bash
GCI_IMAGE_PROJECT=container-vm-image-staging
GCI_IMAGE_FAMILY=gci-canary-test
GCI_IMAGE=$(gcloud compute images describe-from-family ${GCI_IMAGE_FAMILY} --project=${GCI_IMAGE_PROJECT} --format="value(name)")
DOCKER_VERSION=$(curl -fsSL --retry 3 https://api.github.com/repos/docker/docker/releases | tac | tac | grep -m 1 "\"tag_name\"\:" | grep -Eo "[0-9\.rc-]+")
GCI_CLOUD_INIT=test/e2e_node/jenkins/gci-init.yaml
# Render the test config file
GCE_IMAGE_CONFIG_PATH=`mktemp`
CONFIG_FILE=test/e2e_node/jenkins/docker_validation/perf-config.yaml
cp $CONFIG_FILE $GCE_IMAGE_CONFIG_PATH
sed -i -e "s@{{IMAGE}}@${GCI_IMAGE}@g" $GCE_IMAGE_CONFIG_PATH
sed -i -e "s@{{IMAGE_PROJECT}}@${GCI_IMAGE_PROJECT}@g" $GCE_IMAGE_CONFIG_PATH
sed -i -e "s@{{METADATA}}@user-data<${GCI_CLOUD_INIT},gci-docker-version=${DOCKER_VERSION},gci-update-strategy=update_disabled@g" $GCE_IMAGE_CONFIG_PATH
GCE_HOSTS=
GCE_ZONE=us-central1-f
GCE_PROJECT=node-cos-docker-validation-ci
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]"'
PARALLELISM=1

View File

@ -0,0 +1,17 @@
GCI_IMAGE_PROJECT=container-vm-image-staging
GCI_IMAGE_FAMILY=gci-canary-test
GCI_IMAGE=$(gcloud compute images describe-from-family ${GCI_IMAGE_FAMILY} --project=${GCI_IMAGE_PROJECT} --format="value(name)")
DOCKER_VERSION=$(curl -fsSL --retry 3 https://api.github.com/repos/docker/docker/releases | tac | tac | grep -m 1 "\"tag_name\"\:" | grep -Eo "[0-9\.rc-]+")
GCI_CLOUD_INIT=test/e2e_node/jenkins/gci-init.yaml
GCE_HOSTS=
GCE_IMAGES=${GCI_IMAGE}
GCE_IMAGE_PROJECT=${GCI_IMAGE_PROJECT}
GCE_ZONE=us-central1-f
GCE_PROJECT=node-cos-docker-validation-ci
# user-data is the GCI cloud init config file.
# gci-docker-version specifies docker version in GCI image.
GCE_INSTANCE_METADATA="user-data<${GCI_CLOUD_INIT},gci-docker-version=${DOCKER_VERSION},gci-update-strategy=update_disabled"
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
TIMEOUT=1h

View File

@ -0,0 +1,58 @@
---
images:
density1:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-1
tests:
- '.*create 35 pods with 0s? interval \[Benchmark\]'
density2:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-1
tests:
- '.*create 105 pods with 0s? interval \[Benchmark\]'
density3:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-2
tests:
- '.*create 105 pods with 0s? interval \[Benchmark\]'
density4:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-1
tests:
- '.*create 35 pods with 100ms interval \[Benchmark\]'
density5:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-1
tests:
- '.*create 105 pods with 100ms interval \[Benchmark\]'
density6:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-2
tests:
- '.*create 105 pods with 100ms interval \[Benchmark\]'
density7:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-1
tests:
- '.*create 105 pods with 300ms interval \[Benchmark\]'
density8:
image: "{{IMAGE}}"
project: "{{IMAGE_PROJECT}}"
metadata: "{{METADATA}}"
machine: n1-standard-2
tests:
- '.*create 105 pods with 300ms interval \[Benchmark\]'

View File

@ -0,0 +1,50 @@
#!/bin/bash
# Copyright 2016 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.
# Script executed by jenkins to run node e2e tests against gce
# Usage: test/e2e_node/jenkins/e2e-node-jenkins.sh <path to properties>
# Properties files:
# - test/e2e_node/jenkins/jenkins-ci.properties : for running jenkins ci
# - test/e2e_node/jenkins/jenkins-pull.properties : for running jenkins pull request builder
# - test/e2e_node/jenkins/template.properties : template for creating a properties file to run locally
set -e
set -x
: "${1:?Usage test/e2e_node/jenkins/e2e-node-jenkins.sh <path to properties>}"
. $1
# indirectly generates test/e2e/generated/bindata.go too
make generated_files
# TODO converge build steps with hack/build-go some day if possible.
go build test/e2e_node/environment/conformance.go
PARALLELISM=${PARALLELISM:-8}
WORKSPACE=${WORKSPACE:-"/tmp/"}
ARTIFACTS=${WORKSPACE}/_artifacts
TIMEOUT=${TIMEOUT:-"45m"}
mkdir -p ${ARTIFACTS}
go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 \
--ssh-env="gce" --ssh-user="$GCE_USER" --zone="$GCE_ZONE" --project="$GCE_PROJECT" \
--hosts="$GCE_HOSTS" --images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
--image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \
--results-dir="$ARTIFACTS" --ginkgo-flags="--nodes=$PARALLELISM $GINKGO_FLAGS" \
--test-timeout="$TIMEOUT" --test_args="$TEST_ARGS --kubelet-flags=\"$KUBELET_ARGS\"" \
--instance-metadata="$GCE_INSTANCE_METADATA" --system-spec-name="$SYSTEM_SPEC_NAME"

View File

@ -0,0 +1,19 @@
#cloud-config
runcmd:
- modprobe configs
- docker run -v /dev:/dev -v /home/kubernetes/bin/nvidia:/rootfs/nvidia -v /etc/os-release:/rootfs/etc/os-release -v /proc/sysrq-trigger:/sysrq -e BASE_DIR=/rootfs/nvidia --privileged gcr.io/google_containers/cos-nvidia-driver-install@sha256:cb55c7971c337fece62f2bfe858662522a01e43ac9984a2dd1dd5c71487d225c
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar

View File

@ -0,0 +1,17 @@
#cloud-config
runcmd:
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar

View File

@ -0,0 +1,26 @@
# To copy an image between projects:
# `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>`
# `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>`
images:
ubuntu:
image: ubuntu-gke-1604-xenial-v20170420-1 # docker 1.12.6
project: ubuntu-os-gke-cloud
coreos-alpha:
image: coreos-alpha-1122-0-0-v20160727 # docker 1.11.2
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
containervm:
image: e2e-node-containervm-v20161208-image # docker 1.11.2
project: kubernetes-node-e2e-images
cos-stable2:
image_regex: cos-stable-59-9460-64-0 # docker 1.11.2
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/gci-init-gpu.yaml,gci-update-strategy=update_disabled"
resources:
accelerators:
- type: nvidia-tesla-k80
count: 2
cos-stable1:
image_regex: cos-stable-60-9592-84-0 # docker 1.13.1
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/cos-init-live-restore.yaml,gci-update-strategy=update_disabled"

View File

@ -0,0 +1,22 @@
# To copy an image between projects:
# `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>`
# `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>`
images:
ubuntu:
image: ubuntu-gke-1604-xenial-v20170420-1 # docker 1.12.6
project: ubuntu-os-gke-cloud
coreos-alpha:
image: coreos-alpha-1122-0-0-v20160727 # docker 1.11.2
project: coreos-cloud
metadata: "user-data<test/e2e_node/jenkins/coreos-init.json"
containervm:
image: e2e-node-containervm-v20161208-image # docker 1.11.2
project: kubernetes-node-e2e-images
cos-stable2:
image_regex: cos-stable-59-9460-64-0 # docker 1.11.2
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
cos-stable1:
image_regex: cos-stable-60-9592-84-0 # docker 1.13.1
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/cos-init-live-restore.yaml,gci-update-strategy=update_disabled"

View File

@ -0,0 +1,12 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=
GCE_IMAGES=ubuntu-gke-1604-xenial-v20170420-1
GCE_IMAGE_PROJECT=ubuntu-os-gke-cloud
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ubuntu-node
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
TIMEOUT=1h
# Use the system spec defined in test/e2e_node/system/specs/gke.yaml.
SYSTEM_SPEC_NAME=gke

View File

@ -0,0 +1,8 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/image-config.yaml
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ci-node-e2e
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]|\[Serial\]"'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
TIMEOUT=1h

View File

@ -0,0 +1,11 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/image-config.yaml
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ci-node-e2e
CLEANUP=true
GINKGO_FLAGS='--focus="\[Flaky\]"'
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true,LocalStorageCapacityIsolation=true,PodPriority=true'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
PARALLELISM=1
TIMEOUT=3h

View File

@ -0,0 +1,8 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/image-config.yaml
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-pr-node-e2e
CLEANUP=true
GINKGO_FLAGS='--skip="\[Flaky\]|\[Slow\]|\[Serial\]" --flakeAttempts=2'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'

View File

@ -0,0 +1,14 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=
GCE_IMAGES=ubuntu-gke-1604-xenial-v20170420-1
GCE_IMAGE_PROJECT=ubuntu-os-gke-cloud
GCE_ZONE=us-central1-f
GCE_PROJECT=k8s-jkns-ubuntu-node-serial
CLEANUP=true
GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"'
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
PARALLELISM=1
TIMEOUT=3h
# Use the system spec defined at test/e2e_node/system/specs/gke.yaml.
SYSTEM_SPEC_NAME=gke

View File

@ -0,0 +1,10 @@
GCE_HOSTS=
GCE_IMAGE_CONFIG_PATH=test/e2e_node/jenkins/image-config-serial.yaml
GCE_ZONE=us-west1-b
GCE_PROJECT=k8s-jkns-ci-node-e2e
CLEANUP=true
GINKGO_FLAGS='--focus="\[Serial\]" --skip="\[Flaky\]|\[Benchmark\]"'
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true'
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
PARALLELISM=1
TIMEOUT=3h

View File

@ -0,0 +1,25 @@
# Copy this file to your home directory and modify
# User used on the gce instances to run the test.
GCE_USER=
# Path to a yaml or json file describing images to run or empty
GCE_IMAGE_CONFIG_PATH=
# Names of gce hosts to test against (must be resolvable) or empty
GCE_HOSTS=
# Comma-separated names of gce images to test or empty (one or more of GCE_IMAGE_CONFIG_PATH, GCE_IMAGES, GCE_HOSTS is required)
GCE_IMAGES=
# Gce zone to use - required when using GCE_IMAGES
GCE_ZONE=
# Gce project to use for creating instances
# required when using GCE_IMAGES or GCE_IMAGE_CONFIG_PATH
GCE_PROJECT=
# Gce project to use for GCE_IMAGES
# required when using GCE_IMAGES
GCE_IMAGE_PROJECT=
# If true, delete instances created from GCE_IMAGES/GCE_IMAGE_CONFIG_PATH and files copied to GCE_HOSTS
CLEANUP=true
# KUBELET_ARGS are the arguments passed to kubelet. The args will override corresponding default kubelet
# setting in the test framework and --kubelet-flags in TEST_ARGS.
# If true QoS Cgroup Hierarchy is created and tests specifc to the cgroup hierarchy run
KUBELET_ARGS='--cgroups-per-qos=true --cgroup-root=/'
# TEST_ARGS are args passed to node e2e test.
TEST_ARGS=''

View File

@ -0,0 +1,29 @@
#!/bin/bash
# Copyright 2017 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.
# This script is meant to install Nvidia drivers on Ubuntu 14.04 GCE VMs.
# This script is meant to facilitate testing of Nvidia GPU support in Kubernetes.
echo "Checking for CUDA and installing."
# Check for CUDA and try to install.
if ! dpkg-query -W cuda; then
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_8.0.61-1_amd64.deb
dpkg -i ./cuda-repo-ubuntu1404_8.0.61-1_amd64.deb
apt-get update
apt-get install cuda -y
apt-get install linux-headers-$(uname -r) -y
fi
## Pre-loads kernel modules
nvidia-smi

View File

@ -0,0 +1,121 @@
#cloud-config
write_files:
- path: /etc/systemd/system/upgrade-docker.service
permissions: 0644
owner: root
content: |
[Unit]
Description=Upgrade Docker Binaries
Requires=network-online.target
After=network-online.target docker.service
[Service]
Type=oneshot
# RemainAfterExit so the service runs exactly once.
RemainAfterExit=yes
ExecStartPre=/bin/mkdir -p /home/upgrade-docker/bin
ExecStartPre=/bin/mount --bind /home/upgrade-docker/bin /home/upgrade-docker/bin
ExecStartPre=/bin/mount -o remount,exec /home/upgrade-docker/bin
ExecStart=/bin/bash /tmp/upgrade-docker/upgrade.sh
ExecStartPost=-/bin/rm -rf /home/upgrade-docker/download
[Install]
WantedBy=multi-user.target
- path: /tmp/upgrade-docker/upgrade.sh
permissions: 0644
owner: root
content: |
# This script reads a GCE metadata key for the user speficied Docker
# version, downloads, and replaces the builtin Docker with it.
set -x
set -o errexit
set -o nounset
set -o pipefail
# Checks if a Docker binary is the version we want.
# $1: Docker binary
# $2: Requested version
check_installed() {
local docker_bin="$1"
local requested_version="$2"
[[ "$(${docker_bin} --version)" =~ "Docker version ${requested_version}," ]]
}
# $1: Docker version
download_and_install_docker() {
local requested_version="$1"
local download_dir=/home/upgrade-docker/download/docker-"${requested_version}"
local install_location=/home/upgrade-docker/bin
local docker_tgz="docker-${requested_version}.tgz"
if [[ "${requested_version}" =~ "rc" ]]; then
# RC releases all have the word "rc" in their version
# number, e.g., "1.11.1-rc1".
download_url="https://test.docker.com/builds/Linux/x86_64/${docker_tgz}"
else
download_url="https://get.docker.com/builds/Linux/x86_64/${docker_tgz}"
fi
echo "Downloading Docker version ${requested_version} from "\
"${download_url} to ${download_dir} ..."
# Download and install the binaries.
mkdir -p "${download_dir}"/binaries
/usr/bin/curl -o "${download_dir}/${docker_tgz}" --fail "${download_url}"
tar xzf "${download_dir}/${docker_tgz}" -C "${download_dir}"/binaries
cp "${download_dir}"/binaries/docker/docker* "${install_location}"
mount --bind "${install_location}"/docker /usr/bin/docker
mount --bind "${install_location}"/docker-containerd /usr/bin/containerd
mount --bind "${install_location}"/docker-containerd-shim /usr/bin/containerd-shim
mount --bind "${install_location}"/dockerd /usr/bin/dockerd
mount --bind "${install_location}"/docker-proxy /usr/bin/docker-proxy
mount --bind "${install_location}"/docker-runc /usr/sbin/runc
echo "PATH=/home/upgrade-docker/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/default/docker
}
# $1: Metadata key
get_metadata() {
/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error \
-H "X-Google-Metadata-Request: True" \
http://metadata.google.internal/computeMetadata/v1/instance/attributes/"$1"
}
main() {
# Get the desired Docker version through the following metadata key.
local requested_version="$(get_metadata "ubuntu-docker-version")"
if [[ -z "${requested_version}" ]]; then
exit 0
fi
# Stop the docker daemon during upgrade.
systemctl stop docker
download_and_install_docker "${requested_version}"
# Assert that the upgrade was successful.
local rc=0
check_installed /usr/bin/docker "${requested_version}" || rc=1
systemctl start docker && exit $rc
}
main "$@"
runcmd:
- systemctl daemon-reload
- systemctl start upgrade-docker.service
- mount /tmp /tmp -o remount,exec,suid
- usermod -a -G docker jenkins
- mkdir -p /var/lib/kubelet
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
- mount -o remount, exec /home/kubernetes/containerized_mounter/
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
- rm /tmp/mounter.tar