Skip to content

Instantly share code, notes, and snippets.

@kameshsampath
Created May 26, 2021 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kameshsampath/769c075a286badf8e679bca8ca88cb57 to your computer and use it in GitHub Desktop.
Save kameshsampath/769c075a286badf8e679bca8ca88cb57 to your computer and use it in GitHub Desktop.
Vagrant vm to test the CIVO marketpalce apps
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "512"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y git
if ! hash helm 2>/dev/null;
then
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod +x get_helm.sh
./get_helm.sh
fi
if ! hash kubectl 2>/dev/null;
then
curl -sSLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
curl -sSLO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
chmod +x kubectl && mv kubectl /usr/local/bin
fi
if ! hash civo 2>/dev/null;
then
curl -sSL https://civo.com/get | sh
fi
if [ ! -d kubernetes-marketplace ];
then
git clone https://github.com/civo/kubernetes-marketplace
fi
export KUBECONFIG=/vagrant/kubeconfig
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment