Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ok I'm getting started with Chef using the opscode server.

I'm using the community cookbooks, and I've got basics working (I created a users/myname.json data bag and added the user::sysadmins recipe to my node, and that works fine, the myname user is created).

I added the mysql::server receipe to the node , which installs the server fine, however, where I am stuck is configuring the servers passwords using data bags.

I created a apps/dbmaster.json data bag, with the following contents

{
  "id":"dbmaster",
  "mysql_root_password": {
    "_default": "strawberry"
  },
   "mysql_repl_password": {
    "_default": "apple"
  }
}

but the mysql users are set up with the default passwords. I think I'm confused on how data bags are related to nodes ? Any help appreciated.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The mysql::server recipe does not use data bags to set up the passwords by default. It uses node attributes, which get randomly generated in that recipe, unless they are present from another source such as a role.

The database::master recipe in Opscode's database cookbook will manage the attributes based on values in a data bag for an application. This cookbook is intended to be used with the application cookbook also by Opscode, for managing application deployment and configuration integration through data bags.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.