Created
January 8, 2023 15:47
-
-
Save whittlem/d26b2dd22fa969042f4e5d37afb55ce3 to your computer and use it in GitHub Desktop.
install-pycryptobot.sh
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 | |
DEBIAN_FRONTEND=noninteractive apt update -y | |
DEBIAN_FRONTEND=noninteractive apt install git python3 python3-pip unzip --assume-yes -y | |
DEBIAN_FRONTEND=noninteractive apt install apt-transport-https ca-certificates curl software-properties-common --assume-yes -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
DEBIAN_FRONTEND=noninteractive apt update --assume-yes -y | |
DEBIAN_FRONTEND=noninteractive apt upgrade --assume-yes -y | |
# apt-cache policy docker-ce | |
DEBIAN_FRONTEND=noninteractive apt install docker-ce --assume-yes -y | |
systemctl start docker | |
usermod -aG docker ubuntu | |
fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
# ls -lh /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile none swap sw 0 0" | tee -a /etc/fstab | |
# swapon -s | |
# free -h | |
sysctl vm.swappiness=15 | |
# cat /proc/sys/vm/swappiness | |
sysctl vm.vfs_cache_pressure=60 | |
# cat /proc/sys/vm/vfs_cache_pressure | |
runuser -l ubuntu -c "export PATH=$PATH:/home/ubuntu/.local/bin" | |
runuser -l ubuntu -c "git clone https://github.com/whittlem/pycryptobot" | |
runuser -l ubuntu -c "python3 -m pip install -r pycryptobot/requirements.txt -U" | |
# aws --version | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip awscliv2.zip | |
./aws/install | |
DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates curl --assume-yes -y | |
DEBIAN_FRONTEND=noninteractive apt install -y apt-transport-https --assume-yes -y | |
curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list | |
DEBIAN_FRONTEND=noninteractive apt update --assume-yes -y | |
DEBIAN_FRONTEND=noninteractive apt install kubectl --assume-yes -y | |
# kubectl version --client | |
# kubectl version --client --output=yaml | |
# kubectl version --client --short | |
# https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html | |
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp | |
mv /tmp/eksctl /usr/local/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment