-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started with Longhorn Development
This page will go over setting up your environment for development work on the current version of longhorn. Since longhorn involves in system programming, it should be tested in Linux environment. If you want to use IDE such as GoLand in your MacOS, you may need to set up a linux server.
-
Click Tools -> Deployment -> Configuration -> “+” button
-
Choose SFTP
-
In Connection
- Host: IP address of the remote server
- User Name: user name of the remote host
- Authentication: choose Key pair, find your private key path (usually
~/.ssh/id_rsa
) - Root path: click Autodetect
-
In Mappings
- Local path: your repo path
- Deployment path: the corresponding repo path on your remote host
-
Deployment configuration completed
-
Click Tools -> Deployment -> Options Upload changed files automatically to the default server: choose Always or On explicit save action
Warning: Since the local repo and the remote repo are different local repos from git perspective, please keep git commit operations in the same side.
Click GoLand -> Preference -> Tools -> File Wathcers -> "+" button -> choose "go fmt"
Trash is a dependency management tool written by Rancher for use with rancher. You'll only need this to update your dependencies. See more info here: Trash - Go ./vendor manager
go get -u github.com/rancher/trash
Warning: Please run trash in *case sensitive file system, otherwise you may encounter "Permission denied" issues. By default, the filesystem of Mac OS is case insensitive.
curl -L https://releases.rancher.com/install-docker/18.09.sh | sh
You can choose other version here:
install-docker supported by rancher
Then add user in 'docker' group:
sudo usermod -aG docker $USER
Install the latest version of go
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go
You should add the gopath bin directory to your path. Add the following to your .profile
or .bashrc
or other shell file
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
sudo apt install -y open-iscsi
sudo apt-get install jq
sudo apt install python-pip
sudo apt install python2.7