Skip to content

Commit

Permalink
fix userdata
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan committed Jan 8, 2017
1 parent 54cfa18 commit 987dd5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion custom-ami.json
@@ -1,5 +1,5 @@
{
"DryRun": true,
"DryRun": false,
"ImageId": "ami-3df7995a",
"KeyName": "shibayan",
"SecurityGroups": [
Expand Down
13 changes: 1 addition & 12 deletions userdata.txt
@@ -1,18 +1,7 @@
<powershell>
Invoke-WebRequest https://s3-ap-northeast-1.amazonaws.com/custom-ami-resources/requestRouter_amd64.msi -UseBasicParsing -OutFile (Join-Path $env:Temp "requestRouter_amd64.msi")
Invoke-WebRequest http://go.microsoft.com/fwlink/?LinkID=615136 -UseBasicParsing -OutFile (Join-Path $env:Temp "requestRouter_amd64.msi")

Start-Process -FilePath (Join-Path $env:Temp "requestRouter_amd64.msi") -ArgumentList "/qn" -Wait

$zipfile = Join-Path $env:Temp "basp.zip"
$outpath = "C:\basp21"

Invoke-WebRequest https://s3-ap-northeast-1.amazonaws.com/custom-ami-resources/basp.zip -UseBasicParsing -OutFile $zipfile

Add-Type -AssemblyName System.IO.Compression.FileSystem

[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)

Start-Process -FilePath "C:\Windows\SysWOW64\regsvr32" -ArgumentList "C:\basp21\basp\Basp21.dll /s" -Wait

& "$env:ProgramFiles\Amazon\Ec2ConfigService\ec2config.exe" -sysprep
</powershell>

0 comments on commit 987dd5a

Please sign in to comment.