debugMinor
Unable to create databags in chef
Viewed 0 times
unablechefcreatedatabags
Problem
I am very new to chef and trying to secure passwords using databags. Unfortunately, I tried in different ways but unable to succeed. I followed different tutorials first and second. I understood only two steps but later on I was unable to move forward.
but I don't know where it is creating the databag.
Can some one guide me from step two? I am trying to secure my database password. I got stuck after creating secret file.
- I created secret key using openssl
- In link1 step 2 says
knife data bag create passwords mysql --secret-file /tmp/my_data_bag_key
but I don't know where it is creating the databag.
Can some one guide me from step two? I am trying to secure my database password. I got stuck after creating secret file.
Solution
I'm using the following ruby script to encrypt/decrypt chef data bags locally:
https://gist.github.com/anonymous/4923ebeee53fe4d43a1cfb70a2abaadd
to encrypt:
and to decrypt:
https://gist.github.com/anonymous/4923ebeee53fe4d43a1cfb70a2abaadd
to encrypt:
ruby encrypt.rb PATH_TO_SECRET_FILE ENCRYPTED_DATA_BAG.jsonand to decrypt:
ruby decrypt.rb PATH_TO_SECRET_FILE DECRYPTED_DATA_BAG.jsonContext
StackExchange DevOps Q#1134, answer score: 2
Revisions (0)
No revisions yet.