Jedidiah Hurt
Jedidiah Hurt

Reputation: 812

Chef cookbook to create MongoDB users

We are going to deploy MongoDB using Chef. We have found a handful of cookbooks that take care of installing MongoDB on a server. However, none of the cookbooks we've found handle MongoDB user setup.

We would preferably store the auth info for MongoDB users in encrypted data bags.

Does a cookbook that handles this exist?

Upvotes: 4

Views: 1958

Answers (1)

maccam94
maccam94

Reputation: 269

I don't believe there are any public cookbooks that handle that currently. You would probably want to build on the following two cookbooks:

https://github.com/edelight/chef-mongodb

  • Already has a library that connects to the Mongo server. You'd probably want to use it as an example for how to interact with mongo within a chef library

https://github.com/opscode-cookbooks/database

  • The master recipe is designed for creating databases and users from a databag (adapting for encryption would be trivial)
  • There are good library providers for interacting with several types of databases. You would just use the connection examples from the first cookbook to reimplement those providers for mongo.

Upvotes: 3

Related Questions