I have an appspec.yml file sitting in the root of a revision (artifact) I am deploying from CodeCommit:
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/app/aws
file_exists_behavior: OVERWRITE
hooks:
ApplicationStart:
- location: /home/ec2-user/app/aws/update_wheel.sh
timeout: 300
runas: root
I changed my codedeployagent.yml
on my ec2 instance (in order to deal with this issue; changing the :root_dir:
manually is not an ideal solution, even if it were to have worked):
/etc/codedeploy-agent/conf/codedeployagent.yml
---
:log_aws_wire: false
:log_dir: '/var/log/aws/codedeploy-agent/'
:pid_dir: '/opt/codedeploy-agent/state/.pid/'
:program_name: codedeploy-agent
:root_dir: '/home/ec2-user/'
:verbose: false
:wait_between_runs: 1
:proxy_uri:
:max_revisions: 2
But I am still getting errors like this:
/home/ec2-user/app/aws/update_wheel.sh
Script does not exist at specified location: /home/ec2-user/xxxxxx-cb84-4ef6-966b-xxxxxxxxx/d-xxxxx/deployment-archive/home/ec2-user/app/aws/update_wheel.sh
I don't really understand why I am copying files
to a destination
and then not expected to be using those files, or why I shouldn't expect those (shell script) files to use their original pathing. To what destination
should I be copying the source
files
and why can I not get hooks
to expect the :root_dir
I set in the codeagent config?