mirror of
https://github.com/0x1d/terraform-docker-packer.git
synced 2025-12-16 14:35:06 +01:00
Add bootstrap scripts
This commit is contained in:
7
scripts/docker.sh
Normal file
7
scripts/docker.sh
Normal 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
12
scripts/hashi.sh
Normal 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
4
scripts/pi.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
touch /boot/ssh.txt
|
||||
echo 'pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0' > /boot/userconf.txt
|
||||
Reference in New Issue
Block a user