-
Notifications
You must be signed in to change notification settings - Fork 2
/
openshift.ps1
30 lines (23 loc) · 1.39 KB
/
openshift.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Create the directory for OpenShift CLI tool
New-Item -ItemType Directory c:\OC
# Change to that directory
cd c:\OC
# Download the latest openshift windows cli
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-windows.zip -OutFile C:\OC\oc.zip
# Set the path permanently
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
$newpath = "$oldpath;c:\OC"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
# Extract the archive
Expand-Archive -Force -Path c:\OC\oc.zip -DestinationPath c:\OC
# Download and Install Azure CLI
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
# Install Chocolately
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Chocolately packages
choco install firefox -y
choco install vscode -y
choco install git -y
choco install kubernetes-helm -y
choco install 7zip -y
choco install jq -y