Skip to content

Commit

Permalink
upload Windows startup scripts to GCS for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaufen committed Feb 26, 2019
1 parent 1eb2acc commit 98edbf4
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/root/BUILD.root
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ gcs_upload(
":_binary-artifacts-and-hashes",
"//build/release-tars:release-tars-and-hashes",
"//cluster/gce/gci:gcs-release-artifacts-and-hashes",
"//cluster/gce/windows:gcs-release-artifacts-and-hashes",
],
tags = ["manual"],
# Use for_platforms to format the upload path based on the configured
Expand All @@ -53,6 +54,7 @@ gcs_upload(
upload_paths = select(for_platforms(for_all = {
"//build/release-tars:release-tars-and-hashes": "",
"//cluster/gce/gci:gcs-release-artifacts-and-hashes": "extra/gce",
"//cluster/gce/windows:gcs-release-artifacts-and-hashes": "extra/gce/windows",
"//:_binary-artifacts-and-hashes": "bin/{OS}/{ARCH}",
})),
)
Expand Down
1 change: 1 addition & 0 deletions cluster/gce/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ filegroup(
"//cluster/gce/addons:all-srcs",
"//cluster/gce/gci:all-srcs",
"//cluster/gce/manifests:all-srcs",
"//cluster/gce/windows:all-srcs",
],
tags = ["automanaged"],
)
35 changes: 35 additions & 0 deletions cluster/gce/windows/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
load("@io_k8s_repo_infra//defs:build.bzl", "release_filegroup")

# Having the Windows code from the GCE cluster deploy hosted with the release is
# useful for GKE. This list should match the list in k8s.io/release/lib/releaselib.sh.

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.
release_filegroup(
name = "gcs-release-artifacts",
srcs = [
"common.psm1",
"configure.ps1",
"k8s-node-setup.psm1",
"testonly/install-ssh.psm1",
"testonly/user-profile.psm1",
],
visibility = ["//visibility:public"],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
7 changes: 7 additions & 0 deletions cluster/gce/windows/README-GCE-Windows-kube-up.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Starting a Windows Kubernetes cluster on GCE using kube-up

## IMPORTANT PLEASE NOTE!
Any time the file structure in the `windows` directory changes, `windows/BUILD`
and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
We HIGHLY recommend not changing the file structure, because consumers of
Kubernetes releases depend on the release structure remaining stable.

## Bring up the cluster

Prerequisites: a Google Cloud Platform project.
Expand Down Expand Up @@ -185,3 +191,4 @@ These steps are based on
user@kubernetes-minion-windows-group-mk0p:C:\\etc\\kubernetes\\logs \
kubetest-logs/
```
6 changes: 6 additions & 0 deletions cluster/gce/windows/common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
and scripts for configuring Windows nodes.
#>

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.

# Disable progress bar to increase download speed.
$ProgressPreference = 'SilentlyContinue'

Expand Down
6 changes: 6 additions & 0 deletions cluster/gce/windows/configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
Top-level script that runs on Windows nodes to join them to the K8s cluster.
#>

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.

$ErrorActionPreference = 'Stop'

# Turn on tracing to debug
Expand Down
6 changes: 6 additions & 0 deletions cluster/gce/windows/k8s-node-setup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
# Execute functions manually or run configure.ps1.
#>

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.

# TODO: update scripts for these style guidelines:
# - Remove {} around variable references unless actually needed for clarity.
# - Always use single-quoted strings unless actually interpolating variables
Expand Down
6 changes: 6 additions & 0 deletions cluster/gce/windows/testonly/install-ssh.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
clusters. DO NOT USE THIS MODULE FOR PRODUCTION.
#>

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.

Import-Module -Force C:\common.psm1

$OPENSSH_ROOT = 'C:\Program Files\OpenSSH'
Expand Down
6 changes: 6 additions & 0 deletions cluster/gce/windows/testonly/user-profile.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
powershellposse.com
#>

# IMPORTANT PLEASE NOTE:
# Any time the file structure in the `windows` directory changes, `windows/BUILD`
# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes.
# We HIGHLY recommend not changing the file structure, because consumers of
# Kubernetes releases depend on the release structure remaining stable.


#Function to create the new local user first
function New-LocalUser
Expand Down

0 comments on commit 98edbf4

Please sign in to comment.