mirror of
https://github.com/lordmathis/dev-cluster.git
synced 2025-12-22 16:44:24 +00:00
Add installation steps for Velero CLI in cloud-init.yaml
This commit is contained in:
@@ -71,6 +71,12 @@ runcmd:
|
||||
# Install kubectl
|
||||
- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
- install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
||||
# Install Velero CLI
|
||||
- VELERO_VERSION=$(curl -s https://api.github.com/repos/vmware-tanzu/velero/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
- curl -LO "https://github.com/vmware-tanzu/velero/releases/download/${VELERO_VERSION}/velero-${VELERO_VERSION}-linux-amd64.tar.gz"
|
||||
- tar -xzf "velero-${VELERO_VERSION}-linux-amd64.tar.gz"
|
||||
- install -o root -g root -m 0755 "velero-${VELERO_VERSION}-linux-amd64/velero" /usr/local/bin/velero
|
||||
- rm -rf "velero-${VELERO_VERSION}-linux-amd64" "velero-${VELERO_VERSION}-linux-amd64.tar.gz"
|
||||
# Install k0s
|
||||
- curl -sSLf https://get.k0s.sh | sh
|
||||
- k0s install controller --single
|
||||
@@ -93,7 +99,7 @@ runcmd:
|
||||
- |
|
||||
su ${username} -c '
|
||||
cd /home/${username}
|
||||
curl -fsSL https://raw.githubusercontent.com/LordMathis/dotfiles/main/install.sh > /tmp/install_dotfiles.sh
|
||||
curl -fsSL https://raw.githubusercontent.com/lordmathis/dotfiles/main/install.sh > /tmp/install_dotfiles.sh
|
||||
chmod +x /tmp/install_dotfiles.sh
|
||||
/tmp/install_dotfiles.sh server
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user