From a66938eee8cfd3b69ce90adfab4a8fc266225a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E5=85=83?= Date: Wed, 14 Oct 2020 12:01:52 +0800 Subject: [PATCH] add more to contributing guide --- CONTRIBUTING.md | 33 +++++++++++++++++++++++++++++++-- Makefile | 9 ++------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc3ac16df..684dd9a54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ contributing to `kubevela` or build a PoC (Proof of Concept). 4. golangci-lint 1.31.0+, it will install automatically if you run `make`, you can [install it manually](https://golangci-lint.run/usage/install/#local-installation) if the installation is too slow. ## Build + * Clone this project ```shell script @@ -31,12 +32,31 @@ after build, make will create `vela` binary to `bin/`, Set this path to PATH. export PATH=$PATH:/your/path/to/project/kubevela/bin ``` -* Install Vela Core +Then you can use `vela` command directly. + +* Build Vela Core ```shell script -vela install +make manager ``` +* Run Vela Core + +Firstly make sure your cluster has CRDs. + +```shell script +make core-install +``` + +Run locally: + +```shell script +make core-run +``` + +This command will run controller locally, it will use your local KubeConfig which means you need to have a k8s cluster +locally. If you don't have a one, we suggest that you could setup up a cluster with [kind](https://kind.sigs.k8s.io/). + ## Use * Create environment @@ -98,6 +118,15 @@ make test ``` ### E2E test + +** Before e2e test start, make sure you have vela-core running.** + +```shell script +make core-run +``` + +Start to test. + ``` make e2e-test ``` diff --git a/Makefile b/Makefile index b533ce5b7..88d9c7088 100644 --- a/Makefile +++ b/Makefile @@ -112,16 +112,11 @@ core-run: generate fmt vet manifests # Install CRDs into a cluster core-install: manifests - kustomize build config/crd | kubectl apply -f - + kubectl apply -f charts/vela-core/crds/ # Uninstall CRDs from a cluster core-uninstall: manifests - kustomize build config/crd | kubectl delete -f - - -# Deploy controller in the configured Kubernetes cluster in ~/.kube/config -core-deploy: manifests - cd config/manager && kustomize edit set image controller=${IMG} - kustomize build config/default | kubectl apply -f - + kubectl delete -f charts/vela-core/crds/ # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen