markdown 将自定义厨师食谱从V4迁移到V5

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 将自定义厨师食谱从V4迁移到V5相关的知识,希望对你有一定的参考价值。

### V4 to V5 
* Create the `cookbooks` directory in the **root of your application**!
* Create `cookbooks/ey-custom/recipes/after-main.rb` and `cookbooks/ey-custom/metadata.rb`
  * `../after-main.rb` is now the entrypoint of custom chef recipes
  * In `/ey-custom/metadata.rb` add `name 'ey-custom'`
* To use a custom cookbook, copy the file from the [list](https://github.com/engineyard/ey-cookbooks-stable-v5/tree/next-release/custom-cookbooks)
  * In `/ey-custom/recipes/after-main.rb` add `include_recipe 'custom-recipe_name'`
  * In `/ey-custom/metadata.rb` add `depends 'custom-recipe_name'`
* For including other recipes that have not been upgraded by EY to V5 stack or if it's somthing
you wrote:
  * copy the cookbook to `/cookbooks` (cp -pr filepath1 filepath2)
  * Add `cookbooks/recipe_name/metadata.rb` and as the first line inside the file `name 'recipe_name'`
  * Add the `include_recipe` and `depends` to ey-custom files in step mentioned above.
* Replace `node['instance_role']`, `node['name']`, and similar code and add `['dna']`

```
cd /path/to/cookbooks.v4/ # or cookbooks/
grep -r "node\[\(:\|'\|\"\)\(applications\|engineyard\|environment\|instance_role\|members\|name\|users\|utility_instances\)" .


# node['instance_role'] on v4
node['dna']['instance_role']

# node ['name'] on v4
node['dna']['name']
```
* Change the package versions to the new V5 versions
  * `memcached -> 1.4.25`
  * `redis -> 3.2.0`
* (Optional) Use a string instead of symbol when accessing node attributes
  

以上是关于markdown 将自定义厨师食谱从V4迁移到V5的主要内容,如果未能解决你的问题,请参考以下文章

markdown 工程师厨师食谱

将 React Navigation v4 深层链接配置迁移到 React Navigation v5 时遇到问题

markdown 在iOS 11或更高版本上将数据从V3迁移到V4

OpsWorks 厨师将自定义 json 部署到 php

如何从厨师食谱在后台运行java程序

迁移到 V5 后序列化记录问号而不是值