[chef] Binary data in an encrypted data bag?


Chronological Thread 
  • From: Mathieu Martin < >
  • To: " " < >
  • Subject: [chef] Binary data in an encrypted data bag?
  • Date: Thu, 6 Mar 2014 12:08:57 -0500

Hey folks,

I'm running into sporadic issues with a binary file that we currently have generated at every chef run (.mylogin.cnf). The file appears to be salted, because it changes every time it's re-generated with the same credentials.

My problem is that sometimes the resulting file works perfectly for my use (with the Mysql2 gem), and sometimes it segfaults the Ruby process. It works all the time for the mysql console, though.

I'd like to try the workaround of saving a good known version of the file in an encrypted data bag. The file is binary, however.

Has anyone had success saving binary data to data bags? Should I encode/decode it myself (e.g. base64), or is there some way to store binary data in data bags that I don't see in the data bag documentation?

Thanks in advance!

Mat

Note: I've asked the maintainers of mysql2 about those segfaults.


--

I'm the founder of Rock Solid Ops, a web operations and development consultancy.

I'm also the organizer of DevOpsMtl, a monthly event to discuss the challenges, tools and the culture surrounding the DevOps movement.

My main fields of expertise are web development with Ruby on Rails, DevOps and a bit of mobile development. If you need help scaling, monitoring, securing or managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my LinkedIn, follow me on twitter @webmat, or check out my blog at programblings.com.



Archive powered by MHonArc 2.6.16.

§