Skip to content

Commit ee71546

Browse files
committed
Initial script to install tools on Windows
1 parent 5fc10e9 commit ee71546

File tree

3 files changed

+78
-4
lines changed

3 files changed

+78
-4
lines changed

SETUP.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ connectivity.
77

88
## Installing Required Tools
99

10-
You can run the [`setup-workstation.sh`](./setup-workstation.sh) script to
11-
install the required tools (currently only supports MacOS using
12-
[HomeBrew](https://brew.sh/), working on Linux and Windows versions), or you can
13-
follow the instructions to install them manually:
10+
These are the tools required for the workshop and the links for installation
11+
instructions if you want to install them manually:
1412

1513
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
1614
* [Docker](https://docs.docker.com/install/) 18+
@@ -21,6 +19,21 @@ follow the instructions to install them manually:
2119
* [terraform](https://www.terraform.io/intro/getting-started/install.html) 0.11+
2220
* [Google Cloud SDK tools](https://cloud.google.com/sdk/downloads) 196+
2321

22+
### Auto-Install on Mac OS X
23+
24+
You can run the [`setup-workstation.sh`](./setup-workstation.sh) script to
25+
install the required tools using [HomeBrew](https://brew.sh/).
26+
27+
### Auto-Install on Windows + Powershell
28+
29+
If you have Powershell, make sure you open an [administrative shell](http://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/)
30+
and you can execute the [`setup/windows.ps1`](./setup/windows.ps1) script to
31+
install the required tools using [Chocolatey](https://chocolatey.org).
32+
33+
### Auto-Install on Linux
34+
35+
In progres...
36+
2437
## Google Cloud Platform Account Setup
2538

2639
You will need a working Google Cloud Platform account for the second half of the

setup-workstation.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ case $OSTYPE in
55
darwin*)
66
source setup/osx.sh
77
;;
8+
msys*)
9+
setup/windows.ps1
10+
;;
811
esac

setup/windows.ps1

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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

Comments
 (0)