Skip to content

Instantly share code, notes, and snippets.

@warnergodfrey
Forked from mefellows/boxstarter.ps1
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warnergodfrey/2a151e81ab33b5e1dcea to your computer and use it in GitHub Desktop.
Save warnergodfrey/2a151e81ab33b5e1dcea to your computer and use it in GitHub Desktop.
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-UAC
Disable-InternetExplorerESC
cinst git.install -y -params '"/GitAndUnixToolsOnPath"'
cinst virtualbox -y
cinst vagrant -y
cinst packer -y
cinst packer-windows-plugins -pre -y
cinst awstools.powershell -y
cinst javaruntime -y
cinst teamcityagent -y -params "serverurl=http://builds.seek.int agentName=$env:COMPUTERNAME agentDir=$env:SystemDrive/buildAgent"
choco install golang -y
choco install hg -y
# Go
$env:GOPATH = "${env:SystemDrive}\go"
If ( -not (Test-Path $env:GOPATH) ) {
mkdir $env:GOPATH
[Environment]::SetEnvironmentVariable("GOPATH", $env:GOPATH, "Machine")
$env:path+="${env:GOPATH}\bin"
[Environment]::SetEnvironmentVariable("PATH", $env:path, "Machine")
}
# packer s3 upload plugin
go get github.com/lmars/packer-post-processor-vagrant-s3
cp "${env:GOPATH}\bin\packer-*" "${env:APPDATA}\packer.d\plugins\"
# team city environment variables:
Add-Content "${env:SystemDrive}\buildAgent\conf\buildAgent.properties" "`nenv.PACKER_VERSION=0.7.5"
Add-Content "${env:SystemDrive}\buildAgent\conf\buildAgent.properties" "`nenv.PACKER_WINDOWS=1.0.0-RC"
Add-Content "${env:SystemDrive}\buildAgent\conf\buildAgent.properties" "`nenv.PACKER_POST_PROCESSOR_VAGRANT_S3_VERSION=0.0.1" # NOTE: there currently is no version. Consider git hash?
Add-Content "${env:SystemDrive}\buildAgent\conf\buildAgent.properties" "`nenv.VAGRANT_VERSION=1.7"
Add-Content "${env:SystemDrive}\buildAgent\conf\buildAgent.properties" "`nenv.VIRTUALBOX_VERSION=4.3"
cmd.exe /c netsh firewall add portopening TCP 9090 "Port 9090 for TC"
# WinRM
cmd.exe /c winrm quickconfig -q
cmd.exe /c winrm quickconfig '-transport:http'
cmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}'
cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="1024"}'
cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}'
cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}'
cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}'
cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}'
cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}'
cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTP" '@{Port="5985"}'
cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes
cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
cmd.exe /c net stop winrm
cmd.exe /c sc config winrm start= auto
cmd.exe /c net start winrm
@warnergodfrey
Copy link
Author

Setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment