Skip to content

Commit

Permalink
Update setup-machine-arktos.sh (#432)
Browse files Browse the repository at this point in the history
* Fix mizar deploy issue

* No need to enlist mizar

* Adjust daemon deploy

* Reverse change on arktos_up_adaptor.sh
  • Loading branch information
Hong-Chang authored Feb 9, 2021
1 parent 7d98f51 commit 396ca0b
Showing 1 changed file with 7 additions and 70 deletions.
77 changes: 7 additions & 70 deletions setup-machine-arktos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,14 @@

####################

echo Setup: Enable password login

sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
### Set password: sudo passwd ubuntu
sudo service sshd restart

####################

echo Setup: Install remote desktop

sudo apt update
sudo apt install -y ubuntu-desktop xrdp

sudo service xrdp restart
sudo apt install -y xfce4 xfce4-goodies
echo xfce4-session >~/.xsession

####################

echo Setup: Install go \(currently limited to version 1.12.12\)
echo Setup: Install go \(currently limited to version 1.13.9\)

sudo apt-get update -y -q

cd /tmp
wget https://dl.google.com/go/go1.12.12.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.12.12.linux-amd64.tar.gz
rm -rf go1.12.12.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.13.9.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.13.9.linux-amd64.tar.gz
rm -rf go1.13.9.linux-amd64.tar.gz

####################

Expand All @@ -43,23 +24,10 @@ chmod +x bazel-0.26.1-installer-linux-x86_64.sh

####################

echo Setup: Install goland

cd /tmp
wget https://download.jetbrains.com/go/goland-2019.3.4.tar.gz
tar -xzf goland-2019.3.4.tar.gz
mv GoLand-2019.3.4 ~/GoLand-2019.3.4

echo fs.inotify.max_user_watches=524288 > ./max_user_watches.conf
sudo mv ./max_user_watches.conf /etc/sysctl.d/
sudo sysctl -p --system

####################

echo Setup: Enlist arktos

cd ~
git clone https://github.com/centaurus-cloud/arktos.git ~/go/src/k8s.io/arktos
git clone https://github.com/CentaurusInfra/arktos.git ~/go/src/k8s.io/arktos
cd ~/go/src/k8s.io
ln -s ./arktos kubernetes

Expand All @@ -77,28 +45,9 @@ git tag v1.15.0

echo Setup: Install Docker

sudo apt-get update -y -q

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y -q

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

sudo apt-get update -y -q
sudo apt-get install docker-ce docker-ce-cli containerd.io -y -q
sudo apt -y install docker.io
sudo gpasswd -a $USER docker


####################

echo Setup: Install crictl
Expand Down Expand Up @@ -185,18 +134,6 @@ pip3 install PyYAML

####################

echo Setup: Change Containerd

wget -qO- https://github.com/futurewei-cloud/containerd/releases/download/tenant-cni-args/containerd.zip | zcat > /tmp/containerd
chmod +x /tmp/containerd
sudo systemctl stop containerd
sudo mv /usr/bin/containerd /usr/bin/containerd.bak
sudo mv /tmp/containerd /usr/bin/
sudo systemctl restart containerd
sudo systemctl start docker

####################

echo Setup: Setup profile

echo PATH=\"\$HOME/go/src/k8s.io/arktos/third_party/etcd:/usr/local/go/bin:\$HOME/go/bin:\$HOME/go/src/k8s.io/arktos/_output/bin:\$HOME/go/src/k8s.io/arktos/_output/dockerized/bin/linux/amd64:\$PATH\" >> ~/.profile
Expand All @@ -208,7 +145,7 @@ echo alias k8s=\"cd \$HOME/go/src/k8s.io/kubernetes\" >> ~/.profile
echo alias mizar=\"cd \$HOME/mizar\" >> ~/.profile
echo alias up=\"\$HOME/go/src/k8s.io/arktos/hack/arktos-up.sh\" >> ~/.profile
echo alias status=\"git status\" >> ~/.profile
echo alias pods=\"kubectl get pods -o wide\" >> ~/.profile
echo alias pods=\"kubectl get pods -A -o wide\" >> ~/.profile
echo alias nets=\"echo 'kubectl get subnets'\; kubectl get subnets\; echo\; echo 'kubectl get droplets'\; kubectl get droplets\; echo\; echo 'kubectl get bouncers'\; kubectl get bouncers\; echo\; echo 'kubectl get dividers'\; kubectl get dividers\; echo\; echo 'kubectl get vpcs'\; kubectl get vpcs\; echo\; echo 'kubectl get eps'\; kubectl get eps\; echo\; echo 'kubectl get networks'\; kubectl get networks\" >> ~/.profile

echo export PYTHONPATH=\"\$HOME/mizar/\" >> ~/.profile
Expand Down

0 comments on commit 396ca0b

Please sign in to comment.