簡體   English   中英

AWS Opsworks自定義配方看不到屬性

[英]AWS Opsworks custom recipes don't see attributes

我對AWS OpsWorks自定義配方有疑問。 在將節點移動到廚師11之后,在配方中就不會“看到”屬性。 示例:在文件配方/some-service.rb中,我輸入了

remote_file local_file do
    source node['servicename']['https_download']
    owner node['servicename']['app_user']
    group node['servicename']['app_group']
    mode 0664
end

在文件attribute / some-service.rb中:

default['servicename']['https_download'] = 'https://corect.address.of.file'
default['servicename']['app_user'] = 'someuser'
default['servicename']['app_group'] = 'somegroup'

當我嘗試部署應用程序時出現錯誤:

錯誤:編譯OpsWorks自定義運行列表時捕獲到異常:Chef :: Exceptions :: InvalidRemoteFileURI-nil不是remote_file的有效source參數。 source必須是絕對URI或URI數組。 -/opt/aws/opsworks/releases/20131015111601_209/vendor/gems/chef-11.4.4/bin/../lib/chef/resource/remote_file.rb:67:在`validate_source'中

似乎它從屬性獲取零而不是值。 我可能做錯了什么?

我有同樣的問題。 Opsworks也沒有從我正在使用的食譜中看到資源。 我在食譜中手動設置了該屬性,抱怨它是nil [],這使我擺脫了僅僅為了增加未找到資源的問題...

我仍在挖掘中,如果找到答案,便會發回郵件...

編輯:

我相信這里發生的是在我的問題發生之前,有一個問題使Chef-Solo無法將屬性數據加載到Chef-Solo用來運行的.json文件中。 解決了第一個問題后,這些屬性的.json文件中的數據仍然不存在。 一旦解決了問題,問題就解決了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM