Skip to content

Conversation

@yifan-gu
Copy link
Contributor

This depends on #17240 and #17241

Basically I maintained a set of pod templates for master components and addons.

When the node is up, it will pull the templates and evaluate them according to the kube-env. (Sort like what salt will do, but here we just use shell).

However it still uses some scripts in the salt:

  • Importing docker images for master components
  • Addon update scripts.

@yifan-gu
Copy link
Contributor Author

@k8s-github-robot
Copy link

Labelling this PR as size/XXL

@k8s-github-robot k8s-github-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 13, 2015
@yifan-gu
Copy link
Contributor Author

Also as mentioned in #16960 (comment)
Some functions are duplicated here. Would like to find a way to reuse them.

@k8s-bot
Copy link

k8s-bot commented Nov 13, 2015

GCE e2e build/test failed for commit 449b271f89967e7ee5f0439180b42e8ea27b9fa2.

@k8s-bot
Copy link

k8s-bot commented Nov 13, 2015

GCE e2e build/test failed for commit e7e186fa0eebe0ea4c61e0964574811f15658d6b.

@davidopp
Copy link
Contributor

@mikedanese no need to review this, but thought you might be interested.
also @fgrzadkowski

@davidopp
Copy link
Contributor

@brendandburns

@dchen1107
Copy link
Member

A little background for this: I asked @yifan-gu to extend our gce / coreos support: 1) including master node, 2) introduce docker, not only rkt. By doing this, we can have

  1. coreos kubernetes cluster run on the top of gce. We can start Jenkins project to run e2e tests.
  2. Meanwhile, I asked @andyzheng0831 to have entire ubuntu trusty cluster to run on the top of gce. One can see, those two can share most of the code at cluster bootstrap. By doing this exercise, we can move forward to support heterogeneous cluster.

@yifan-gu
Copy link
Contributor Author

Basically this approach is hybrid of salt/script/cloudconfig.

  • The configure-node.sh is the one doing most of the configuration work. The script uses some functions in the configure-vm.sh to mount/configure the persistent disk.
  • Some scripts under saltbase are also reused here:
    • Load docker images for master components.here
    • Launch and update addons.here
  • The cloud config is mainly used to launch kubelet/kubeproxy/docker daemon.

The salt is not installed or run on coreos. So instead of using salt to evaluate the pod spec templates, I used bash eval to evaluate them here, and thus keeping a copy of all the templates under the coreos dir. This might be viewed as a burden of maintaining, but I don't have much options in mind if we don't use salt, also coreos will sometime a specific requirement for the pod specs(#16760 (comment)), though it might be able to be solved by salt.

Open to suggestions :)

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2015
@jonboulle
Copy link
Contributor

This LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

Based on the kubernetes-install-rkt unit, it seems like the rkt binary would end up in /opt/rkt-v${RKT_VERSION}/rkt

@andyzheng0831
Copy link

@yifan-gu, do you mind to move cluster/gce/coreos/templates to be cluster/gce/manifest-template, so that it can be naturally used by both this PR and #16702?

@andyzheng0831
Copy link

One question: the api-server.yaml template has less 'VolumeMounts' and 'volumes' compared with the original kube-apiserver.manifest. Does this matter?

@yifan-gu
Copy link
Contributor Author

@andyzheng0831

@yifan-gu, do you mind to move cluster/gce/coreos/templates to be cluster/gce/manifest-template, so that it can be naturally used by both this PR and #16702?

The problem is on coreos, /usr is readonly, and since /usr/share/ssl doesn't exit, it will try to create a file and then fail.

Wonder if we can write some script to check the templates under each distro first, if that doesn't exit, then use the one under the gce dir?

@andyzheng0831
Copy link

Yes, I know it is because many dirs in coreos are read only. My question was: does this hurt functionality if we remove some mount volumes and volumes.

I briefly read through the files you put in cluster/gce/core/template. This is pretty much to solve the question I asked you offline last week. Since the yaml and manifest files in saltbase have salt configuration mixed there, coreos and ubuntu trusty cannot directly use them. I made some experimental script to parse them and set values, but that way is very error-prone. So, I think your way of making separate copies only container env variables is a good solution for both coreos and trusty. That is why I asked if you could move them to cluster/gce/ to be shared by coreos and trusty.

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 14, 2016
@k8s-bot
Copy link

k8s-bot commented Jan 14, 2016

GCE e2e build/test failed for commit 1baacec2a9902de9b2cc95f565a5b024d793a4a6.

@k8s-bot
Copy link

k8s-bot commented Jan 14, 2016

GCE e2e build/test failed for commit 5ced22fca5eaaf411d77aaf44ed7c7e93a98ad96.

@brendandburns
Copy link
Contributor

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Jan 19, 2016

GCE e2e test build/test passed for commit 5ced22fca5eaaf411d77aaf44ed7c7e93a98ad96.

@k8s-bot
Copy link

k8s-bot commented Jan 22, 2016

GCE e2e test build/test passed for commit 723402c.

@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 25, 2016
@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Jan 26, 2016

GCE e2e build/test failed for commit 723402c.

@yifan-gu
Copy link
Contributor Author

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Jan 26, 2016

GCE e2e test build/test passed for commit 723402c.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jan 26, 2016

GCE e2e test build/test passed for commit 723402c.

@yifan-gu
Copy link
Contributor Author

@k8s-bot unit test this please

@yifan-gu
Copy link
Contributor Author

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Jan 27, 2016

GCE e2e test build/test passed for commit 723402c.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jan 27, 2016

GCE e2e test build/test passed for commit 723402c.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Jan 27, 2016
Auto commit by PR queue bot
@k8s-github-robot k8s-github-robot merged commit a95f1b8 into kubernetes:master Jan 27, 2016
@yifan-gu yifan-gu deleted the gce_coreos branch January 27, 2016 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.