-
Notifications
You must be signed in to change notification settings - Fork 1
Dev Machine Installation
ssh-keygen
Save the public key of your local machine into ~/.ssh/authorized_keys
Now you can connect your VM via this command:
ssh <username>@<IP>
When encountering the below error message:
sudo tail -f /var/log/auth.log|grep 'sshd'
......
userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
......
Add this line in /etc/ssh/sshd_config
.
PubkeyAcceptedAlgorithms=+ssh-rsa
And then restart sshd service.
sudo systemctl restart sshd
Window - Virtual Machine Library - right click your machine - connect to SSH - set username and password, then remember the IP address
adduser <user name>
usermod -aG sudo <user name>
su - <user name>
sudo echo "Acquire {
HTTP::proxy "http://127.0.0.1:7890";
HTTPS::proxy "http://127.0.0.1:7890";
}
" > /etc/apt/apt.conf.d/proxy.conf
curl --proxy $HTTP_PROXY
sudo apt-get install software-properties-common -y
# sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim -y
sudo apt-get install vim-gtk -y
echo "set clipboard=unnamed" > ~/.vimrc
- Install https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
- Add your user to the "docker" group then reboot
sudo usermod -aG docker <your_vm_username>
sudo reboot
sudo zypper update
sudo zypper install docker-compose -y
sudo systemctl enable docker
sudo systemctl start docker
docker login --username=<your_docker_username> --password=<your_password>
Take a try with the following cmd:
docker ps
Step 1
dpkg -l | grep -i docker
To identify what installed package you have:
Step 2
sudo apt-get purge -y docker-engine docker docker.io docker-ce
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following commands:
sudo rm -rf /var/lib/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.6
curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo apt install lua5.3
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
git clone https://github.com/johanhaleby/kubetail.git ~/.oh-my-zsh/custom/plugins/kubetail
git clone https://github.com/skywind3000/z.lua.git ~/.oh-my-zsh/custom/plugins/z.lua
Then modify line plugins=(git)
in ~/.zshrc to:
plugins=(git bgnotify urltools zsh-autosuggestions zsh-completions zsh-syntax-highlighting z.lua)
Use ys
Or
curl -sSL git.io/jovial | sudo bash -s $USER~~
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
export LONGHORNTEST=$GOPATH/src/github.com/longhorn/longhorn-tests/manager/integration/tests:$GOPATH/src/github.com/longhorn/longhorn-engine/integration
export PYTHONPATH=$LONGHORNTEST:$PYTHONPATH
export REPO=shuowu
Add line [[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'
in ~/.zshrc
Add the following lines at the end of ~/.zshrc
:
alias zshconfig="mate ~/.zshrc"
alias ohmyzsh="mate ~/.oh-my-zsh"
alias g="git"
alias k="kubectl"
alias kl="kubectl -n=longhorn-system"
alias kt="kubetail"
alias qi="qemu-img"
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
git config --global -e
Add the following lines into the config files
[credential]
helper = store
[user]
name = Shuo Wu
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
interactive = auto
[help]
format = html
[alias]
br = branch
ca = commit --amend
ci = commit
cp = cherry-pick
co = checkout
st = status
oln = log --pretty=oneline --since='2 days ago' --color --graph --abbrev-commit
olg = log -p -1 --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue) <%an>%Creset' --abbrev-commit
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue) <%an>%Creset' --abbrev-commit
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
zip = !git archive --format zip master --output
zipHead = !git archive --format=zip HEAD --output
rmd = !git ls-files -d -z | xargs -0 git rm
df = diff
lb = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
ri = rebase -i
rc = rebase --continue
[log]
date = local
[core]
excludesfile = ~/.gitignore_global
whitespace = cr-at-eol
quotepath = false
attributesfile = ~/.gitattributes
[gui]
encoding = utf-8
[push]
default = current
[grep]
lineNumber = true
[diff "exif"]
textconv = exiftool
[diff "plist"]
textconv = plutil -convert xml1 -o -
#[http]
# proxy = socks5://127.0.0.1:1090
#[https]
# proxy = socks5://127.0.0.1:1090
echo "https:{<username>}:{<password>}@github.com" > ~/.git-credentials
mkdir -p ~/go/src/github.com/longhorn
mkdir -p ~/go/src/github.com/rancher
g clone https://github.com/longhorn/longhorn.git ~/go/src/github.com/longhorn/longhorn
cd ~/go/src/github.com/longhorn/longhorn
g remote add shuo-wu [email protected]:shuo-wu/longhorn.git
g clone https://github.com/longhorn/longhorn-manager.git ~/go/src/github.com/longhorn/longhorn-manager
cd ~/go/src/github.com/longhorn/longhorn-manager
g remote add shuo-wu [email protected]:shuo-wu/longhorn-manager.git
g clone https://github.com/longhorn/longhorn-engine.git ~/go/src/github.com/longhorn/longhorn-engine
cd ~/go/src/github.com/longhorn/longhorn-engine
g remote add shuo-wu [email protected]:shuo-wu/longhorn-engine.git
g clone https://github.com/longhorn/longhorn-instance-manager.git ~/go/src/github.com/longhorn/longhorn-instance-manager
cd ~/go/src/github.com/longhorn/longhorn-instance-manager
g remote add shuo-wu [email protected]:shuo-wu/longhorn-instance-manager.git
g clone https://github.com/longhorn/longhorn-tests.git ~/go/src/github.com/longhorn/longhorn-tests
cd ~/go/src/github.com/longhorn/longhorn-tests
g remote add shuo-wu [email protected]:shuo-wu/longhorn-tests.git
g clone https://github.com/longhorn/longhorn-share-manager.git ~/go/src/github.com/longhorn/longhorn-share-manager
cd ~/go/src/github.com/longhorn/longhorn-share-manager
g remote add shuo-wu [email protected]:shuo-wu/longhorn-share-manager.git
g clone https://github.com/longhorn/backing-image-manager.git ~/go/src/github.com/longhorn/backing-image-manager
cd ~/go/src/github.com/longhorn/backing-image-manager
g remote add shuo-wu [email protected]:shuo-wu/backing-image-manager.git
g clone https://github.com/longhorn/backupstore.git ~/go/src/github.com/longhorn/backupstore
cd ~/go/src/github.com/longhorn/backupstore
g remote add shuo-wu [email protected]:shuo-wu/backupstore.git
g clone https://github.com/longhorn/charts.git ~/go/src/github.com/longhorn/charts
cd ~/go/src/github.com/longhorn/charts
g remote add shuo-wu [email protected]:shuo-wu/longhorn-charts.git
g clone https://github.com/longhorn/go-iscsi-helper.git ~/go/src/github.com/longhorn/go-iscsi-helper
cd ~/go/src/github.com/longhorn/go-iscsi-helper
g remote add shuo-wu [email protected]:shuo-wu/go-iscsi-helper.git
g clone https://github.com/longhorn/sparse-tools.git ~/go/src/github.com/longhorn/sparse-tools
cd ~/go/src/github.com/longhorn/sparse-tools
g remote add shuo-wu [email protected]:shuo-wu/sparse-tools.git
g clone https://github.com/rancher/charts.git ~/go/src/github.com/rancher/charts
cd ~/go/src/github.com/rancher/charts
g remote add shuo-wu [email protected]:shuo-wu/charts.git
g clone https://github.com/rancher/tgt.git ~/go/src/github.com/rancher/tgt
cd ~/go/src/github.com/rancher/tgt
g remote add shuo-wu [email protected]:shuo-wu/tgt.git
g clone https://github.com/rancher/liblonghorn.git ~/go/src/github.com/rancher/liblonghorn
cd ~/go/src/github.com/rancher/liblonghorn
g remote add shuo-wu [email protected]:shuo-wu/liblonghorn.git
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip -O protoc.zip
unzip protoc.zip -d ./protoc
sudo cp ./protoc/bin/protoc /usr/local/bin/
rm -r ./protoc protoc.zip
pip3 install grpcio==1.22.0 grpcio_tools==1.22.0
mkdir -p ~/go/src/github.com/golang/
git clone https://github.com/golang/protobuf.git ~/go/src/github.com/golang/protobuf
cd ~/go/src/github.com/golang/protobuf
git checkout v1.3.2
cd protoc-gen-go
go build
sudo cp protoc-gen-go /usr/local/bin
cd ~
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher