A resource for executing chef cookbooks with chef-solo.
Chef is a powerful configuration management tool, that has many "cookbooks" written for it, which we should be able to use within heat. A resource should be made which can download cookbooks, setup attributes/
Technical Implementation possibilities:
1. Use berkshelf and/or librarian chef to download cookbooks. These tools are common within the chef community so template writers using this resource will understand the syntax.
2. Use knife solo to write encrypted data bags and allow for data bag search within the downloaded cookbooks.
3. Keep the chef configuration resource separate from the resources it acts on. This means that the chef_solo resource will not subclass any compute resource.
4. Store an ssh public/private keypair for updating chef resources in the future.
The template will basically have 4 parts:
1. (Berks|Chef)file:
-To specify which cookbooks to download
2.node_json:
-Specify the run_list (the recipies/roles to execute and in which order).
-Allows you to specify attributes to be used during the chef-run.
3. data_bags:
-Allow you to create databags that can be searched during a chef run.
-These can be encrypted.
-The outermost key will specify which databag to put the list of databag items in.
4. Roles:
-Allows you to specify roles that can be used in a chef run.
Here is an example template:
mysql_server:
type: "Rackspace:
properties:
flavor: {get_param: mysql_server_
image: 23b564c9-
name: { get_param: mysql_server_name }
mysql_config:
type: "OS::Heat:
properties:
hosts: [{get_attr: [mysql_server, PublicIp]}]
]
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- andrew plunk
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Slow progress
- Milestone target:
- None
- Started by
- andrew plunk
- Completed by
- Steve Baker
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Chef solo resource
(stevebaker) Thanks for this, it will help when we implement the Chef SoftwareConfig resource as part of blueprint hot-software-