Started a demoscripts folder, refactored some helper scripts (#70)
* moving all recipes to dynamically find helper scripts * started to a devops_azure script * re-organizing some existing scripts * updated Readme known issues
This commit is contained in:
@@ -49,7 +49,8 @@ with a non-blank password. Use this user going forward. For more info on WSL ple
|
|||||||
2. If you're a Node.js contributor working on Node.js core, please see the [Node.js Bootstrapping Guide](https://github.com/nodejs/node/tree/master/tools/bootstrap) or [click here to run](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter).
|
2. If you're a Node.js contributor working on Node.js core, please see the [Node.js Bootstrapping Guide](https://github.com/nodejs/node/tree/master/tools/bootstrap) or [click here to run](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter).
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
- Reboot is not always logging you back in to resume the script. This is being tracked [here](https://github.com/chocolatey/boxstarter/issues/318). If you experience this please login manually and the script will continue running.
|
- The Boxstarter ClickOnce installer does not work when using Chrome. This issue is being tracked [here](https://github.com/chocolatey/boxstarter/issues/345). Please use Edge to run the ClickOnce installer.
|
||||||
|
- Reboot is not always logging you back in to resume the script. This is being tracked [here](https://github.com/chocolatey/boxstarter/issues/318). The workaround is to login manually and the script will continue running.
|
||||||
- There have been reports of Windows 1803 not successfully launching Boxstarter via the web launcher. See this issue for details: https://github.com/chocolatey/boxstarter/issues/301
|
- There have been reports of Windows 1803 not successfully launching Boxstarter via the web launcher. See this issue for details: https://github.com/chocolatey/boxstarter/issues/301
|
||||||
|
|
||||||
## Working with Chocolatey in an organization?
|
## Working with Chocolatey in an organization?
|
||||||
|
|||||||
42
demos/chocolateyfest2018.ps1
Normal file
42
demos/chocolateyfest2018.ps1
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Description: Boxstarter Script
|
||||||
|
# Author: Microsoft
|
||||||
|
# Common settings for web dev
|
||||||
|
|
||||||
|
Disable-UAC
|
||||||
|
|
||||||
|
# Get the base URI path from the ScriptToCall value
|
||||||
|
$bstrappackage = "-bootstrapPackage"
|
||||||
|
$helperUri = $Boxstarter['ScriptToCall']
|
||||||
|
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||||
|
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||||
|
$helperUri = $helperUri.TrimStart("'", " ")
|
||||||
|
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||||
|
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||||
|
$helperUri += "/scripts"
|
||||||
|
write-host "helper script base URI is $helperUri"
|
||||||
|
|
||||||
|
function executeScript {
|
||||||
|
Param ([string]$script)
|
||||||
|
write-host "executing $helperUri/$script ..."
|
||||||
|
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||||
|
}
|
||||||
|
|
||||||
|
#--- Setting up Windows ---
|
||||||
|
executeScript "FileExplorerSettings.ps1";
|
||||||
|
executeScript "SystemConfiguration.ps1";
|
||||||
|
executeScript "CommonDevTools.ps1";
|
||||||
|
executeScript "RemoveDefaultApps.ps1";
|
||||||
|
executeScript "WSL.ps1";
|
||||||
|
executeScript "VirtualizationTools.ps1";
|
||||||
|
|
||||||
|
#--- Browsers ---
|
||||||
|
choco install -y googlechrome
|
||||||
|
choco install -y firefox
|
||||||
|
|
||||||
|
# TODO: Expand on tools/configuration options here
|
||||||
|
# Tools inside WSL
|
||||||
|
# Azure CLI
|
||||||
|
|
||||||
|
Enable-UAC
|
||||||
|
Enable-MicrosoftUpdate
|
||||||
|
Install-WindowsUpdate -acceptEula
|
||||||
@@ -26,16 +26,14 @@ executeScript "SystemConfiguration.ps1";
|
|||||||
executeScript "FileExplorerSettings.ps1";
|
executeScript "FileExplorerSettings.ps1";
|
||||||
executeScript "RemoveDefaultApps.ps1";
|
executeScript "RemoveDefaultApps.ps1";
|
||||||
executeScript "CommonDevTools.ps1";
|
executeScript "CommonDevTools.ps1";
|
||||||
executeScript "VirtualizationTools.ps1";
|
executeScript "HyperV.ps1";
|
||||||
executeScript "GetMLPythonSamplesOffGithub.ps1";
|
executeScript "WSL.ps1";
|
||||||
|
|
||||||
write-host "Installing tools inside the WSL distro..."
|
write-host "Installing tools inside the WSL distro..."
|
||||||
Ubuntu1804 run apt update
|
|
||||||
Ubuntu1804 run apt upgrade -y
|
|
||||||
## Install Python tools
|
|
||||||
Ubuntu1804 run apt install python2.7 python-pip -y
|
Ubuntu1804 run apt install python2.7 python-pip -y
|
||||||
Ubuntu1804 run apt install python-numpy python-scipy -y
|
Ubuntu1804 run apt install python-numpy python-scipy -y
|
||||||
Ubuntu1804 run pip install pandas
|
Ubuntu1804 run pip install pandas
|
||||||
|
|
||||||
write-host "Finished installing tools inside the WSL distro"
|
write-host "Finished installing tools inside the WSL distro"
|
||||||
|
|
||||||
Enable-UAC
|
Enable-UAC
|
||||||
|
|||||||
@@ -26,16 +26,15 @@ executeScript "FileExplorerSettings.ps1";
|
|||||||
executeScript "SystemConfiguration.ps1";
|
executeScript "SystemConfiguration.ps1";
|
||||||
executeScript "CommonDevTools.ps1";
|
executeScript "CommonDevTools.ps1";
|
||||||
executeScript "RemoveDefaultApps.ps1";
|
executeScript "RemoveDefaultApps.ps1";
|
||||||
executeScript "VirtualizationTools.ps1";
|
executeScript "HyperV.ps1";
|
||||||
|
executeScript "Docker.ps1";
|
||||||
|
executeScript "WSL.ps1";
|
||||||
|
executeScript "Browsers.ps1";
|
||||||
|
|
||||||
#--- Tools ---
|
#--- Tools ---
|
||||||
code --install-extension msjsdiag.debugger-for-chrome
|
code --install-extension msjsdiag.debugger-for-chrome
|
||||||
code --install-extension msjsdiag.debugger-for-edge
|
code --install-extension msjsdiag.debugger-for-edge
|
||||||
|
|
||||||
#--- Browsers ---
|
|
||||||
choco install -y googlechrome
|
|
||||||
choco install -y firefox
|
|
||||||
|
|
||||||
#--- Microsoft WebDriver ---
|
#--- Microsoft WebDriver ---
|
||||||
choco install -y microsoftwebdriver
|
choco install -y microsoftwebdriver
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,8 @@ executeScript "SystemConfiguration.ps1";
|
|||||||
executeScript "FileExplorerSettings.ps1";
|
executeScript "FileExplorerSettings.ps1";
|
||||||
executeScript "RemoveDefaultApps.ps1";
|
executeScript "RemoveDefaultApps.ps1";
|
||||||
executeScript "CommonDevTools.ps1";
|
executeScript "CommonDevTools.ps1";
|
||||||
executeScript "VirtualizationTools.ps1";
|
executeScript "WSL.ps1";
|
||||||
|
executeScript "Browsers.ps1";
|
||||||
#--- Browsers ---
|
|
||||||
choco install -y Firefox
|
|
||||||
choco install -y Googlechrome
|
|
||||||
|
|
||||||
#--- Tools ---
|
#--- Tools ---
|
||||||
code --install-extension msjsdiag.debugger-for-chrome
|
code --install-extension msjsdiag.debugger-for-chrome
|
||||||
|
|||||||
38
devops_azure.ps1
Normal file
38
devops_azure.ps1
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Description: Boxstarter Script
|
||||||
|
# Author: Microsoft
|
||||||
|
# Common settings for azure devops
|
||||||
|
|
||||||
|
Disable-UAC
|
||||||
|
|
||||||
|
# Get the base URI path from the ScriptToCall value
|
||||||
|
$bstrappackage = "-bootstrapPackage"
|
||||||
|
$helperUri = $Boxstarter['ScriptToCall']
|
||||||
|
$strpos = $helperUri.IndexOf($bstrappackage)
|
||||||
|
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
|
||||||
|
$helperUri = $helperUri.TrimStart("'", " ")
|
||||||
|
$helperUri = $helperUri.TrimEnd("'", " ")
|
||||||
|
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
|
||||||
|
$helperUri += "/scripts"
|
||||||
|
write-host "helper script base URI is $helperUri"
|
||||||
|
|
||||||
|
function executeScript {
|
||||||
|
Param ([string]$script)
|
||||||
|
write-host "executing $helperUri/$script ..."
|
||||||
|
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
|
||||||
|
}
|
||||||
|
|
||||||
|
#--- Setting up Windows ---
|
||||||
|
executeScript "FileExplorerSettings.ps1";
|
||||||
|
executeScript "SystemConfiguration.ps1";
|
||||||
|
executeScript "RemoveDefaultApps.ps1";
|
||||||
|
executeScript "WSL.ps1";
|
||||||
|
executeScript "HyperV.ps1";
|
||||||
|
executeScript "Docker.ps1";
|
||||||
|
executeScript "Browsers.ps1";
|
||||||
|
|
||||||
|
# TODO: Expand on tools/configuration options here
|
||||||
|
# Azure CLI, Azure PS, Azure SDK, Ansible, TerraForms
|
||||||
|
|
||||||
|
Enable-UAC
|
||||||
|
Enable-MicrosoftUpdate
|
||||||
|
Install-WindowsUpdate -acceptEula
|
||||||
3
scripts/Browsers.ps1
Normal file
3
scripts/Browsers.ps1
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#--- Browsers ---
|
||||||
|
choco install -y googlechrome
|
||||||
|
choco install -y firefox
|
||||||
2
scripts/Docker.ps1
Normal file
2
scripts/Docker.ps1
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
choco install -y docker-for-windows
|
||||||
|
choco install -y vscode-docker
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
write-host "Downloading Python ML samples to your desktop ..."
|
|
||||||
|
|
||||||
Update-SessionEnvironment
|
|
||||||
cd $env:USERPROFILE\desktop
|
|
||||||
git clone https://github.com/Microsoft/Dev-Advocacy-Samples
|
|
||||||
1
scripts/HyperV.ps1
Normal file
1
scripts/HyperV.ps1
Normal file
@@ -0,0 +1 @@
|
|||||||
|
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
|
||||||
@@ -1,31 +1,28 @@
|
|||||||
|
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
|
||||||
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
|
|
||||||
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
|
#--- Ubuntu ---
|
||||||
# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux
|
# TODO: Move this to choco install once --root is included in that package
|
||||||
# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Hyper-V
|
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
|
||||||
choco install -y docker-for-windows
|
Add-AppxPackage -Path ~/Ubuntu.appx
|
||||||
choco install -y vscode-docker
|
# run the distro once and have it install locally with root user, unset password
|
||||||
|
Ubuntu1804 install --root
|
||||||
|
Ubuntu1804 run apt update
|
||||||
#--- Ubuntu ---
|
Ubuntu1804 run apt upgrade -y
|
||||||
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
|
|
||||||
Add-AppxPackage -Path ~/Ubuntu.appx
|
<#
|
||||||
# run the distro once and have it install locally with a blank root user
|
NOTE: Other distros can be scripted the same way for example:
|
||||||
Ubuntu1804 install --root
|
|
||||||
|
#--- SLES ---
|
||||||
<#
|
# Install SLES Store app
|
||||||
NOTE: Other distros can be scripted the same way for example:
|
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
|
||||||
|
Add-AppxPackage -Path ~/SLES.appx
|
||||||
#--- SLES ---
|
# Launch SLES
|
||||||
# Install SLES Store app
|
sles-12.exe
|
||||||
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
|
|
||||||
Add-AppxPackage -Path ~/SLES.appx
|
# --- openSUSE ---
|
||||||
# Launch SLES
|
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
|
||||||
sles-12.exe
|
Add-AppxPackage -Path ~/openSUSE.appx
|
||||||
|
# Launch openSUSE
|
||||||
# --- openSUSE ---
|
opensuse-42.exe
|
||||||
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
|
#>
|
||||||
Add-AppxPackage -Path ~/openSUSE.appx
|
|
||||||
# Launch openSUSE
|
|
||||||
opensuse-42.exe
|
|
||||||
#>
|
|
||||||
Reference in New Issue
Block a user