Last active
September 5, 2018 02:21
-
-
Save brandocorp/50b5b44135b4583ce5639001ac237a1b to your computer and use it in GitHub Desktop.
Workstation Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 1) Install the ChefDK first | |
# * curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chefdk | |
# 2) Execute this recipe with chef-client | |
# * chef-client -z linux.rb | |
# | |
directory "#{ENV['HOME']}/bin" | |
directory "#{ENV['HOME']}/go" | |
directory "#{ENV['HOME']}/src" | |
hashitools = { | |
packer: '1.2.5', | |
terraform: '0.11.8', | |
vagrant: '2.1.4', | |
vault: '0.11.0' | |
} | |
hashitools.each do |tool, version| | |
remote_file "#{tool}_binary" do | |
source "https://releases.hashicorp.com/#{tool}/#{version}/#{tool}_#{version}_linux_amd64.zip" | |
path "/tmp/#{tool}_#{version}.zip" | |
end | |
execute "#{tool}_unpack" do | |
command "unzip -o -d /home/braabe/bin /tmp/#{tool}_#{version}.zip" | |
end | |
end | |
remote_file "golang_binary_distribution" do | |
source 'https://dl.google.com/go/go1.11.linux-amd64.tar.gz' | |
path '/tmp/go-1.11.tar.gz' | |
notifies :run, 'execute[golang_unpack]', :immediately | |
end | |
execute "golang_unpack" do | |
command 'tar -C /usr/local -xzvf /tmp/go-1.11.tar.gz' | |
action :nothing | |
end | |
remote_file "minikube_binary" do | |
source 'https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64' | |
path "#{ENV['HOME']}/bin/minikube" | |
mode '755' | |
end | |
remote_file "hub_binary" do | |
source 'https://github.com/github/hub/releases/download/v2.5.1/hub-linux-amd64-2.5.1.tgz' | |
path '/tmp/hub-2.5.1.tgz' | |
notifies :run, 'execute[hub_unpack]', :immediately | |
end | |
execute "hub_unpack" do | |
command "tar -C /tmp -xzvf /tmp/hub-2.5.1.tgz" | |
action :nothing | |
notifies :run, 'execute[hub_installer]', :immediately | |
end | |
execute "hub_installer" do | |
command '/tmp/hub-linux-amd64-2.5.1/install' | |
action :nothing | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo chown -R braabe:braabe /usr/local/bin | |
# Brave | |
curl https://s3-us-west-2.amazonaws.com/brave-apt/keys.asc \ | |
| sudo apt-key add - | |
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt `lsb_release -sc` main" \ | |
| sudo tee /etc/apt/sources.list.d/brave-`lsb_release -sc`.list | |
# Docker | |
mkdir -p /etc/docker | |
echo '{ "storage-driver": "overlay2" }' \ | |
| sudo tee /etc/docker/daemon.json | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \ | |
| sudo apt-key add - | |
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ | |
| sudo tee /etc/apt/sources.list.d/docker.list | |
# golang | |
sudo install -g $USER -o $USER -d /usr/local/go | |
# Helm | |
curl -sSf https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get \ | |
| bash | |
# K8s | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg \ | |
| sudo apt-key add - | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" \ | |
| sudo tee /etc/apt/sources.list.d/kubernetes.list | |
# Rust | |
curl https://sh.rustup.rs -sSf | tee /tmp/rustup | |
bash /tmp/rustup -y | |
# RVM | |
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
# VSCode | |
curl https://packages.microsoft.com/keys/microsoft.asc \ | |
| gpg --dearmor \ | |
| sudo apt-key add - | |
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" \ | |
| sudo tee /etc/apt/sources.list.d/vscode.list | |
# yarnpkg | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
brave \ | |
ca-certificates \ | |
code \ | |
curl \ | |
docker-ce \ | |
git \ | |
htop \ | |
kubectl \ | |
software-properties-common \ | |
tree \ | |
vim \ | |
yarn \ | |
zsh | |
# Oh My ZSH | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment