|
| 1 | +#!/usr/bin/env powershell |
| 2 | +#Requires -RunAsAdministrator |
| 3 | + |
| 4 | +if (-Not (Test-Path -Path "$env:ProgramData\Chocolatey")) { |
| 5 | + Write-Output "Installing Chocolatey.." |
| 6 | + Set-ExecutionPolicy Bypass -Scope Process -Force |
| 7 | + iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
| 8 | +} else { |
| 9 | + Write-Output 'Ensuring chocolatey commands are on the path' |
| 10 | + |
| 11 | + $chocoExePath = Join-Path "$env:ProgramData\Chocolatey" 'bin' |
| 12 | + |
| 13 | + if ($($env:Path).ToLower().Contains($($chocoExePath).ToLower()) -eq $false) { |
| 14 | + $env:Path = [Environment]::GetEnvironmentVariable('Path',[System.EnvironmentVariableTarget]::Machine); |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +if (Get-Command VBoxManage -ErrorAction SilentlyContinue) { |
| 19 | + Write-Output "VirtuaBox is already installed!" |
| 20 | +} else { |
| 21 | + choco install -y virtualbox |
| 22 | +} |
| 23 | + |
| 24 | +if (Get-Command docker -ErrorAction SilentlyContinue) { |
| 25 | + Write-Output "Docker is already installed!" |
| 26 | +} else { |
| 27 | + choco install -y docker-toolbox |
| 28 | +} |
| 29 | + |
| 30 | +if (Get-Command kubectl -ErrorAction SilentlyContinue) { |
| 31 | + Write-Output "Kubectl is already installed!" |
| 32 | +} else { |
| 33 | + choco install -y kubernetes-cli |
| 34 | +} |
| 35 | + |
| 36 | +if (Get-Command minikube -ErrorAction SilentlyContinue) { |
| 37 | + Write-Output "Minikube is already installed!" |
| 38 | +} else { |
| 39 | + choco install -y minikube --version 0.25.2 |
| 40 | +} |
| 41 | + |
| 42 | +if (Get-Command terraform -ErrorAction SilentlyContinue) { |
| 43 | + Write-Output "Terraform is already installed!" |
| 44 | +} else { |
| 45 | + choco install -y terraform |
| 46 | +} |
| 47 | + |
| 48 | +if (Get-Command helm -ErrorAction SilentlyContinue) { |
| 49 | + Write-Output "Helm is already installed!" |
| 50 | +} else { |
| 51 | + choco install -y kubernetes-helm |
| 52 | +} |
| 53 | + |
| 54 | +if (Get-Command gcloud -ErrorAction SilentlyContinue) { |
| 55 | + Write-Output "Google Cloud SDK is already installed!" |
| 56 | +} else { |
| 57 | + choco install -y gcloudsdk |
| 58 | +} |
0 commit comments