From deab8eab6618c2685fea39ebd6f5a3fecf56b52f Mon Sep 17 00:00:00 2001 From: Dharmjit Singh Date: Tue, 20 Jul 2021 14:04:30 +0530 Subject: [PATCH 1/2] Doc improvements in test-run.md --- test/test-run.md | 53 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/test/test-run.md b/test/test-run.md index f8f1c10ab..f3c9f618d 100644 --- a/test/test-run.md +++ b/test/test-run.md @@ -2,16 +2,17 @@ This doc provides instructions about how to test BYO Host provider on a local workstation using: -- Kind for provisioning a management cluster -- CAPD provider for creating a workload cluster with control plane nodes only -- Docker run for creating hosts to be used as a capacity for BYO Host machines -- BYO Host provider to add the above hosts to the aforemention workload cluster +- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) for provisioning a management cluster +- [CAPD](https://github.com/kubernetes-sigs/cluster-api/tree/master/test/infrastructure/docker) provider for creating a workload cluster with control plane nodes only +- [Docker](https://docs.docker.com/engine/install/) run for creating hosts to be used as a capacity for BYO Host machines +- [BYOH](https://github.com/vmware-tanzu/cluster-api-provider-byoh) provider to add the above hosts to the aforemention workload cluster +- [Tilt](https://docs.tilt.dev/install.html) for faster iterative development ## Pre-requisites It is required to have a docker image to be used when doing docker run for creating hosts -You can fetch a readyt to rool image with Kubernetes v1.19 with: +You can fetch a ready to use image with Kubernetes v1.19 with: ```shell docker pull eu.gcr.io/capi-test-270117/byoh/test:v20210510 @@ -54,14 +55,19 @@ We are going using [tilt](https://tilt.dev/) in order to do so, so you can have In order to do so you need to clone both https://github.com/kubernetes-sigs/cluster-api/ and https://github.com/vmware-tanzu/cluster-api-provider-byoh locally; +__Clone CAPI and BYOH Repo__ ```shell git clone git@github.com:vmware-tanzu/cluster-api-provider-byoh.git git clone git@github.com:kubernetes-sigs/cluster-api.git -git checkout v0.4.0 +cd cluster-api +#checkout tag v0.4.0 as it supports multiple infra providers +git checkout v0.4.0 ``` -Then, from the folder where Cluster-API source code is cloned: +__Create a tilt-settings.json file__ + +Next, create a tilt-settings.json file and place it in your local copy of cluster-api: ```shell cat > tilt-settings.json < tilt-settings.json < Date: Mon, 26 Jul 2021 09:18:28 +0530 Subject: [PATCH 2/2] Added step for CNI and fix review comments --- test/test-run.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/test-run.md b/test/test-run.md index f3c9f618d..2e5693c23 100644 --- a/test/test-run.md +++ b/test/test-run.md @@ -16,7 +16,6 @@ You can fetch a ready to use image with Kubernetes v1.19 with: ```shell docker pull eu.gcr.io/capi-test-270117/byoh/test:v20210510 -docker tag eu.gcr.io/capi-test-270117/byoh/test:v20210510 kindest/node:test ``` If instead you want to create your own image, you can use [kinder](https://github.com/kubernetes/kubeadm/tree/master/kinder), a tool used for kubeadm ci testing. @@ -192,10 +191,16 @@ kubectl get BYOmachines kubectl get BYOhost ``` -Check the workload cluster +Deploy a CNI solution ```shell kind export kubeconfig --name test1 +kubectl apply -f test/e2e/data/cni/kindnet/kindnet.yaml +``` +After a short while, our nodes should be running and in Ready state. +Check the workload cluster + +```shell kubectl get nodes ```