Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 25, 2020 09:28
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 velotiotech/923b09afe6ee303de28e333c9be256a3 to your computer and use it in GitHub Desktop.
Save velotiotech/923b09afe6ee303de28e333c9be256a3 to your computer and use it in GitHub Desktop.
user-data to create Windows AMI
# Setting Up machine for Jenkins
#Jenkins root directory
$jenkins_slave_path = "C:\Jenkins"
If(!(test-path $jenkins_slave_path))
{
New-Item -ItemType Directory -Force -Path $jenkins_slave_path
}
# Install Chocolatey for managing installations
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Installing required packages
# "visualstudio2017-workload-webbuildtools" this will install a lot of packages including "visualstudiobuildtool"
# and "IIS"(and IIS will get you msdeploy) and "Microsoft Web Deploy 4" but make sure you configure IIS
# before installation, if you are doing deployment on same machine. Also install WebDeploy manually beforehand to match configuration with IIS
# You have been warned!
choco install git netcat jdk8 nuget.commandline visualstudio2017-workload-webbuildtools visualstudio2017buildtools -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment