-
Check requirements
- VelaD support installing KubeVela on machines based on these OS: Linux, macOS, Windows.
- If you are using Linux or macOS, make sure your machine have
curl
installed. - If you are using macOS or Windows, make sure you've already installed Docker.
-
Download the binary.
- MacOS/Linux
curl -fsSl https://static.kubevela.net/script/install-velad.sh | bash
- Windows
powershell -Command "iwr -useb https://static.kubevela.net/script/install-velad.ps1 | iex"
-
Install
velad install
-
Install VelaUX environment
vela addon enable ./addon
Make sure you have installed yarn 2.0, This is required.
yarn install
yarn build-packages
## Build the frontend and watch the code changes
yarn dev
## Setting the KUBECONFIG environment
export KUBECONFIG=$(velad kubeconfig --host)
make run-server
Waiting the server started, open http://127.0.0.1:8000 via the browser.
Now, the local environment is built successfully, you could write the server or frontend code.
Notes:
- If you change the frontend code, it will take effect after the website refresh.
- If you change the server code, it will take effect after restarted the server.
# Frontend
yarn lint
# Server
make reviewable
Frontend:
yarn test
Server:
make unit-test-server
make e2e-server-test
make build-swagger
Add following config in settings.json
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
Reference: How to build a plugin
- UI framework: @alifd/next
- Icons: react-icons