Skip to content

Commit

Permalink
Merge pull request #880 from Mirantis/ivan4th/k8s-1.14
Browse files Browse the repository at this point in the history
Update for Kubernetes 1.14
  • Loading branch information
pigmej authored May 16, 2019
2 parents 0b41dd4 + 49e3643 commit 6095268
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 37 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ e2e: &e2e
elif [[ ${CIRCLE_JOB} = e2e_multi_cni ]]; then
export MULTI_CNI=1
echo >&2 "*** Using multiple CNIs (flannel + calico)"
elif [[ ${CIRCLE_JOB} = e2e_1_12 ]]; then
export KUBE_VERSION=1.12
elif [[ ${CIRCLE_JOB} = e2e_1_13 ]]; then
export KUBE_VERSION=1.13
fi
# APISERVER_PORT is set explicitly to avoid dynamic allocation
# of the port by kdc
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
e2e_multi_cni:
<<: *e2e

e2e_1_12:
e2e_1_13:
<<: *e2e

e2e_debian:
Expand Down Expand Up @@ -538,7 +538,7 @@ workflows:
# only: /^master$|^.*-net$|^.*-ext-e2e$/
# tags:
# only: /^v[0-9].*/
- e2e_1_12:
- e2e_1_13:
requires:
- build
filters:
Expand Down Expand Up @@ -569,7 +569,7 @@ workflows:
- e2e_weave
# XXX: temporarily disabled, to be fixed
# - e2e_multi_cni
- e2e_1_12
- e2e_1_13
- e2e_debian
- integration
filters:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The demo script will check for KVM support on the host and will make Virtlet use

The demo is based on [kubeadm-dind-cluster](https://github.com/kubernetes-sigs/kubeadm-dind-cluster) project. **Docker btrfs storage driver is currently unsupported.** Please refer to `kubeadm-dind-cluster` documentation for more info.

You can remove the test cluster with `./dind-cluster-v1.13.sh clean` when you no longer need it.
You can remove the test cluster with `./dind-cluster-v1.14.sh clean` when you no longer need it.

## External projects using Virtlet
There are some external projects using Virtlet already.
Expand Down
4 changes: 2 additions & 2 deletions build/circle-dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o nounset
set -o pipefail
set -o errtrace

DIND_SCRIPT="${DIND_SCRIPT:-$HOME/dind-cluster-v1.13.sh}"
DIND_SCRIPT="${DIND_SCRIPT:-$HOME/dind-cluster-v1.14.sh}"
circle_token_file="$HOME/.circle-token"

job_num="${1:-}"
Expand Down Expand Up @@ -41,7 +41,7 @@ cd virtlet-circle-dump
url="$(curl -sSL -u "${CIRCLE_TOKEN}:" "${base_url}/${job_num}/artifacts" |
jq -r '.[]|select(.path=="tmp/cluster_state/kdc-dump.gz")|.url')"
echo >&2 "Getting cluster dump from ${url}"
curl -sSL "${url}" | gunzip | ~/dind-cluster-v1.13.sh split-dump
curl -sSL "${url}" | gunzip | ~/dind-cluster-v1.14.sh split-dump

url="$(curl -sSL -u "${CIRCLE_TOKEN}:" "${base_url}/${job_num}/artifacts" |
jq -r '.[]|select(.path=="tmp/cluster_state/virtlet-dump.json.gz")|.url')"
Expand Down
29 changes: 16 additions & 13 deletions deploy/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ set -o nounset
set -o pipefail
set -o errtrace

KUBE_VERSION="${KUBE_VERSION:-1.13}"
KUBE_VERSION="${KUBE_VERSION:-1.14}"
CRIPROXY_DEB_URL="${CRIPROXY_DEB_URL:-https://github.com/Mirantis/criproxy/releases/download/v0.14.0/criproxy-nodeps_0.14.0_amd64.deb}"
NONINTERACTIVE="${NONINTERACTIVE:-}"
NO_VM_CONSOLE="${NO_VM_CONSOLE:-}"
INJECT_LOCAL_IMAGE="${INJECT_LOCAL_IMAGE:-}"
dind_script="dind-cluster-v${KUBE_VERSION}.sh"
KDC_VERSION="${KDC_VERSION:-v0.2.0}"
KDC_BASE_LOCATION="${KDC_BASE_LOCATION:-https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download}"
kdc_script="dind-cluster-v${KUBE_VERSION}.sh"
kdc_url="${KDC_BASE_LOCATION}/${KDC_VERSION}/${kdc_script}"
kubectl="${HOME}/.kubeadm-dind-cluster/kubectl"
BASE_LOCATION="${BASE_LOCATION:-https://raw.githubusercontent.com/Mirantis/virtlet/master/}"
RELEASE_LOCATION="${RELEASE_LOCATION:-https://github.com/Mirantis/virtlet/releases/download/}"
Expand Down Expand Up @@ -98,24 +101,24 @@ function demo::ask-user {

function demo::get-dind-cluster {
download="true"
if [[ -f ${dind_script} ]]; then
demo::step "Will update ${dind_script} script to the latest version"
if [[ -f ${kdc_script} ]]; then
demo::step "Will update ${kdc_script} script to the latest version"
if [[ ! ${NONINTERACTIVE} ]]; then
demo::ask-user "Do you want to redownload ${dind_script} ?" download
demo::ask-user "Do you want to redownload ${kdc_script} ?" download
if [[ ${download} = "true" ]]; then
rm "${dind_script}"
rm "${kdc_script}"
fi
else
demo::step "Will now clear existing ${dind_script}"
rm "${dind_script}"
demo::step "Will now clear existing ${kdc_script}"
rm "${kdc_script}"
fi
fi

if [[ ${download} = "true" ]]; then
demo::step "Will download ${dind_script} into current directory"
demo::step "Will download ${kdc_script} into current directory"
demo::ask-before-continuing
wget "https://raw.githubusercontent.com/kubernetes-sigs/kubeadm-dind-cluster/master/fixed/${dind_script}"
chmod +x "${dind_script}"
wget -O "${kdc_script}" "${kdc_url}"
chmod +x "${kdc_script}"
fi
}

Expand All @@ -135,8 +138,8 @@ function demo::start-dind-cluster {
fi
echo "To clean up the cluster, use './dind-cluster-v${KUBE_VERSION}.sh clean'" >&2
demo::ask-before-continuing
"./${dind_script}" clean
"./${dind_script}" up
"./${kdc_script}" clean
"./${kdc_script}" up
}

function demo::jq-patch {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/101/workshop-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chmod 600 virtlet/examples/vmkey
wget https://github.com/Mirantis/virtlet/releases/download/v1.4.4/virtletctl
chmod +x virtletctl

wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl
wget https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubectl
chmod +x kubectl

mkdir -p ~/bin
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/dev/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ You'll need the following to run the local environment:
be enough, but please follow the Docker documentation for your Linux
distribution),
* [kubeadm-dind-cluster](https://github.com/kubernetes-sigs/kubeadm-dind-cluster/)
script for Kubernetes version 1.13 (`dind-cluster-v1.13.sh`).
script for Kubernetes version 1.14 (`dind-cluster-v1.14.sh`).

You can get the cluster startup script like this:
```
$ wget -O ~/dind-cluster-v1.13.sh https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download/v0.1.0/dind-cluster-v1.13.sh
$ chmod +x ~/dind-cluster-v1.13.sh
$ wget -O ~/dind-cluster-v1.14.sh https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download/v0.1.0/dind-cluster-v1.14.sh
$ chmod +x ~/dind-cluster-v1.14.sh
```

## Running the local environment
Expand All @@ -34,7 +34,7 @@ $ # build Virtlet binaries & the image
$ build/cmd.sh build
$ # start DIND cluster
$ ~/dind-cluster-v1.13.sh up
$ ~/dind-cluster-v1.14.sh up
$ # copy binaries to kube-node-1
$ build/cmd.sh copy-dind
Expand All @@ -50,7 +50,7 @@ $ build/cmd.sh e2e -test.v -ginkgo.focus="Should have default route"
$ # Restart the DIND cluster. Binaries from copy-dind are preserved
$ # (you may copy newer ones with another copy-dind command)
$ ~/dind-cluster-v1.13.sh up
$ ~/dind-cluster-v1.14.sh up
$ # start Virtlet daemonset again
$ build/cmd.sh start-dind
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/reference/vm-pod.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ kube-system weave-net-88jv4 2/2 Running 1 69m
kube-system weave-net-kz698 2/2 Running 0 69m
kube-system weave-net-rbnmf 2/2 Running 1 69m
root@k8s-0:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-0 Ready master 69m v1.13.3
k8s-1 Ready <none> 69m v1.13.3
k8s-2 Ready <none> 69m v1.13.3
NAME STATUS ROLES AGE VERSION
kube-master Ready master 29m v1.14.1
kube-node-1 Ready <none> 28m v1.14.1
kube-node-2 Ready <none> 28m v1.14.1
```
10 changes: 5 additions & 5 deletions docs/docs/user-guide/virtlet-on-kdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ The steps described here are performed automatically by
[demo.sh](https://github.com/Mirantis/virtlet/blob/master/deploy/demo.sh) script.

1. Start [kubeadm-dind-cluster](https://github.com/kubernetes-sigs/kubeadm-dind-cluster)
with Kubernetes version 1.13 (you're not required to download it to your home directory).
with Kubernetes version 1.14 (you're not required to download it to your home directory).
The cluster script stores appropriate kubectl version in `~/.kubeadm-dind-cluster`.

wget -O ~/dind-cluster-v1.13.sh \
https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download/v0.1.0/dind-cluster-v1.13.sh
chmod +x ~/dind-cluster-v1.13.sh
~/dind-cluster-v1.13.sh up
wget -O ~/dind-cluster-v1.14.sh \
https://github.com/kubernetes-sigs/kubeadm-dind-cluster/releases/download/v0.2.0/dind-cluster-v1.14.sh
chmod +x ~/dind-cluster-v1.14.sh
~/dind-cluster-v1.14.sh up
export PATH="$HOME/.kubeadm-dind-cluster:$PATH"

1. Label a node to accept Virtlet pod:
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ for testing, you can use this command to start the cluster with
FEATURE_GATES="BlockVolume=true" \
KUBELET_FEATURE_GATES="BlockVolume=true" \
ENABLE_CEPH=1 \
./dind-cluster-v1.13.sh up
./dind-cluster-v1.14.sh up
```

[ubuntu-vm-local-block-pv.yaml](ubuntu-vm-local-block-pv.yaml)
Expand Down

0 comments on commit 6095268

Please sign in to comment.