關閉這個問題的背面Chef - How to run a cookbook locally我試圖讓AWS opsworks上的自定義食譜工作。正如我在上一個問題中所陳述的,我是廚師新手,但我使用的是別人製作的食譜 https://github.com/k-kinzal/chef-php-phalcon廚師自定義食譜不安裝在AWS opsworks
但是,當我將其作爲自定義食譜添加到我的實例時,沒有安裝任何東西。 從日誌中出現的食譜被檢索並移動到正確的位置,但隨後該日誌的底部看起來像是
[2016-02-16T18:48:54+00:00] INFO: Forking chef instance to converge...
[2016-02-16T18:48:54+00:00] INFO: *** Chef 12.6.0 ***
[2016-02-16T18:48:54+00:00] INFO: Chef-client pid: 2237
[2016-02-16T18:48:59+00:00] INFO: Setting the run_list to ["recipe[php-phalcon::default]"] from CLI options
[2016-02-16T18:48:59+00:00] INFO: Run List is [recipe[php-phalcon::default]]
[2016-02-16T18:48:59+00:00] INFO: Run List expands to [php-phalcon::default]
[2016-02-16T18:48:59+00:00] INFO: Starting Chef Run for app2
[2016-02-16T18:48:59+00:00] INFO: Running start handlers
[2016-02-16T18:48:59+00:00] INFO: Start handlers complete.
[2016-02-16T18:48:59+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found:
[2016-02-16T18:48:59+00:00] INFO: HTTP Request Returned 412 Precondition Failed: No such cookbook: git
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: git
Expanded Run List:
------------------
* php-phalcon::default
[2016-02-16T18:48:59+00:00] ERROR: Running exception handlers
[2016-02-16T18:48:59+00:00] ERROR: Exception handlers complete
[2016-02-16T18:48:59+00:00] FATAL: Stacktrace dumped to /var/chef/runs/a9eb7a78-2544-413b-aeae-075c959c98ca/local-mode-cache/cache/chef-stacktrace.out
[2016-02-16T18:48:59+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-02-16T18:48:59+00:00] ERROR: 412 "Precondition Failed"
[2016-02-16T18:49:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
我不完全知道我要在這裏做,Git是在機器上所以我不確定爲什麼這個前提失敗。我見過'Berks'很多。基於我以前的問題,我應該能夠在機器上本地運行這個配方,然後運行Berks來打包所有東西,並將它用作opsworks的食譜?
我用廚師12本
感謝
這是正確的答案,我已經進一步了,但由於某些原因,它似乎還沒有安裝任何東西。日誌現在指向一個.each函數,看起來我所期望的那些目錄沒有 – TommyBs