amazon web services - AWS, OpsWorks and Chef dependencies: what's the cleanest solution? -


i've got chef project that, locally vagrant, works nicely. i'm using librarian-chef, means can specify dependencies in cheffile this:

site 'http://community.opscode.com/api/v1' cookbook 'jenkins' 

when run librarian-chef install, pulls down jenkins , cookbooks depends on cookbooks directory.

there's directory, site-cookbooks, i'm writing of own custom cookbooks , recipes.

in vagrantfile, can tell @ 2 different paths cookbooks:

config.vm.provision "chef_solo" |chef|   chef.cookbooks_path = ["cookbooks", "site-cookbooks"]   # snip end 

this works when run vagrant up. however, doesn't seem play nicely aws opsworks – requires cookbooks @ top level of chef repository.

my question then, is: what's nicest way use chef opsworks without including of dependencies @ top level of repository?

opsworks doesn't play nice number of tools created chef. tried using not long after came out , gave on (opsworks using chef 9 @ time).

i suggest either move opsworks enterprise chef, or try following:

1. create separate repo cookbooks

keep cookbooks in separate repo. if want part of larger repository, can include git submodule. git submodules bad thing cookbooks separate entity, can live independently of rest of project, works quite in case.

to add cookbooks repository inside repo, use:

git submodule add git://github.com/my/cookbooks.git ./cookbooks 

2. keep cookbooks community cookbooks

you can either clone cookbooks repository, add them submodules, or try using librarian-chef/berkshelf manage them. try using method, should work librarian-chef: https://sethvargo.com/using-amazon-opsworks-with-berkshelf/


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -