I'm glad you can see this document and I'm looking forward to your contributions to the Yatai.
Yatai does not rely on cloud-native, but it is accessible to cloud-native based yatai-deployment as a RESTful api-server, so how to bridge the network between the Kubernetes cluster and the local development environment is a problem that needs to be solved
As you know, Kubernetes has a complex network environment, so developing cloud-native related products locally can be a challenge. But don't worry, this document will show you how to develop Yatai locally easily, quickly and comfortably.
-
Yatai Git project use LFS to storage large image files in the documentation.
-
A Yatai installed in the development environment for development and debugging
NOTE: Since you are developing, you must not use the production environment, so we recommend using the quick install script to install Yatai in the local minikube
Using a pre-installed Yatai in the development environment, the aim is to quickly provide a range of out-of-the-box infrastructure dependencies
You can start by reading this installation document to install Yatai. It is highly recommended to use the quick install script to install Yatai
Remember, never use infrastructure from the production environment, only use newly installed infrastructure in the cluster, such as SQL databases, blob storage, docker registry, etc. The quick install script mentioned above will prevent you from using the infrastructure in the production environment, this script will help you to install all the infrastructure from scratch, you can use it without any worries.
If you have already installed it, please verify that your kubectl context is correct with the following command:
kubectl config current-context
-
Used to parse json from the command line
-
Yatai api-server is implemented by Go Programming Language
-
Yatai Web UI is implemented by TypeScript + React
- We recommend installing NodeJS using
nvm
which allows developers to quickly install and use different versions of node:
# Install NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash nvm install 14.17.1 nvm alias default 14.17.1
- We recommend installing NodeJS using
-
Yatai Web UI uses
yarn
to manage dependencies.npm install -g yarn
-
The most critical dependency in this document for bridging the local network and the Kubernetes cluster network
-
Fork the Yatai project on GitHub
-
Clone the source code from your fork of Yatai's GitHub repository:
git clone [email protected]:${your github username}/Yatai.git && cd Yatai
-
Add the Yatai upstream remote to your local Yatai clone:
git remote add upstream [email protected]:bentoml/Yatai.git
-
Installing Go dependencies
go mod download
git checkout main
-
Use the git pull command to retrieve content from the BentoML GitHub repository.
git pull upstream main -r
-
Create a new branch and switch to it.
git checkout -b your-new-branch-name
-
Make your changes!
-
Use the git add command to save the state of files you have changed.
git add <names of the files you have changed>
-
Commit your changes.
git commit -m 'your commit message'
-
Synchronize upstream changes
git pull upstream main -r
-
Push all changes to your forked repo on GitHub.
git push origin your-new-branch-name
-
Connect to the Kubernetes cluster network
telepresence connect
-
Run Yatai api-server
NOTE: The following command uses the infrastructure of the Kubernetes environment in the current kubectl context and replaces the behavior of Yatai in the current Kubernetes environment, so please proceed with caution
make start-dev
-
✨ Enjoy it!
-
Install dependencies
cd dashboard yarn cd -
-
Run frontend proxy server
cd dashboard yarn start
-
✨ Enjoy it!