Open LiamK opened 11 years ago
Okay, I've made some progress. Sometimes you just need to take a fresh look at things.
I added in the node[:repmgr][:data_bag][:secret] which is a path to a file on the node containing the key.
Now it's working. I had to specify the full path. /home/piadmin/chef-solo/data_bag_key
Is there a better way to handle this?
Sometimes the path might be different if installing via some other user -- the piadmin part would be root or something else.
@LiamK I guess the most common case is that you have the key in your workstation (but not stored to git repo ;)), and specify encrypted_data_bag_secret
in .chef/knife.rb. Then knife-solo uploads the key and sets encrypted_data_bag_secret
in the solo.rb. You have now the option commented out in your knife.rb.
Hi -- I've gotten back to working on this, and would appreciate some help. As I mentioned before, it's not unlikely that this issue is due to some misunderstanding on my part. Basically, I'm trying to use encrypted data bags, and Chef is not finding the encrypted data bag secret. It's not clear to me how the secret is copied to the target node. I've tried various ways of specifying the encrypted key. The data_bag_key file does exist and contains the key. It's just not in /etc/chef/ where Chef is looking for it.
Thanks in advance for pointing me in the right direction.
Liam
solo.rb on node:
.chef/knife.rb on workstation: