-
Notifications
You must be signed in to change notification settings - Fork 21
/
ee-awsprep.sh
executable file
·47 lines (37 loc) · 1.36 KB
/
ee-awsprep.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
if [ ! -f ~/eks-casa/eksctl ]; then
echo "Install eksctl"
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C ~/eks-casa
# curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/v0.92.0/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C ~/eks-casa
fi
if [ ! -f ~/eks-casa/kubectl ]; then
echo "Install kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# curl -LO "https://dl.k8s.io/release/v1.23.1/bin/linux/amd64/kubectl"
chmod 755 kubectl
fi
if [ ! -f ~/eks-casa/helm ]; then
echo "Install helm"
wget https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz
tar -zxvf helm-v3.7.0-linux-amd64.tar.gz
mv linux-amd64/helm .
rm helm-v3.7.0-linux-amd64.tar.gz
rm -rf linux-amd64
fi
cat ~/.bashrc | grep eks-casa
if [ `echo $?` -eq 1 ]
then
echo "export PATH=$PATH:~/eks-casa" >> ~/.bashrc
echo "alias k=kubectl" >> ~/.bashrc
fi
source ~/.bashrc
echo "Generate ssh public key if not existing"
if [ ! -f ~/.ssh/id_rsa ]; then
ssh-keygen -q -f ~/.ssh/id_rsa -N ""
fi
clear
echo "" | awk '{print $1}'
echo "You are ready to deploy now!"
echo "" | awk '{print $1}'
echo "-------Created by Yongkang"
echo "-------Email me if any suggestions or issues he@yongkang.cloud"
echo "" | awk '{print $1}'