Skip to content

Commit

Permalink
Merge pull request #1424 from chewong/select-custom-build-mp
Browse files Browse the repository at this point in the history
test: ability to select cluster template with MachinePool for custom K8s build
  • Loading branch information
k8s-ci-robot authored Jun 8, 2021
2 parents 745c25e + 12bab6f commit e06c3d4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 478 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ maintainers and community, would love your suggestions, contributions, and help!
Also, the maintainers can be contacted at any time to learn more about how to get
involved.

To set up your environment checkout the [development guide](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/master/docs/development.md).
To set up your environment checkout the [development guide](https://capz.sigs.k8s.io/developers/development.html).

In the interest of getting more new people involved, we tag issues with
[`good first issue`][good_first_issue].
Expand Down
25 changes: 13 additions & 12 deletions docs/book/src/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ rm -f "${SSH_KEY_FILE}" 2>/dev/null
ssh-keygen -t rsa -b 2048 -f "${SSH_KEY_FILE}" -N '' 1>/dev/null
echo "Machine SSH key generated in ${SSH_KEY_FILE}"
# For Linux the ssh key needs to be b64 encoded because we use the azure api to set it
# Windows doesn't support setting ssh keys so we use cloudbase-init to set which doesn't require base64
# Windows doesn't support setting ssh keys so we use cloudbase-init to set which doesn't require base64
export AZURE_SSH_PUBLIC_KEY_B64=$(cat "${SSH_KEY_FILE}.pub" | base64 | tr -d '\r\n')
export AZURE_SSH_PUBLIC_KEY=$(cat "${SSH_KEY_FILE}.pub" | tr -d '\r\n')
```
Expand Down Expand Up @@ -403,7 +403,7 @@ You can optionally set the following variables:
| `SKIP_CREATE_MGMT_CLUSTER` | Skip management cluster creation. If skipping managment cluster creation you must specify `KUBECONFIG` and `SKIP_CLEANUP` | `false` |
| `LOCAL_ONLY` | Use Kind local registry and run the subset of tests which don't require a remotely pushed controller image. | `true` |
| `REGISTRY` | Registry to push the controller image. | `capzci.azurecr.io/ci-e2e` |
| `CLUSTER_NAME` | Name of an existing workload cluster. Will run specs against existing workload cluster. Use in conjunction with `SKIP_CREATE_MGMT_CLUSTER`, `GINKGO_FOCUS` and `KUBECONFIG`. Must specify only one e2e spec to run against with `GINKGO_FOCUS` such as `export GINKO_FOCUS=Creating.a.VMSS.cluster.with.a.single.control.plane.node`. |
| `CLUSTER_NAME` | Name of an existing workload cluster. Will run specs against existing workload cluster. Use in conjunction with `SKIP_CREATE_MGMT_CLUSTER`, `GINKGO_FOCUS` and `KUBECONFIG`. Must specify only one e2e spec to run against with `GINKGO_FOCUS` such as `export GINKO_FOCUS=Creating.a.VMSS.cluster.with.a.single.control.plane.node`. |
| `KUBECONFIG` | Used with `SKIP_CREATE_MGMT_CLUSTER` set to true. Location of kubeconfig for the management cluster you would like to use. Use `kind get kubeconfig --name capz-e2e > kubeconfig.capz-e2e` to get the capz e2e kind cluster config | '~/.kube/config' |

You can also customize the configuration of the CAPZ cluster created by the E2E tests (except for `CLUSTER_NAME`, `AZURE_RESOURCE_GROUP`, `AZURE_VNET_NAME`, `CONTROL_PLANE_MACHINE_COUNT`, and `WORKER_MACHINE_COUNT`, since they are generated by individual test cases). See [Customizing the cluster deployment](#customizing-the-cluster-deployment) for more details.
Expand Down Expand Up @@ -452,16 +452,17 @@ To run a custom test suite on a CAPZ cluster locally, set `AZURE_CLIENT_ID`, `AZ

You can optionally set the following variables:

| Variable | Description |
|--------------------------------|---------------------------------------------------------------------------------------------------------------|
| `AZURE_SSH_PUBLIC_KEY_FILE` | Use your own SSH key. |
| `SKIP_CLEANUP` | Skip deleting the cluster after the tests finish running. |
| `KUBECONFIG` | Provide your existing cluster kubeconfig filepath. If no kubeconfig is provided, `./kubeconfig` will be used. |
| `USE_CI_ARTIFACTS` | Use a CI version of Kubernetes, ie. not a released version (eg. `v1.19.0-alpha.1.426+0926c9c47677e9`) |
| `CI_VERSION` | Provide a custom CI version of Kubernetes. By default, the latest master commit will be used. |
| `TEST_CCM` | Build a cluster that uses custom versions of the Azure cloud-provider cloud-controller-manager and node-controller-manager images |
| `EXP_MACHINE_POOL` | Use [Machine Pool](topics/machinepools.md) for worker machines. |
| `REGISTRY` | Registry to push any custom k8s images or cloud provider images built. |
| Variable | Description |
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `AZURE_SSH_PUBLIC_KEY_FILE` | Use your own SSH key. |
| `SKIP_CLEANUP` | Skip deleting the cluster after the tests finish running. |
| `KUBECONFIG` | Provide your existing cluster kubeconfig filepath. If no kubeconfig is provided, `./kubeconfig` will be used. |
| `USE_CI_ARTIFACTS` | Use a CI version of Kubernetes, ie. not a released version (eg. `v1.19.0-alpha.1.426+0926c9c47677e9`) |
| `CI_VERSION` | Provide a custom CI version of Kubernetes. By default, the latest master commit will be used. |
| `TEST_CCM` | Build a cluster that uses custom versions of the Azure cloud-provider cloud-controller-manager and node-controller-manager images |
| `EXP_MACHINE_POOL` | Use [Machine Pool](topics/machinepools.md) for worker machines. |
| `REGISTRY` | Registry to push any custom k8s images or cloud provider images built. |
| `CLUSTER_TEMPLATE` | Use a custom cluster template. By default, the script will choose the appropriate cluster template based on existing environment variabes. |

You can also customize the configuration of the CAPZ cluster (assuming that `SKIP_CREATE_WORKLOAD_CLUSTER` is not set). See [Customizing the cluster deployment](#customizing-the-cluster-deployment) for more details.

Expand Down
Loading

0 comments on commit e06c3d4

Please sign in to comment.