Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

karlkfi
Copy link
Contributor

@karlkfi karlkfi commented Jun 18, 2015

Adds "mesos/docker" cluster provider (KUBERNETES_PROVIDER=mesos/docker).

See the mesos/docker getting started guide for the commands to run the e2e tests.

Integration Points:

  • Added KUBE_SERVER in hack/ginkgo-e2e.sh to allow overriding scheme (uses https by default, overridden by detect-master in cluster/mesos/docker/util.sh)
  • Added validate-cluster function to be provided by cluster util.sh with a default impl in cluster/kube-util.sh.
  • Made all echos in cluster/kube-util.sh go to STDERR to avoid breaking usage in functions that use STDOUT.
  • Added ./cluster/test-e2e.sh to delegate to ./hack/ginkgo-e2e.sh. (This is not technically required for this PR, but seems to add legitimacy to the e2e scripts in ./hack. They should perhaps be moved instead, but I didn't want to tackle that in this PR.)
  • exec ginkgo in ./hack/ginkgo-e2e.sh to improve ctrl-c responsiveness
  • Updated docs/getting-started-guides/README.md (affected every line in the table)
    • Added mesos/docker
    • Updated maintainers link for mesos/GCE
    • Made guide links relative
    • Grouped "community" supported clusters below the "project" supported ones.

Progress:

  • Build kubernetes-mesos binaries (./docker/build/build.sh in kubernetes-mesos:docker-compose)
    • Use binaries from ./build/release.sh or make instead of kubernetes-mesos-build
  • Build kubernetes-mesos docker image (./docker/km/build.sh in kubernetes-mesos:docker-compose)
    • Migrate image builder to kubernetes repo
  • Build mesos-slave docker image w/ iptables (req by k8s) that supports docker-in-docker
    • Migrate image builder to kubernetes repo
  • Build kubernetes-mesos-test docker image (./docker/test/build.sh in kubernetes-mesos:docker-compose)
    • Support running unit tests in kubernetes-mesos-test image
    • Support running integration tests in kubernetes-mesos-test image
    • Support running e2e tests in kubernetes-mesos-test image
    • Migrate image builder to kubernetes repo
  • Support ./cluster/kube-up.sh
  • Support ./cluster/kube-down.sh
  • Support make test_e2e
  • Support go run hack/e2e.go -test
  • Resolve networking issues (find way to expose docker container IPs on mac)
  • Support boot2docker
  • Support disk mounting with docker-in-docker
  • Cleanup usage docs & migrate to docs dir
  • Switch from v1beta3 to v1 API usage
  • Support kubectl logs

Deferred Features:

xref: d2iq-archive/kubernetes-mesos#305

@k8s-bot
Copy link

k8s-bot commented Jun 18, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@jdef
Copy link
Contributor

jdef commented Jun 18, 2015

👍

@satnam6502
Copy link
Contributor

Who would be a good reviewer for this PR?

@karlkfi
Copy link
Contributor Author

karlkfi commented Jun 19, 2015

I'll be having my team at mesosphere review it before I ask for external review.

@karlkfi
Copy link
Contributor Author

karlkfi commented Jun 21, 2015

e2e test log: https://gist.githubusercontent.com/karlkfi/4f4a5b0519c9fc77e93c/raw/kubernetes-docker-mesos-e2e.log

Summarizing 26 Failures:

[Fail] Services [It] should be able to change the type and nodeport settings of a service
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:395

[Timeout...] Services [It] should serve a basic endpoint from pods
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:141

[Fail] Events [It] should be sent by kubelets and the scheduler about pods scheduling and running
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/events.go:79

[Fail] Networking [It] should function for intra-pod communication
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/networking.go:144

[Timeout...] Services [It] should serve multiport endpoints from pods
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:242

[Fail] Nodes Resize [BeforeEach] should be able to delete nodes.
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/resize_nodes.go:252

[Fail] Services [It] should be able to create a functioning NodePort service
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:332

[Fail] Proxy version v1beta3 [It] should proxy through a service and a pod
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/proxy.go:138

[Fail] Pods [It] should be updated
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pods.go:340

[Fail] Nodes Network [BeforeEach] should survive network partition.
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/resize_nodes.go:340

[Fail] ServiceAccounts [It] should mount an API token into pods
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service_accounts.go:58

[Fail] Kubectl client Update Demo [It] should create and stop a replication controller
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/util.go:677

[Fail] Pods [It] should contain environment variables for services
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pods.go:402

[Fail] Kubectl client Update Demo [It] should scale a replication controller
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/util.go:677

[Fail] Addon update [BeforeEach] should propagate add-on file changes
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/addon_update.go:204

[Fail] PreStop [It] should call prestop when killing a pod
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/pre_stop.go:64

[Fail] Nodes Resize [BeforeEach] should be able to add nodes.
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/resize_nodes.go:252

[Fail] Services [It] should release NodePorts on delete
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:739

[Fail] DNS [It] should provide DNS for services
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/dns.go:302

[Fail] Etcd failure [BeforeEach] should recover from SIGKILL
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/etcd_failure.go:46

[Fail] Services [It] should check NodePort out-of-range
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:674

[Fail] Etcd failure [BeforeEach] should recover from network partition with master
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/etcd_failure.go:46

[Fail] DNS [It] should provide DNS for the cluster
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/dns.go:138

[Fail] Services [It] should release the load balancer when Type goes from LoadBalancer -> NodePort
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:542

[Fail] ReplicationController [It] should serve a basic image on each replica with a public image
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/rc.go:137

[Fail] Service endpoints latency [It] should not be very high
/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service_latency.go:97

Ran 72 of 86 Specs in 7192.542 seconds
FAIL! -- 46 Passed | 26 Failed | 2 Pending | 12 Skipped --- FAIL: TestE2E (7197.62s)
FAIL

Ginkgo ran 1 suite in 1h59m58.898051402s
Test Suite Failed

Copy link
Contributor

Choose a reason for hiding this comment

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

We can go to v1 directly here. v1beta3 will be unsupported soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to todo list in top comment

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@sttts
Copy link
Contributor

sttts commented Jun 23, 2015

Rebase to fix the dns.go e2e tests which failed before due to lower-case "tcp" protocol in the service definition.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to describe how to install 3rdparty software here? I fear that this will always be outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a valid concern. boot2docker is nearly outdated already, with the new docker machine. I just wanted to document what I use that I know works. In the future, I want to have unit & integration tests run in a docker container so that go and etcd aren't required locally. But git and docker are always going to be required...

@karlkfi
Copy link
Contributor Author

karlkfi commented Jun 26, 2015

Getting closer. Added instructions to expose boot2docker container IPs to the host. YAY!
This fixes make test_e2e which no longer needs to be run in a container.

DNS tests also pass now:

go run hack/e2e.go -test -check_cluster_size=false "-test_args=-ginkgo.focus=DNS"

@karlkfi karlkfi changed the title [WIP] Add mesos docker cluster for e2e testing Add mesos/docker cluster scripts/images to enable e2e testing Jun 30, 2015
@karlkfi
Copy link
Contributor Author

karlkfi commented Jun 30, 2015

This PR is ready for review. @davidopp who would be a good reviewer?

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'm not sure how this change got in here. Maybe in need of rebase?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is merged on master. Just rebase and skip that patch.

@zmerlynn
Copy link
Member

zmerlynn commented Jul 1, 2015

@davidopp was out sick, unfortunately - I'm sorry I didn't see this early. I hope he'll be able to get to this tomorrow, since the rest of the (US) week is basically a merge freeze.

@zmerlynn
Copy link
Member

zmerlynn commented Aug 4, 2015

I just finished a first pass and with the exception of the cluster/mesos/docker/mesos-slave/bin/wrapdocker provenance issue and a pile of nits, it overall LGTM.

@k8s-bot
Copy link

k8s-bot commented Aug 4, 2015

GCE e2e build/test passed for commit 7310ef14a0ce61775154c64118972e5ac6737b1e.

@karlkfi
Copy link
Contributor Author

karlkfi commented Aug 5, 2015

I've extracted the mesos-slave image to our mesosphere/docker-containers repo: mesosphere-backup/docker-containers#21
Image is public here: https://registry.hub.docker.com/u/mesosphere/mesos-slave-dind/

@karlkfi
Copy link
Contributor Author

karlkfi commented Aug 5, 2015

Squashed commits.
Just blocked on #12130 now (marked ok-to merge). Then we'll have to rebase.

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit a2cb184b4f063c5f299572c9eb5a09fa800a0e2a.

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit 3c377348f794ada1baa7f712547ce16c465d3aee.

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit 304737b0166a134d2433b8118bc5248ff2e5758b.

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit 2d27fb4d341a082794a24802e45ef9a6a54cdf14.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Aug 5, 2015
@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit 706646901eb0db4e34d7dcceb61d1f5766660479.

@k8s-bot
Copy link

k8s-bot commented Aug 5, 2015

GCE e2e build/test passed for commit f5fa688.

@karlkfi
Copy link
Contributor Author

karlkfi commented Aug 5, 2015

#12130 is merged.
Rebased & squashed again.

Thanks @zmerlynn, for the reviews!
Based on your above LGTM, I'm going to tag this baby and hand it off to on-call.

@karlkfi karlkfi added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 5, 2015
@zmerlynn
Copy link
Member

zmerlynn commented Aug 5, 2015

Sorry, give me one sec to re-review.

@zmerlynn zmerlynn added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 5, 2015
@zmerlynn
Copy link
Member

zmerlynn commented Aug 5, 2015

Just did a quick pass for obvious stuff. I think we're good.

@karlkfi
Copy link
Contributor Author

karlkfi commented Aug 5, 2015

👍

P.S. Comment 200!
P.P.S. Longest PR ever...

dchen1107 added a commit that referenced this pull request Aug 5, 2015
mesos/docker automated local cluster deployment
@dchen1107 dchen1107 merged commit b12ef5c into kubernetes:master Aug 5, 2015
@karlkfi
Copy link
Contributor Author

karlkfi commented Aug 5, 2015

Champagne

@karlkfi karlkfi added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 11, 2015
@sttts sttts deleted the docker-compose branch September 14, 2015 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform/mesos lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Projects
None yet
Development

Successfully merging this pull request may close these issues.