0

I want to deploy one of my cookbooks, nginx-passenger, to opsworks. I've tested the cookbooks locally already using testkitchen and all the recipes and tests passed successfully. However, when using opsworks, the run of nginx-passenger::default fails with the error "Could not satisfy version constraints for: nginx". Opsworks has already a cookbook with exactly the same name, but a different version, so it's probably caused by that.

I searched for this error already and just found the following https://forums.aws.amazon.com/thread.jspa?threadID=153656

However this doesn't offer a real solution.

My files look like the following:

my_cookbooks/Berksfile:

source "https://supermarket.getchef.com"

cookbook 'user', '~> 0.3.0'
cookbook 'apt', '~> 2.6.0'
cookbook 'nginx', '~> 2.7.4'

my_cookbooks/nginx-passenger/metadata.rb

name "nginx-passenger"
version "0.1.0"

depends 'nginx', '~> 2.7.4'
depends 'apt', '~> 2.6.0'

Can you recommend a workaround this problem. I really want to use the community nginx cookbook here.

EDIT: Pardon, I forgot to mention few details. I'm trying to create a custom layer, but I didn't assign any recipes to it yet. I've created an instance, updated custom cookbooks and executed the recipe nginx-passenger::default manually.

1

Naming conflicts are a known problem with the OpsWorks cookbooks and there isn't an easy solution.

What you might have to do is download both community nginx and nginx-passenger cookbooks to your cookbook directory, rename the nginx cookbook to something like nginx-community then update any references in the nginx-passenger cookbook from nginx to nginx-community.

On the other hand, you should probably consider whether you really need the nginx and nginx-passenger community cookbooks. OpsWorks has its own cookbooks for nginx and passenger, it's just that the default ruby stack uses Apache. You'd probably only need to overwrite a file or two in the nginx cookbook to make it work with passenger though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.