From 5782cbc90ee98772721eb03c4e4551393af8d34b Mon Sep 17 00:00:00 2001 From: coesensbert Date: Thu, 19 Dec 2024 15:51:23 +0100 Subject: [PATCH] prep srv script --- prep-srv.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 prep-srv.sh diff --git a/prep-srv.sh b/prep-srv.sh new file mode 100644 index 0000000..8df5b84 --- /dev/null +++ b/prep-srv.sh @@ -0,0 +1,37 @@ +#/bin/bash +apt update +# install ops tools +apt install sudo nmon tmux tcpdump nano iputils-ping net-tools pigz pv -y + +# install Docker + docker-compose +apt install ca-certificates curl gnupg lsb-release -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 +apt update +apt install docker-ce docker-ce-cli containerd.io -y +systemctl start docker + +# set TF users +wget https://docs.grid.tf/threefold_public/public/raw/branch/master/add-tf-users.sh +sh add-tf-users.sh + +# set propper sshd config +wget https://docs.grid.tf/threefold_public/public/raw/branch/master/sshd_config +cp sshd_config /etc/ssh/ +rm sshd_config +systemctl restart ssh + +# install node exporter +wget https://docs.grid.tf/threefold_public/public/raw/branch/master/monitoring/install-node-exporter.sh +sh install-node-exporter.sh + +# install promtool +wget https://docs.grid.tf/threefold_public/public/raw/branch/master/loki-system-logs.sh +sh loki-system-logs.sh + +# install docker loki plugin +wget https://docs.grid.tf/threefold_public/public/raw/branch/master/loki-docker-logs.sh +sh loki-docker-logs.sh + +# cleanup +rm *.sh