Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Configuration Management with Chef-Solo
  • Table Of Contents Toc
  • Feedback & Rating feedback
Configuration Management with Chef-Solo

Configuration Management with Chef-Solo

By : Rahman
2 (1)
close
close
Configuration Management with Chef-Solo

Configuration Management with Chef-Solo

2 (1)
By: Rahman

Overview of this book

This is a step-by-step guide, full of hands-on examples of real-world deployment tasks. Each topic is explained and placed in context, while also pointing out the key details of the concepts used. This book is aimed at system administrators and system engineers who have an understanding of configuration management tools and infrastructure. For novice administrators, it contains easy-to-use application recipes to get started immediately.
Table of Contents (8 chapters)
close
close

Data bags


A data bag is a global variable that is stored in JSON and can be accessed by Chef. It is indexed for searching and loaded by chef-client while executing the recipe.

We can use data bags directly in a JSON file or create them using Knife Solo. First, we will use a simpler approach, that is, updating the password with a JSON file.

Before we proceed further, we will create a JSON file under the same folder of Vagrantfile and use this file to run recipes. The benefit of this approach is that Chef-Solo requires a JSON file to execute recipes, and we can test our JSON file with Vagrant. The steps are as follows:

  1. Create your file in the same folder where Vagrantfile exists:

    # wpblog.json
    {
        "wpblog":{
            "db_password": "dbpass1234"
       },
       "run_list": [
            "recipe[wpblog::default]"
        ]
    }
  2. Comment on the add_recipe line in Vagrantfile and add the following code block in Vagrantfile:

    chef.json.merge!(JSON.parse(File.read("wpblog.json")))

    Now, Vagrantfile will look like the following...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Configuration Management with Chef-Solo
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon