Created
May 26, 2021 06:40
-
-
Save kameshsampath/769c075a286badf8e679bca8ca88cb57 to your computer and use it in GitHub Desktop.
Vagrant vm to test the CIVO marketpalce apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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