-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-workspace
executable file
·40 lines (31 loc) · 1.67 KB
/
setup-workspace
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
#!/bin/bash
## Setup bash files
sudo ln -s ~/.dotfiles/.bashrc ~/.bashrc
sudo ln -s ~/.dotfiles/.zshrc ~/.zshrc
## Setup git files
sudo ln -s ~/.dotfiles/.gitignore ~/.gitignore
sudo ln -s ~/.dotfiles/.gitconfig ~/.gitconfig
## Setup GCloud
# Add the Cloud SDK distribution URI as a package source
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Update the package list and install the Cloud SDK
sudo apt-get update && sudo apt-get install google-cloud-sdk
## Setup and install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
## Setup and install kubectl
git clone https://github.com/ahmetb/kubectx.git ~/.kubectx
COMPDIR=$(pkg-config --variable=completionsdir bash-completion)
sudo ln -sf ~/.kubectx/completion/kubens.bash $COMPDIR/kubens
sudo ln -sf ~/.kubectx/completion/kubectx.bash $COMPDIR/kubectx
## Setup FZF
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
## Setup Terraform
TER_VER=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version')
wget "https://releases.hashicorp.com/terraform/${TER_VER#?}/terraform_${TER_VER#?}_linux_amd64.zip"
unzip terraform_${TER_VER#?}_linux_amd64.zip
sudo mv terraform /usr/local/bin/ && rm terraform*