Add bootstrap scripts

This commit is contained in:
0x1d
2025-04-21 17:31:12 +02:00
parent 34495a389b
commit b9cdb9fa15
6 changed files with 44 additions and 13 deletions

7
scripts/docker.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
rm get-docker.sh
usermod -aG docker pi

12
scripts/hashi.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# install hashistack
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update
sudo apt install -y nomad consul
# install CNI plugins
curl -L -o /tmp/cni-plugins.tgz "https://github.com/containernetworking/plugins/releases/download/v1.0.0/cni-plugins-linux-$([ $(uname -m) = aarch64 ] && echo arm64 || echo amd64)"-v1.0.0.tgz
sudo mkdir -p /opt/cni/bin
sudo tar -C /opt/cni/bin -xzf /tmp/cni-plugins.tgz

4
scripts/pi.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
touch /boot/ssh.txt
echo 'pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0' > /boot/userconf.txt