Skip to content
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

Conformance results for v1.9/kubeadm #123

Merged
merged 3 commits into from Jan 8, 2018

Conversation

stealthybox
Copy link
Contributor

kubectl apply -f https://git.io/weave-kube-1.6
kubectl taint nodes --all node-role.kubernetes.io/master-

curl -L https://raw.githubusercontent.com/cncf/k8s-conformance/master/sonobuoy-conformance.yaml | kubectl apply -f -
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now merged.

@stealthybox
Copy link
Contributor Author

Fixes kubernetes/kubeadm#617.

kubeadm init
export KUBECONFIG=/etc/kubernetes/admin.conf
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/bash.bashrc
kubectl apply -f https://git.io/weave-kube-1.6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer this:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

ref: https://www.weave.works/docs/net/latest/kubernetes/kube-addon/#install

apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
apt-get update && apt-get install -y kubelet kubeadm kubectl docker.io

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my env, it installed docker version 1.6.2 with this command. It's so low a version...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiangpengzhao did you use the Vagrantfile?
I'm seeing 1.13.1 on my vagrant using docker version and apt show docker.io.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I didn't use the Vagrantfile. I followed the steps that of 1.8 tests. I thought it might have the same version issue here. Didn't notice the Vagrantfile :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you have Ubuntu 16.04+ it should be ok I think

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luxas I tried to run that apt command on 14.04 and got a lower docker version. Yeah as you said, 16.04 is ok :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good example of why I codified the steps.
There are so many variables and opinions in OS setup.

@xiangpengzhao
Copy link

/cc @luxas

@dankohn
Copy link
Contributor

dankohn commented Jan 4, 2018

@timothysc Could you please resolve #122 so that we can have people certify to 1.9 using the 'official' Sonobuoy harness? I'd like to make the process as replicatable as possible for everyone else.

@luxas Any concerns?

Copy link

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stealthybox for this PR!!
The only comment I have here is on simplifying the instructions how to reproduce. I'd like to just assume the user can provision an Ubuntu 16.04+ box and provide them with a script to run, like this: master...luxas:patch-1

I don't know what others think would be reasonable, cc @timothysc

# Reproduce Conformance Results:

## pre-reqs
- vagrant + virtualbox
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we want to mandate how the VM should be provisioned... Would "just start an Ubuntu 16.04+ machine"
(as an example) work for you instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a mandate, just a provable way of reproducing these results.

Vagrant is a good MVP for this since it provides code for doing so.
I ran into two issues when trying to reproduce that this code addresses:

  • needed to disable swap
  • not enough compute to schedule conformance pod

Readers of this doc should be able to copy the shell script portion of the Vagrantfile to fit their needs.

apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
apt-get update && apt-get install -y kubelet kubeadm kubectl docker.io
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you have Ubuntu 16.04+ it should be ok I think

kubectl exec -it -n sonobuoy sonobuoy-e2e-job-${AUTOGEN_JOB_ID} -c e2e kubectl version > /vagrant/v1.9/version.txt
```

## untar results
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta nit, I'd prefer "Untar the conformance results" or similar here, with the first char capitalized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make these headers nicer.

```

## generate version.txt
**Important:** do this before conformance tests finish or the pod will die.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we really go with the vagrant thing here, can't this be automated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version.txt should document the client that actually ran the tests, so the command should use kubectl inside the conformance pod.

We could automate this in the provision script, but it would require sleeping or polling until the pod is alive.
If the sonobuoy deployment fails to start or load plugins, the user will need to be warned and informed on how to reproduce this.

It seems more reasonable to expect that kube-conformance would produce version.txt.
@timothysc WDYT? (related #27)

For now, this is how you reproduce what I did.

Copy link

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

I'm fine with this

@kbarnard10
Copy link
Contributor

You are now certified Kubernetes

@kbarnard10 kbarnard10 merged commit 7fa1ef6 into cncf:master Jan 8, 2018
## Pre-Reqs
- vagrant + virtualbox

## Provision
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in the future if we want to reference the https://github.com/heptio/aws-quickstart as a much easier repro-provisioning just let me know. We are refreshing for 1.9 at the end of the month.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd honestly prefer this to be as vendor-neutral as we can... => as I said I'd welcome Heptio as a "corporate backer" or "point of contact for these results as well"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants