Update README for GCE/Windows

Add instructions to create e2e clusters without building binaries
locally. Also update the instructions to build the binaries locally.
This commit is contained in:
Yu-Ju Hong 2019-06-03 10:53:43 -07:00
parent acb321e614
commit 4a7be385a1

View File

@ -27,15 +27,18 @@ export CLOUDSDK_CORE_PROJECT=<your_project_name>
### 1. Build Kubernetes ### 1. Build Kubernetes
NOTE: this step is only needed if you want to test local changes you made to
the codebase.
The most straightforward approach to build those binaries is to run `make The most straightforward approach to build those binaries is to run `make
release`. However, that builds binaries for all supported platforms, and can be release`. However, that builds binaries for all supported platforms, and can be
slow. You can speed up the process by following the instructions below to only slow. You can speed up the process by following the instructions below to only
build the necessary binaries. build the necessary binaries.
``` ```
# Apply https://github.com/pjh/kubernetes/pull/43 to your tree: # Apply https://github.com/yujuhong/kubernetes/commit/27e608a050a997be5ab736a7cdeb29aa68f3b7ee to your tree:
curl \ curl \
https://patch-diff.githubusercontent.com/raw/pjh/kubernetes/pull/43.patch | \ https://github.com/yujuhong/kubernetes/commit/27e608a050a997be5ab736a7cdeb29aa68f3b7ee.patch | \
git apply git apply
# Build binaries for both Linux and Windows: # Build binaries for both Linux and Windows:
@ -62,6 +65,7 @@ plane only runs on Linux.
export NUM_NODES=2 # number of Linux nodes export NUM_NODES=2 # number of Linux nodes
export NUM_WINDOWS_NODES=2 export NUM_WINDOWS_NODES=2
export KUBE_GCE_ENABLE_IP_ALIASES=true export KUBE_GCE_ENABLE_IP_ALIASES=true
export KUBERNETES_NODE_PLATFORM=windows
export LOGGING_STACKDRIVER_RESOURCE_TYPES=new export LOGGING_STACKDRIVER_RESOURCE_TYPES=new
``` ```
@ -84,10 +88,20 @@ PROJECT=${CLOUDSDK_CORE_PROJECT} KUBERNETES_SKIP_CONFIRM=y ./cluster/kube-down.s
#### 2b. Create a Kubernetes end-to-end (E2E) test cluster #### 2b. Create a Kubernetes end-to-end (E2E) test cluster
If you have built your own release binaries following step 1, run the following
command:
``` ```
PROJECT=${CLOUDSDK_CORE_PROJECT} go run ./hack/e2e.go -- --up PROJECT=${CLOUDSDK_CORE_PROJECT} go run ./hack/e2e.go -- --up
``` ```
Otherwise, you can specify what branch from which to get the release artifacts:
```
# Get the latest build from the stable1 branch
PROJECT=${CLOUDSDK_CORE_PROJECT} go run ./hack/e2e.go -- --up --extract=ci/k8s-stable1
# Or Get the latest build from master
PROJECT=${CLOUDSDK_CORE_PROJECT} go run ./hack/e2e.go -- --up --extract=ci-cross/latest
```
This command, by default, tears down any existing E2E cluster and creates a new This command, by default, tears down any existing E2E cluster and creates a new
one. To teardown the cluster run the same command with `--down` instead of one. To teardown the cluster run the same command with `--down` instead of
`--up`. `--up`.