KubeVela project is initialized and maintained by the cloud native community since day 0 with bootstrapping contributors from 8+ different organizations. We intend for KubeVela to have a open governance since the very beginning and donate the project to neutral foundation as soon as it's released.
This doc explains how to set up a development environment, so you can get started
contributing to kubevela
or build a PoC (Proof of Concept).
- Golang version 1.13+
- Kubernetes version v1.16+ with
~/.kube/config
configured. - ginkgo 1.14.0+ (just for E2E test)
- golangci-lint 1.31.0+, it will install automatically if you run
make
, you can install it manually if the installation is too slow.
We also recommend you to learn about KubeVela's design before dive into its code.
- Clone this project
git clone [email protected]:oam-dev/kubevela.git
- Build Vela CLI
make
- Configure vela to PATH
after build, make will create vela
binary to bin/
, Set this path to PATH.
export PATH=$PATH:/your/path/to/project/kubevela/bin
Then you can use vela
command directly.
- Build Vela Core
make manager
- Run Vela Core
Firstly make sure your cluster has CRDs.
make core-install
Run locally:
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.
- Create environment
vela env init myenv --namespace myenv --email [email protected] --domain kubevela.io
- Create Component
For example, use the following command to create and run an application.
$ vela svc deploy mysvc -t webservice --image crccheck/hello-world --port 8000 -a abc
App abc deployed
- Add Trait
$ vela route abc
Adding route for app mysvc
⠋ Deploying ...
✅ Application Deployed Successfully!
- Name: mysvc
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:17:28 +0800 CST
Updated at: 2020-11-02T11:21:23+08:00
Routes:
- route: Visiting URL: http://abc.kubevela.io IP: 47.242.68.137
- Check Status
$ vela status abc
About:
Name: abc
Namespace: default
Created at: 2020-11-02 11:17:28.067738 +0800 CST
Updated at: 2020-11-02 11:28:13.490986 +0800 CST
Services:
- Name: mysvc
Type: webservice
HEALTHY Ready: 1/1
Last Deployment:
Created at: 2020-11-02 11:17:28 +0800 CST
Updated at: 2020-11-02T11:28:13+08:00
Routes:
- route: Visiting URL: http://abc.kubevela.io IP: 47.242.68.137
- Delete App
$ vela ls
SERVICE APP TYPE TRAITS STATUS CREATED-TIME
mysvc abc Deployed 2020-11-02 11:17:28 +0800 CST
$ vela delete abc
Deleting Application "abc"
delete apps succeed abc from default
make test
Before e2e test start, make sure you have vela-core running.
make core-run
Start to test.
make e2e-test
Remember to write unit-test and e2e test before making a pull request.
Before merging, the pull request should obey the following rules:
- The commit title and message should be clear about what this PR does.
- All test CI should pass green.
- The
codecov/project
should pass. This means the coverage should not drop. See Codecov commit status.