1
0
Форкнуть 0

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:
Yosef Durr 2018-09-18 09:37:18 -07:00 коммит произвёл GitHub
Родитель 01c3847732
Коммит 79bbe5bdc4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 125 добавлений и 53 удалений

Просмотреть файл

@ -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).
## 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
## Working with Chocolatey in an organization?

Просмотреть файл

@ -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 "RemoveDefaultApps.ps1";
executeScript "CommonDevTools.ps1";
executeScript "VirtualizationTools.ps1";
executeScript "GetMLPythonSamplesOffGithub.ps1";
executeScript "HyperV.ps1";
executeScript "WSL.ps1";
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 python-numpy python-scipy -y
Ubuntu1804 run pip install pandas
write-host "Finished installing tools inside the WSL distro"
Enable-UAC

Просмотреть файл

@ -26,16 +26,15 @@ executeScript "FileExplorerSettings.ps1";
executeScript "SystemConfiguration.ps1";
executeScript "CommonDevTools.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "VirtualizationTools.ps1";
executeScript "HyperV.ps1";
executeScript "Docker.ps1";
executeScript "WSL.ps1";
executeScript "Browsers.ps1";
#--- Tools ---
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension msjsdiag.debugger-for-edge
#--- Browsers ---
choco install -y googlechrome
choco install -y firefox
#--- Microsoft WebDriver ---
choco install -y microsoftwebdriver

Просмотреть файл

@ -26,11 +26,8 @@ executeScript "SystemConfiguration.ps1";
executeScript "FileExplorerSettings.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "CommonDevTools.ps1";
executeScript "VirtualizationTools.ps1";
#--- Browsers ---
choco install -y Firefox
choco install -y Googlechrome
executeScript "WSL.ps1";
executeScript "Browsers.ps1";
#--- Tools ---
code --install-extension msjsdiag.debugger-for-chrome

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
Просмотреть файл

@ -0,0 +1,3 @@
#--- Browsers ---
choco install -y googlechrome
choco install -y firefox

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
Просмотреть файл

@ -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-Hyper-V-All -source windowsFeatures
# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux
# alternative to above: Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Hyper-V
choco install -y docker-for-windows
choco install -y vscode-docker
#--- Ubuntu ---
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
Ubuntu1804 install --root
<#
NOTE: Other distros can be scripted the same way for example:
#--- SLES ---
# Install SLES Store app
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
Add-AppxPackage -Path ~/SLES.appx
# Launch SLES
sles-12.exe
# --- openSUSE ---
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
Add-AppxPackage -Path ~/openSUSE.appx
# Launch openSUSE
opensuse-42.exe
#>
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
#--- Ubuntu ---
# TODO: Move this to choco install once --root is included in that package
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 root user, unset password
Ubuntu1804 install --root
Ubuntu1804 run apt update
Ubuntu1804 run apt upgrade -y
<#
NOTE: Other distros can be scripted the same way for example:
#--- SLES ---
# Install SLES Store app
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
Add-AppxPackage -Path ~/SLES.appx
# Launch SLES
sles-12.exe
# --- openSUSE ---
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
Add-AppxPackage -Path ~/openSUSE.appx
# Launch openSUSE
opensuse-42.exe
#>