-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup.ps1
More file actions
34 lines (29 loc) · 856 Bytes
/
Setup.ps1
File metadata and controls
34 lines (29 loc) · 856 Bytes
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
31
32
33
34
Install-Module -Name psake
Install-Module -Name PsHosts
Install-Module -Name PSKubectl
Install-Module -Name SimplySql
dotnet tool install --global smite-cli
dotnet tool update --global smite-cli
$IsFedora = $false
$IsUbuntu = $false
if ($IsLinux) {
$release = Get-Content -Path /etc/os-release
$release = $release.Split([Environment]::NewLine) | Where-Object { $_.StartsWith("ID=") }
$release = $release.Substring(3)
$IsFedora = ($release -eq "Fedora")
$IsUbuntu = ($release -eq "Ubuntu")
}
if ($IsWindows) {
choco install kubernetes-cli
Add-HostEntry -Name postgres -Loopback -Force
Add-HostEntry -Name mongo -Loopback -Force
}
elseif ($IsFedora) {
sudo dnf -y install docker-compose
}
elseif ($IsUbuntu) {
sudo apt -y install docker-compose
}
else {
Write-Error "OS and/or distribution is not supported"
}