官术网_书友最值得收藏!

Setting up our workstation

The second part of our Chef environment is the workstation. The workstation is used to interact with the Chef server. This is where we will do most of the preparation work and create the code to send to the Chef server. In our workstation, we will prepare the configuration items of our infrastructure in a Chef repository.

The Chef repository contains all the information needed to interact and synchronize with the Chef server. It contains the private key and other configuration files needed to authenticate and interact with the Chef server. These files will be found in the .chef directory of our Chef repository. It also contains the cookbooks that we will write and synchronize later with the Chef server in the cookbooks/ directory. There are other files and directories inside a Chef repository, such as data bags, roles, and environments as well. However, it is enough, for now, to know about the cookbooks and authentication files to be able to configure our Docker host.

Do you remember the starter kit we downloaded in the previous section? You need to unzip this file to extract our chef-repo. We should have the following files described in the directory tree:

Another important component in our workstation is the Chef Development Kit. It contains all the programs needed to read all the configuration in our chef-repo and interact with the Chef server. Convenient programs to create, develop, and test our cookbooks are also available in the Chef Development Kit. We will use various programs in the development kit throughout the rest of this chapter.

Now, let's download the Chef Development Kit from https://downloads.chef.io/chefdk according to our workstation's platform.

Next, open the downloaded installer. Install the Chef Development Kit according to the prompts from our platform. Finally, confirm that the installation was successful with the following command:

$ chef -v
Chef Development Kit Version: 3.5.13
chef-client version: 14.7.17
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 3.0.52

Now that we have set up our workstation, let's go to our chef-repo/ directory to prepare the last component of our Chef environment.

主站蜘蛛池模板: 华宁县| 石台县| 洪泽县| 青神县| 蕲春县| 六安市| 南和县| 罗田县| 临夏县| 准格尔旗| 尖扎县| 铜梁县| 磐石市| 万州区| 涿鹿县| 漳平市| 萨嘎县| 永昌县| 土默特右旗| 商丘市| 西城区| 常宁市| 泸州市| 衡阳市| 泌阳县| 分宜县| 宝山区| 竹溪县| 大余县| 丹东市| 突泉县| 汉中市| 囊谦县| 连州市| 江华| 桐梓县| 冷水江市| 江西省| 普定县| 彰武县| 新兴县|