Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

Conversation

@lucab
Copy link
Contributor

@lucab lucab commented Aug 17, 2017

This PR unifies the bootstrapping process of new nodes, taking care of both kubelet (now) and docker (future CL releases, via torcx).
It introduces a new k8s-node-bootstrap.service, replacing and augmenting kubelet-env.service.
The full bootstrap flow is now documented at node-bootstrap-flow.md (see rendered version).

Summary of the changes:

  • drop kubelet-env.service and kubelet.env
  • introduce k8s-node-bootstrap.service
  • introduce /etc/kubernetes/installer/kubelet.env

/cc @squeed

@lucab lucab force-pushed the ups/torcx-bootstrapper branch from 7297eaa to b202b42 Compare August 18, 2017 16:52
private_key = "${var.tectonic_vmware_ssh_private_key_path}"
image_re = "${var.tectonic_image_re}"

ign_installer_kubelet_env_id = "${module.ignition.installer_kubelet_env_id}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this line is supposed to go under module "masters" instead of etcd?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is already under "masters", github folding is tricking you into believing it's under "etcd" instead ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

darn you github!

@lucab lucab force-pushed the ups/torcx-bootstrapper branch 5 times, most recently from c178b50 to 16ea9e6 Compare August 30, 2017 09:24
@lucab lucab force-pushed the ups/torcx-bootstrapper branch 7 times, most recently from 8c0a567 to 1d3daf7 Compare September 7, 2017 12:21
@lucab lucab force-pushed the ups/torcx-bootstrapper branch from 1d3daf7 to 02546e9 Compare September 7, 2017 13:58
@lucab lucab force-pushed the ups/torcx-bootstrapper branch 2 times, most recently from 403447a to f6b286c Compare September 15, 2017 07:26
@cpanato
Copy link
Contributor

cpanato commented Sep 15, 2017

close/open to refresh the labels

@cpanato cpanato closed this Sep 15, 2017
@cpanato cpanato reopened this Sep 15, 2017
@lucab lucab force-pushed the ups/torcx-bootstrapper branch 3 times, most recently from 1f92f9b to 582ad93 Compare September 15, 2017 15:44
@lucab lucab changed the title [WIP] tf/common: unify kubelet/docker bootstrap via tectonic_torcx modules/ignition: unify kubelet/docker bootstrap via tectonic-torcx Sep 15, 2017
@lucab lucab force-pushed the ups/torcx-bootstrapper branch from 582ad93 to 375fc03 Compare September 15, 2017 18:04
@sudhaponnaganti
Copy link
Contributor

This is a release blocker

@lucab lucab force-pushed the ups/torcx-bootstrapper branch 2 times, most recently from d26ee0b to c2d9cfb Compare September 18, 2017 11:43
@lucab
Copy link
Contributor Author

lucab commented Sep 18, 2017

This is mostly green (I think Azure failure is a flake in the cloud API) and ready for review.

kubeconfig_fetch_cmd = "${var.kubeconfig_fetch_cmd != "" ? "ExecStartPre=${var.kubeconfig_fetch_cmd}" : ""}"
tectonic_torcx_image_url = "${replace(var.container_images["tectonic_torcx"],var.image_re,"$1")}"
tectonic_torcx_image_tag = "${replace(var.container_images["tectonic_torcx"],var.image_re,"$2")}"
torcx_skip_setup = "${var.tectonic_vanilla_k8s == 1 ? "true" : "false" }"
Copy link
Contributor

Choose a reason for hiding this comment

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

${var.tectonic_vanilla_k8s ? "true" : "false" }

}

variable "tectonic_vanilla_k8s" {
default = false
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove default here to enforce variable declaration.

s-urbaniak
s-urbaniak previously approved these changes Sep 18, 2017
Copy link
Contributor

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

two nits, else LGTM once green, thanks! That's a big step :-)

tectonic_etcd_operator = "quay.io/coreos/tectonic-etcd-operator:v0.0.2"
tectonic_prometheus_operator = "quay.io/coreos/tectonic-prometheus-operator:v1.6.0"
tectonic_cluo_operator = "quay.io/coreos/tectonic-cluo-operator:v0.2.0"
tectonic_torcx = "quay.io/coreos/tectonic-torcx:installer-latest"
Copy link
Contributor

Choose a reason for hiding this comment

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

installer-latest: do we want this as a final value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is a mutable tag dedicated to the installer. We need this here for forward compatibility until some higher level component takes care of the kubernetes->docker mapping.
@robszumski has a tracker item for this somewhere.

@lucab
Copy link
Contributor Author

lucab commented Sep 18, 2017

@s-urbaniak thanks for the review, nits addressed, CI ongoing.

@Quentin-M
Copy link
Contributor

Quentin-M commented Sep 18, 2017

This cannot be merged as is because all tests are red.

@aaronlevy
Copy link
Contributor

cc @yifan-gu

@lucab lucab force-pushed the ups/torcx-bootstrapper branch from de03697 to b32d36b Compare September 18, 2017 21:57
@lucab
Copy link
Contributor Author

lucab commented Sep 18, 2017

@Quentin-M sorry, it was fine before and I mistakenly broke it when addressing review comments. Amended.

@Quentin-M
Copy link
Contributor

Thank you so much!


Additionally, only on one of the master node the following kubernetes bootstrapping happens:

* `bootkube.service` deploys the initial bootstrapping control-plane. It is started only after ``kubelet.service` _is started_. It is a oneshot unit and cannot crash, and it runs only during bootstrap
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: double back-tick on kubelet.service

* `k8s-node-bootstrap.service` ensures node and assets freshness. It is automatically started on boot, can crash-loop, and it runs only during bootstrap
* `kubelet.service` is the main kubelet deamon. It is automatically started on boot, it is crash-looping until `kubelet.env` is populated, and it runs on each boot

Additionally, only on one of the master node the following kubernetes bootstrapping happens:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: one of the master nodes

@Quentin-M Quentin-M force-pushed the ups/torcx-bootstrapper branch from b32d36b to eb88abd Compare September 18, 2017 23:05
@Quentin-M
Copy link
Contributor

Pushed to fix conflict in config.tf.. but looks like there are some new comments anyways. We can wait until tomorrow then.

@diegs
Copy link
Contributor

diegs commented Sep 18, 2017

@Quentin-M mine are just nits, they aren't release blocking and can be fixed in a follow-up PR.

@@ -0,0 +1,36 @@
[Unit]
Description=Determine the Kubelet Image Version
Copy link
Contributor

@yifan-gu yifan-gu Sep 18, 2017

Choose a reason for hiding this comment

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

nit: It does more than that now right? @lucab

@lucab lucab force-pushed the ups/torcx-bootstrapper branch from eb88abd to 1e7b1ca Compare September 19, 2017 07:54
This introduces a new k8s-node-bootstrap.service, replacing and
augmenting  kubelet-env.service.
The full bootstrap flow is now documented at
[Documentation/dev/node-bootstrap-flow.md]

Summary of the changes:
 * drop kubelet-env.service and kubelet.env
 * introduce k8s-node-bootstrap.service
 * introduce /etc/kubernetes/installer/kubelet.env
@lucab lucab force-pushed the ups/torcx-bootstrapper branch from 1e7b1ca to 3fc7170 Compare September 19, 2017 10:58
@lucab
Copy link
Contributor Author

lucab commented Sep 19, 2017

@diegs thanks for proofreading!

@yifan-gu yes, it does docker setup (via torcx) and kubelet.env setup (similar to previous kube-version). I renamed the service but forgot to update the description.

@Quentin-M thanks for the push, it hit some flakes anyway. I rebased once more for the remaining nits, no flakes this time.

@s-urbaniak s-urbaniak merged commit 0cf916e into coreos:master Sep 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants