Note: Please go to docs.rightscale.com to access the current RightScale documentation set.
Home > Guides > Chef Cookbooks Developer Guide > Developer > ServerTemplate Development > Common Development Tasks > Generate Chef Metadata using Knife (metadata.json)

Generate Chef Metadata using Knife (metadata.json)

Table of Contents

Objective

To generate or regenerate the Chef cookbook metadata, which creates a new 'metadata.json' file from the 'metadata.rb' file. 

Important! As of the 2013-10-01 Dashboard release you no longer have to manually generate a cookbook's metadata.json file because RightScale automatically creates the metadata.json file (from the metadata.rb file) upon a fetch or refetch of your cookbooks into Repose. See Chef Metadata for more technical details. 

 

Note: There is a size limit of 64KB on the metadata file that can be generated in cookbooks.

Steps

From the command line of your Chef development server, enter the following command:

# knife cookbook metadata my-cookbook -o <COOKBOOK_PATH>

Example:  # knife cookbook metadata my-cookbook-name -o /opt/development/cookbooks/

 

Once the existing 'metadata.json' file has been updated, add and commit your changes and then push them to the cookbook repository.

# git add <COOKBOOK_PATH>
# git commit -m "Description of changes"
# git push <remote_name>

-OR-  You can add and commit at the same time.

# git commit -am "Description of changes"

Example:  # git add /opt/development/cookbooks
         # git commit -m "Updated metadata with new attribute descriptions"
         # git commit -am "Updated metadata with new attribute descriptions"
         # git push origin

You must to post a comment.
Last modified
11:25, 16 Jan 2014

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None

Glossary | 用語용어 Site Map | Site Help Community Corporate Site Get Support Dashboard Login
Doc Feedback Product Feedback Resources MultiCloud Marketplace Forums

Dashboard Status


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.