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

GCE Windows: add 20H2; install docker when nodes are started #98284

Merged
merged 1 commit into from Jan 22, 2021

Conversation

pjh
Copy link
Contributor

@pjh pjh commented Jan 22, 2021

Adds support on GCE for the latest Windows SAC version, 20H2. Removes 1809 which is now obsolete. Uses the latest version of all Windows VM images (January 2021 Windows Updates).

Updates the GCE Windows startup scripts to check for and install the Windows Containers feature and docker, since these dependencies are no longer installed on Windows SAC images.

Tested by running kube-up.sh with WINDOWS_NODE_OS_DISTRIBUTION=win1909 and WINDOWS_NODE_OS_DISTRIBUTION=win20h2.

/kind cleanup

Windows nodes on GCE will take longer to start due to dependencies installed at node creation time.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 22, 2021
@pjh
Copy link
Contributor Author

pjh commented Jan 22, 2021

/cc @jeremyje
/sig cloud-provider
/priority important-soon
/triage accepted

@k8s-ci-robot k8s-ci-robot added sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 22, 2021
@k8s-ci-robot k8s-ci-robot added the area/provider/gcp Issues or PRs related to gcp provider label Jan 22, 2021
cluster/gce/util.sh Outdated Show resolved Hide resolved
@pjh pjh force-pushed the install-docker-on-node-start branch from 6e119f9 to dd26a20 Compare January 22, 2021 01:12
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200908"
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-v20210112"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win20h2" || "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win20H2" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Use elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION,,}" == "win20h2" ]]; then

https://stackoverflow.com/questions/2264428/how-to-convert-a-string-to-lower-case-in-bash

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually probably should coerce lowercase to all options here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually probably should coerce lowercase to all options here

I don't understand, can you elaborate?

"${WINDOWS_NODE_OS_DISTRIBUTION,,}"

I find this to be much less readable, but don't really mind either way.

@pjh pjh force-pushed the install-docker-on-node-start branch 2 times, most recently from 8d4cdfb to e45580b Compare January 22, 2021 17:56
@pjh pjh force-pushed the install-docker-on-node-start branch from e45580b to 21592c2 Compare January 22, 2021 17:58
@pjh
Copy link
Contributor Author

pjh commented Jan 22, 2021

Output from startup script: https://gist.github.com/pjh/95bb5571a6928738086832115212958b

@jeremyje
Copy link
Contributor

/lgtm
/approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 22, 2021
@pjh
Copy link
Contributor Author

pjh commented Jan 22, 2021

Looking at the startup script output from a single 2004 node: installing the Containers feature and rebooting adds just under 2 minutes to the startup time. Installing Docker then takes about 1 minute.

@jeremyje
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jeremyje, pjh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1bb0108 into kubernetes:master Jan 22, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/gcp Issues or PRs related to gcp provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants