Chef Data Bags - Chef (software)

What areChef Data Bags?

Chef data bags can be characterized as a subjective gathering of data which one can use with cookbooks. Utilizing data bags is exceptionally useful when one doesn't wish to hardcode attributes in formulas nor to store attributes in cookbooks.

Working Method

In the accompanying setup, we are endeavoring to impart to http endpoint URL. For this, we have to make a data bag, which will hold the endpoint URL detail and use it in our formula.

Step 1 − Create a directory for our data bag.

Step 2 − Create a data bag thing for demand receptacle. One needs to ensure one is utilizing a characterized requestBin URL.

Step 3 − Create a data bag on the Chef server

Step 4 − Upload the data bag to the Chef server.

Step 5 − Update the default formula of the cookbook to get the required cookbook from a data bag.

Step 6 − Upload the changed cookbook to the Chef server.

Step 7 − Run the Chef customer on the node to check if the http ask for container gets executed.

How it Works

Data bag is a named gathering of syntax data passages. One needs to characterize data passage and call the data bag thing in JSON record. One can likewise scan for data bag thing from inside the formulas to utilize the data put away in the data bags. We created a data bag called hooks. A data bag is a directory within Chef repository. We used knife to create it on the server.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Chef (software) Topics