0

I have a cookbook that is setting up some simple apache configuration and I am using the apache2 cookbook from SuperMarket.

I'm trying to run my cookbook's recipes using AWS OpsWorks with Chef 11.10.

When I try to run a recipe in OpsWorks I get the following error:

Missing Cookbooks:
------------------
Could not satisfy version constraints for: apache2

I'm wondering if what is happening is that since OpsWorks already has an apache2 cookbook which is version 1.0.0 and my cookbook depends on the 3.0.1 version that I want from supermarket it's getting a version mismatch.

So far, I haven't had any luck trying to just completely override the apache2 cookbook that is automatically shipped with OpsWorks, that would probably be ideal, if possible.

Any thoughts or ideas of something that I could try?

Matthew J Morrison
  • 165
  • 1
  • 1
  • 8

2 Answers2

0

Conflicting recipe names in OpsWorks is a fairly well known issue.

One option is to download the community cookbook and rename it to something like apache-community and bundle it with the rest of your recipes.

It looks like you're trying to deploy Python to OpsWorks, so you may also be able to find an OpsWorks specific cookbook for this instead, eg: https://github.com/alecpm/opsworks-web-python

Finally, you may just need to weigh up how useful the community cookbook really is. If you just need to configure a few options it might be easier to work with the OpsWorks Apache cookbook, or make your own recipe which modified the configuration.

thexacre
  • 1,849
  • 12
  • 14
0

In the upcoming Chef 12 release, OpsWorks will have two distinct Chef runs, one for the core/minimal OpsWorks setup and one for custom cookbooks. The second run has no cookbooks but your own, so there will be no naming conflicts.

c.p. https://github.com/aws/opsworks-cookbooks/issues/217