0
votes

I'm attempting to set up an OpsWorks stack for an app. I currently have the app and the infrastructure in the same repo, with the following structure:

proj_name/
    infrastructure/
        chef-repo/
            cookbooks/
                proj_name/ # THE COOKBOOK
                    recipes/
                        deploy.rb
                        configure.rb
                    attributes/
                    metadata.rb
    proj_name/ # THE APP
        app/
        migrations/
        manage.py

I have confirmed that OpsWorks is successfully pulling the repo from Github and installing it in /opt/aws/opsworks. However, when I try to add the proj_name::deploy recipe to the custom recipes section of a custom layer, I get an error message saying that proj_name::deploy could not be found. Looking at the log, I see a line saying INFO: Storing updated cookbooks/proj_name/requirements.txt in the cache. This says to me that OpsWorks is looking in the first proj_name directory (the one containing the app) to find the recipe, not the cookbook named proj_name inside of infrastructure/chef-repo/cookbooks.

Is there any way to tell OpsWorks to look further for the cookbook?

Thanks!

1

1 Answers

2
votes

http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-installingcustom-repo.html

If using just cookbooks the answer is no.

If you have a berksfile you could get away with just a top-level berksfile in which you put the path to your cookbooks.

Bottom-line: you will have to place something in the root of the repo.