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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ function set-linux-node-image() {
function set-windows-node-image() {
WINDOWS_NODE_IMAGE_PROJECT="windows-cloud"
if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-v20210112"
WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-v20210413"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-v20210112"
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-v20210413"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2004" ]]; then
WINDOWS_NODE_IMAGE="windows-server-2004-dc-core-v20210112"
WINDOWS_NODE_IMAGE="windows-server-2004-dc-core-v20210413"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION,,}" == "win20h2" ]]; then
WINDOWS_NODE_IMAGE="windows-server-20h2-dc-core-v20210112"
WINDOWS_NODE_IMAGE="windows-server-20h2-dc-core-v20210413"
else
echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2
exit 1
Expand Down
27 changes: 16 additions & 11 deletions cluster/gce/windows/configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,25 @@ try {
exit 0
}

if (-not (Test-DockerIsInstalled)) {
Install-Docker
}
# For some reason the docker service may not be started automatically on the
# first reboot, although it seems to work fine on subsequent reboots.
Restart-Service docker
Start-Sleep 5
if (-not (Test-DockerIsRunning)) {
throw "docker service failed to start or stay running"
$kube_env = Fetch-KubeEnv
Set-EnvironmentVars

# Install Docker if the select CRI is not containerd and docker is not already
# installed.
if (${env:CONTAINER_RUNTIME} -ne "containerd") {
if (-not (Test-DockerIsInstalled)) {
Install-Docker
}
# For some reason the docker service may not be started automatically on the
# first reboot, although it seems to work fine on subsequent reboots.
Restart-Service docker
Start-Sleep 5
if (-not (Test-DockerIsRunning)) {
throw "docker service failed to start or stay running"
}
}

Set-PrerequisiteOptions
$kube_env = Fetch-KubeEnv

if (Test-IsTestCluster $kube_env) {
Log-Output 'Test cluster detected, installing OpenSSH.'
Expand All @@ -147,7 +153,6 @@ try {
StartProcess-WriteSshKeys
}

Set-EnvironmentVars
Create-Directories
Download-HelperScripts

Expand Down