Reputation: 1304
I've linked a git branch to my Elastic Beanstalk environment and using git aws.push it deploys correctly.
I've now added a .extensions
directory which contains a config script which should be creating a couple of directories. However, nothing appears to be happening.
I understand that the .extensions
directory should be copied across to the ec2 instance as well but I'm not seeing it.
I've checked eb-tools.log
and it's not mentioned in the upload.
Is there something additional that's required?
The script contains:
commands:
cache:
command: mkdir /tmp/cache
items:
command: mkdir /tmp/cache/items
chmod:
command: chmod -R 644 /tmp
Upvotes: 3
Views: 7424
Reputation: 589
Double check that your local script file has a .config
extension. I was having a similar problem because my local file was called .ebextensions/01_stuff.yaml
and it was fixed once I renamed it to .ebextensions/01_stuff.config
.
Upvotes: 1
Reputation: 1304
You can find the run logs for this at /var/log/cfn-init.log
.
In here I could see that the mkdir
commands had worked initially but subsequently failed as the directory already existed.
Turns out that eb extensions run commands in alphabetical order so I had to change the commands to:
01command1:
02command2:
etc. From this point on it worked fine.
Something else that was confusing me is that the .ebextensions directory in my local git repo was not appearing on the target instance directory. this is because once it's been run it will delete the directory.
Upvotes: 5