I'm trying to create an encrypted Data bag to store a Mysql password and followed the instructions here to run this command:
knife data bag create --secret-file /tmp/my_data_bag_key passwords mysql
This returns an error:
Error: "Your private key could not be loaded from /Users/ClientName/.chef/ClientName.pem" Check your configuration file and ensure that your private key is readable
Now there is no .pem file at that location.But do I really need one? For Chef solo? If I do, then how do I create this file?
This command works by connecting to a chef server. If you don't have a key, this will fail. However, this knife plugin seems to do what you are looking for:
https://github.com/cparedes/knife-file
N.B., I have not used this plugin, but it looks right to me
The gist of it is that the Opscode links in the original post that point to Encrypted Data Bag creation instructions will not work for Chef-solo. The way to make Encrypted Data Bags work with Chef-solo is described here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With