We have updated one of windows severs for one of our stacks from base windows server 2008 R2 to Windows server 2016. For some reason since then the launch configuration file doesn’t seem to run completely. The last command which actually initiates the Chef client to run which configures the server is not running. Please check the launch config below
cfn-init.exe -c ascending -v -s arn:aws:cloudformation:XXXXXXXXXXXXXXXXXXXXXXX -r ImageWorkerLaunchConfig --region eu-west-1Set-ExecutionPolicy Unrestricted -force
Set-Location c:\cfn\
Invoke-WebRequest ‘https://github.com/git-for-windows/git/releases/download/v2.5.0.windows.1/Git-2.5.0-64-bit.exe’ -OutFile ‘c:\cfn\Git-2.5.0-64-bit.exe’
Write-Host(Start-Process -FilePath ‘c:\cfn\Git-2.5.0-64-bit.exe’ -ArgumentList ‘/LOADINF=“c:\cfn\git_install.config” /SILENT’ -Wait -Passthru).ExitCode
$env:Path = [System.Environment]::GetEnvironmentVariable(‘Path’,‘Machine’) + ‘;’ + [System.Environment]::GetEnvironmentVariable(‘Path’,‘User’)
Write-Host(Start-Process -FilePath ‘c:\cfn\chef-install.msi’ -ArgumentList ‘/QUIET’ -Wait -Passthru).ExitCode
Start-Sleep -s 100
Invoke-Expression -Command c:\scripts\chef-init.ps1
- When I check the log file for chef, it is completely empty.
- Checked the userdata execution logs and it says user data is executed without any errors.
Would really appreciate if some one could help out here.
Muzeeb