add more to contributing guide

This commit is contained in:
天元
2020-10-14 12:01:52 +08:00
parent 395e2d55f7
commit a66938eee8
2 changed files with 33 additions and 9 deletions
+31 -2
View File
@@ -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
```
+2 -7
View File
@@ -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