understand how opsworks and custom cookbooks work together

无人久伴 提交于 2019-12-12 03:58:35

问题


I have my stack on opsworks and app is deploying fine (cake php).

Now I have to configure some things like chmod, php versions, etc etc... I'm reading about this but don't know exactly whats the best way to do this.

Question 1 - Should I do this with custom deploy JSON or via custom cookbooks?

Question 2 - Whats the correctly way to work with custom cookbooks? Fork original AWS repositories, update recipes and then use it in my stack?


回答1:


depends on what you would like to achieve, you may implement many things, such as:

  1. a recipe, which is invoked only once during a chef-client run.
  2. a lightweight resource provider, which supports notifies and can be invoked zero or more times.
  3. a definition, which is available before resource collection and can be invoked zero or more times.

for your second question, first checkout berkshelf -- a cookbook manager. i would suggest forking a project only if the project is dead, otherwise i would consider to contribute to already implemented project so everybody will benefit from it; and you can always write your own wrapper cookbook, you can also refer to Chef wrapper cookbook best practices.



来源:https://stackoverflow.com/questions/32682804/understand-how-opsworks-and-custom-cookbooks-work-together

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!