How run cookbook with dependencies in chef?

后端 未结 3 1936
遥遥无期
遥遥无期 2021-01-23 17:57

I have configured workstation up this step in get started (OS redhat 6.5). I have launched a node. I modified a cookbook like that:

myCookbook/metadata.rb

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-23 18:44

    There is a few other options for managing cookbook cookbook and dependencies, such Berkshelf or Librarian-chef, where Berkshelf is more popular, and it's even included in Chef Development Kit, so if you use it you do not need to install it separately.

    After defining sources you just need to define which cookbooks you want their versions and cookbook manager will resolve dependencies for all defined cookbooks and it will install them for you, and if you want you can vendor them too. Beside that they have an option to upload specific cookbook, without worrying about upload dependencies.

    For more info how to use those tools consult official websites:

    • http://berkshelf.com
    • https://github.com/applicationsonline/librarian-chef

    In general for managing small projects you can use knife's upload flag for uploading dependencies.

    -d, --include-dependencies
        Use to ensure that when a cookbook has a dependency on one (or more) cookbooks, those cookbooks will also be uploaded.
    

提交回复
热议问题