Welcome developers! This guide will help you on setting up development environment for Shifu
on Linux
Ubuntu 20.04 LTS
Please submit an issue to GitHub if you are having issue following this guide/you have noticed anything wrong with this guide.
Use the following command to clone Shifu:
git clone https://github.com/Edgenesis/shifu.git
Follow the official installation guide from Docker official website.
Download the installation deb
and install.
After installation, use "File --> Open Folder" to open Shifu directory:
A prompt should show up automatically to open this project in remote container:
Click on that, VSCode should open your project in remote container. Your development environment is ready!
Note: If you use Visual Studio Code
with Dev Container
you can skip all below environment setup steps.
From Go, download and install go using the following command:
wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
from kind, install with:
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.16.0/kind-linux-amd64 \
&& chmod +x ./kind \
&& mv ./kind /usr/local/bin/kind
from kubernetes, install with:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
from kubebuilder, install with:
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH)
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
Navigate to shifu
's directory, issue:
GO111MODULE=on go mod download
(Optional) If you are having issue download dependencies, add a proxy by using:
GOPROXY=https://goproxy.cn,direct GO111MODULE=on go mod download
Follow our build guide and start building Shifu
.