简体   繁体   中英

How to install chef 12 in MacOS for deployments to AWS Opsworks?

I would like to know how to install chef 12 in order to deploy a Ruby on Rails app to AWS OpsWorks using a Chef 12 stack.

Cookbook

https://github.com/nebulab/aws-solidus-demo-opsworks_cookbook.git

$ berks install
$ berks package cookbooks.tar.gz

** AWS Opsworks Deployment Error**

[2020-07-03T04:21:10+00:00] ERROR: Cookbook 'deploy_resource' version '1.0.3' depends on chef version [">= 13.0"], but the running chef version is 12.18.31
[2020-07-03T04:21:10+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

**Chef Version in my MacOS local environment **

$ chef --version
Chef Workstation version: 20.7.81
Chef Infra Client version: 16.2.73
Chef InSpec version: 4.21.1
Chef CLI version: 3.0.11
Test Kitchen version: 2.5.2
Cookstyle version: 6.9.0

$ chef-client -version                    
Chef: 12.18.31

Thanks in advance

  1. The deploy resource was removed from chef 14 core and extracted into a cookbook called deploy_resource .
  2. The latest version of that cookbook requires Chef 13+ (read the error).
  3. Chef 12 still came with the build in deploy resources.

IMHO: Either you upgrade chef or downgrade the cookbook to an older version.

Keep in mind that Chef 12 is EOL long time ago. I'm not sure how OpsWorks deals with that but I would suggest to upgrade to the latest Chef 16 (or to cinc.sh, the community build)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM