我試圖在使用廚師的獨立機器上部署OpenStack,其烹飪手冊包含在https://github.com/stackforge/openstack-chef-repo中,在此引用爲:http://docs.opscode.com/openstack_repository.html。具體來說,我試圖設置os-compute-single-controller
角色。如何運行OpenStack廚師食譜?
我能夠順利上傳食譜。
然而,當我試圖運行我無意中發現了這個錯誤:
Errno::ENOENT
-------------
No such file or directory - file not found '/etc/chef/openstack_data_bag_secret'
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/openstack-common/libraries/passwords.rb:45:in `secret'
/var/chef/cache/cookbooks/openstack-common/libraries/passwords.rb:62:in `db_password'
/var/chef/cache/cookbooks/openstack-ops-database/recipes/openstack-db.rb:27:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/openstack-common/libraries/passwords.rb:
38: # That means nova_password will == "nova".
39: def secret bag_name, index
40: if node["openstack"]["developer_mode"]
41: return index
42: end
43: key_path = node["openstack"]["secret"]["key_path"]
44: ::Chef::Log.info "Loading encrypted databag #{bag_name}.#{index} using key at #{key_path}"
45>> secret = ::Chef::EncryptedDataBagItem.load_secret key_path
46: ::Chef::EncryptedDataBagItem.load(bag_name, index, secret)[index]
47: end
48:
49: # Ease-of-use/standardization routine that returns a service password
50: # for a named OpenStack service. Note that databases are named
51: # after the OpenStack project nickname, like "nova" or "glance"
52: def service_password service
53: bag = node["openstack"]["secret"]["service_passwords_data_bag"]
54: secret bag, service
我缺少的東西?我不介意寫一個配方來填充這個文件,但我不確定它應該包含哪些內容。我無法在這些食譜的文檔中找到關於此文件的任何內容。
這是我指定的廚師客戶端的配置:
{"run_list":["recipe[apache2]", "role[os-compute-single-controller]"]}
編輯:
創建一個錯誤的空文件的結果:invalid zero length secret in '/etc/chef/openstack_data_bag_secret'
This似乎有關,儘管是從一個不同的倉庫。但爲什麼this recipe不在stackforge repository?
它不應該是一個空文件。它應該是你在數據包中加密數據的關鍵。 –
@Ovesh,如果您有任何與此有關的其他問題,請提供反饋。我願意爲任何稍後可能會退出的人改進此問答。 – Konzula
@Konzula,我確實有更多的問題,但沒有直接關係到這一點。說實話,我已經能夠在迴應之前解決數據包問題。我只是希望有更完整的食譜演練。 – Ovesh