amazon web services - appspec.yml failed to call scripts -
i trying setup ci using aws codedeploy , circleci. right stuck @ step aws codedeploy should copy stuff ec2 , run scripts. somehow circleci tells me wrong. know might happening? thanks.
the appspec.yml is:
version: 0.0 os: linux files: - source: / destination: /home/ubuntu hooks: beforeinstall: - location: scripts/setup.sh timeout: 3800 runas: root applicationstart: - location: scripts/start.sh timeout: 3800 runas: root
and setup.sh is:
#!/bin/bash sudo apt-get install nodejs npm npm install
in above code tried apt-get install nodejs npm
it's still nor working.
the error message in /var/log/aws/codedeploy-agent/codedeploy-agent.log
follows:
2015-10-22 08:02:54 error [codedeploy-agent(1314)]: instanceagent::plugins::codedeployplugin::commandpoller: error during perform: instanceagent::plugins::codedeployplugin::scripterror - script @ specified location: ./scripts/setup.sh run user root failed exit code 127 - /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:150:in `execute_script' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:107:in `block (2 levels) in execute' ......
exit code 127 means os couldn't find required execute command. in case either script wasn't @ expected path or /bin/bash
doesn't exist (unlikely).
check archive being produced build process putting scripts in archive appspec expects them. scripts/setup.sh
needs in exact path within archive.
you can @ agent got checking deployment archive deployment: /opt/codedeploy-agent/deployment-root/deployment-group-id/deployment-id/deployment-archive
make sure archive being extracted correctly.
Comments
Post a Comment