Skip to content

Instantly share code, notes, and snippets.

@bbaaxx
Last active July 2, 2020 22:59
Show Gist options
  • Save bbaaxx/071ca1ac204a1ecb9685e4a49fd226b6 to your computer and use it in GitHub Desktop.
Save bbaaxx/071ca1ac204a1ecb9685e4a49fd226b6 to your computer and use it in GitHub Desktop.
Not a script to install Fabric in AWS EC2
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y \
vim \
curl \
wget \
tmux \
zsh \
build-essential \
apt-transport-https \
ca-certificates \
gnupg-agent \
software-properties-common
sudo reboot # better now than later
# Pimp the command line
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
# Setup ESB Disk
lsblk
sudo mkfs -t xfs /dev/xvdb
sudo mkdir /dckroot
sudo mount /dev/xvdb /dckroot
sudo cp /etc/fstab /etc/fstab.orig # Better safe than sorry
sudo lsblk -o +UUID # Make note of the disk's UUID
sudo vim /etc/fstab
# Add this to /etc/fstab replace UUID with lsblk output to persist mount
UUID=<REPLACE WITH UUID from `lsblk -o +UUI1D` command> /dckroot xfs defaults,nofail 0 2
# install docker
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 && sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# Test docker and allow user execution
sudo docker run hello-world
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable docker
# Install docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.26.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# Install golang
cd /tmp
wget https://dl.google.com/go/go1.13.12.linux-amd64.tar.gz
sudo tar -xvf go1.13.12.linux-amd64.tar.gz
sudo mv go /usr/local
# Add these to .profile or .bashrc/.zshrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 10
nvm alias default 10
# Install Yarn
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 update && sudo apt install --no-install-recommends yarn
sudo reboot # once more with feeling
# Install Fabric
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.0.1 1.4.6 0.4.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment