amazon web services - AWS Code Deploy Fails When Calling Msdeploy -
i'm working on setting our build process utilize aws code deploy autoscaling group. i've managed code built , zipped appspec.yml , beforeinstall.bat file moved s3 correctly. code deploy pulls down zip file, unzips , calls beforeinstall.bat. batch file has 3 steps
- stop app pool
- stop website
- call website.deploy.cmd
it gets through steps 1 , 2, when gets step 3 calls msdeploy , returns error:
error: there error reading iis configuration schema 'c:\windows\system32\inetsrv\config\schema\'
thinking it's permission issue, logged onto 1 of servers , ran cmd script manually. deploys fine, isn't surprising given logged on admin. opened powershell script localsystem
user (which codedeploy host agent service
runs as) , ran cmd script. completed successfully. ran whole batch file localsystem
user. ran successfully.
i went , added echo %username%
batch script, committed, built, , ran new deployment. see user in code deploy logs win-49gnl2frhj4$
. deployment still fails. when run batch script on box powershell window administrator
, of course see administrator
echoed out. script succeeds. when run batch script powershell window localsystem
see win-49gnl2frhj4$
, when it's run codedeploy via aws console, runs.
what different between how aws console calls batch file localsystem
user , how call user via powershell window?
looks issue having old version of web deploy installed. went logs , realized had somehow installed v2 (probably default when installed iis onto ec2 instance). downloaded , installed latest version (v 3.6 of writing) , created new deploy. code deployed expected.
Comments
Post a Comment