Chef – Knife Setup

Chef – Knife Setup ”; Previous Next Knife is Chef’s command-line tool to interact with the Chef server. One uses it for uploading cookbooks and managing other aspects of Chef. It provides an interface between the chefDK (Repo) on the local machine and the Chef server. It helps in managing − Chef nodes Cookbook Recipe Environments Cloud Resources Cloud Provisioning Installation on Chef client on Chef nodes Knife provides a set of commands to manage Chef infrastructure. Bootstrap Commands knife bootstrap [SSH_USER@]FQDN (options) Client Commands knife client bulk delete REGEX (options) knife client create CLIENTNAME (options) knife client delete CLIENT (options) knife client edit CLIENT (options) Usage: C:/opscode/chef/bin/knife (options) knife client key delete CLIENT KEYNAME (options) knife client key edit CLIENT KEYNAME (options) knife client key list CLIENT (options) knife client key show CLIENT KEYNAME (options) knife client list (options) knife client reregister CLIENT (options) knife client show CLIENT (options) Configure Commands knife configure (options) knife configure client DIRECTORY Cookbook Commands knife cookbook bulk delete REGEX (options) knife cookbook create COOKBOOK (options) knife cookbook delete COOKBOOK VERSION (options) knife cookbook download COOKBOOK [VERSION] (options) knife cookbook list (options) knife cookbook metadata COOKBOOK (options) knife cookbook metadata from FILE (options) knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options) knife cookbook test [COOKBOOKS…] (options) knife cookbook upload [COOKBOOKS…] (options) Cookbook Site Commands knife cookbook site download COOKBOOK [VERSION] (options) knife cookbook site install COOKBOOK [VERSION] (options) knife cookbook site list (options) knife cookbook site search QUERY (options) knife cookbook site share COOKBOOK [CATEGORY] (options) knife cookbook site show COOKBOOK [VERSION] (options) knife cookbook site unshare COOKBOOK Data Bag Commands knife data bag create BAG [ITEM] (options) knife data bag delete BAG [ITEM] (options) knife data bag edit BAG ITEM (options) knife data bag from file BAG FILE|FOLDER [FILE|FOLDER..] (options) knife data bag list (options) knife data bag show BAG [ITEM] (options) Environment Commands knife environment compare [ENVIRONMENT..] (options) knife environment create ENVIRONMENT (options) knife environment delete ENVIRONMENT (options) knife environment edit ENVIRONMENT (options) knife environment from file FILE [FILE..] (options) knife environment list (options) knife environment show ENVIRONMENT (options) Exec Commands knife exec [SCRIPT] (options) Help Commands knife help [list|TOPIC] Index Commands knife index rebuild (options) Node Commands knife node bulk delete REGEX (options) knife node create NODE (options) knife node delete NODE (options) knife node edit NODE (options) knife node environment set NODE ENVIRONMENT knife node from file FILE (options) knife node list (options) knife node run_list add [NODE] [ENTRY[,ENTRY]] (options) knife node run_list remove [NODE] [ENTRY[,ENTRY]] (options) knife node run_list set NODE ENTRIES (options) knife node show NODE (options) OSC Commands knife osc_user create USER (options) knife osc_user delete USER (options) knife osc_user edit USER (options) knife osc_user list (options) knife osc_user reregister USER (options) knife osc_user show USER (options) Path-Based Commands knife delete [PATTERN1 … PATTERNn] knife deps PATTERN1 [PATTERNn] knife diff PATTERNS knife download PATTERNS knife edit [PATTERN1 … PATTERNn] knife list [-dfR1p] [PATTERN1 … PATTERNn] knife show [PATTERN1 … PATTERNn] knife upload PATTERNS knife xargs [COMMAND] Raw Commands knife raw REQUEST_PATH Recipe Commands knife recipe list [PATTERN] Role Commands knife role bulk delete REGEX (options) knife role create ROLE (options) knife role delete ROLE (options) knife role edit ROLE (options) knife role env_run_list add [ROLE] [ENVIRONMENT] [ENTRY[,ENTRY]] (options) knife role env_run_list clear [ROLE] [ENVIRONMENT] knife role env_run_list remove [ROLE] [ENVIRONMENT] [ENTRIES] knife role env_run_list replace [ROLE] [ENVIRONMENT] [OLD_ENTRY] [NEW_ENTRY] knife role env_run_list set [ROLE] [ENVIRONMENT] [ENTRIES] knife role from file FILE [FILE..] (options) knife role list (options) knife role run_list add [ROLE] [ENTRY[,ENTRY]] (options) knife role run_list clear [ROLE] knife role run_list remove [ROLE] [ENTRY] knife role run_list replace [ROLE] [OLD_ENTRY] [NEW_ENTRY] knife role run_list set [ROLE] [ENTRIES] knife role show ROLE (options) Serve Commands knife serve (options) SSH Commands knife ssh QUERY COMMAND (options) SSL Commands knife ssl check [URL] (options) knife ssl fetch [URL] (options) Status Commands knife status QUERY (options) Tag Commands knife tag create NODE TAG … knife tag delete NODE TAG … knife tag list NODE User Commands knife user create USERNAME DISPLAY_NAME FIRST_NAME LAST_NAME EMAIL PASSWORD (options) knife user delete USER (options) knife user edit USER (options) knife user key create USER (options) knife user key delete USER KEYNAME (options) knife user key edit USER KEYNAME (options) knife user key list USER (options) knife user key show USER KEYNAME (options) knife user list (options) knife user reregister USER (options) knife user show USER (options) Knife Setup In order to set up knife, one needs to move to .chef directory and create a knife.rb inside the chef repo, which tells knife about the configuration details. This will have a couple up details. current_dir = File.dirname(__FILE__) log_level :info log_location STDOUT node_name ”node_name” client_key “#{current_dir}/USER.pem” validation_client_name ”ORG_NAME-validator” validation_key “#{current_dir}/ORGANIZATION-validator.pem” chef_server_url ”https://api.chef.io/organizations/ORG_NAME” cache_type ”BasicFile” cache_options( :path => “#{ENV[”HOME”]}/.chef/checksums” ) cookbook_path [“#{current_dir}/../cookbooks”] In the above code, we are using the hosted Chef server which uses the following two keys. validation_client_name ”ORG_NAME-validator” validation_key “#{current_dir}/ORGANIZATION-validator.pem” Here, knife.rb tells knife which organization to use and where to find the private key. It tells knife where to find the users’ private key. client_key “#{current_dir}/USER.pem” The following line of code tells knife we are using the hosted server. chef_server_url ”https://api.chef.io/organizations/ORG_NAME” Using the knife.rb file, the validator knife can now connect to your organization’s hosted Opscode. Print Page Previous Next Advertisements ”;

Chef – Test Kitchen Setup

Chef – Test Kitchen Setup ”; Previous Next Test Kitchen is Chef’s integrated testing framework. It enables writing test recipes, which will run on the VMs once they are instantiated and converged using the cookbook. The test recipes run on that VM and can verify if everything works as expected. ChefSpec is something which only simulates a Chef run. Test kitchen boots up real node and runs Chef on it. Step 1 − Install test kitchen Ruby gem and test kitchen vagrant gem to enable test kitchen to use vagrant for spinning up test. $ gem install kitchen $ gem install kitchen-vagrant Step 2 − Set up test kitchen. This can be done by creating .kitchen.yml in the cookbook directory. driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: – name: ubuntu-12.04 driver_config: box: opscode-ubuntu-12.04 box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ ubuntu-12.04_provisionerless.box suites: – name: default run_list: – recipe[minitest-handler] – recipe[my_cookbook_test] attributes: { my_cookbook: { greeting: ”Ohai, Minitest!”} } In the above code, one part defines that vagrant needs to spin up the VMs and it defines that you want Omnibus to install Chef on the target node. The second part defines which platform you want to test the cookbooks. Vagrant will always create and destroy new instances. You do not have to fear about the side effects with vagrant VMs you spin up using Vagrant file. Test kitchen can be considered as a temporary environment that helps to run and test cookbooks in a temporary environment that is similar to production. With test kitchen on, one can make sure that the given piece of code is working, before it is actually getting deployed on to testing, preproduction, and production environment. This feature of test kitchen is followed by many organizations as a set before putting the cookbooks in an actual working environment. Test Kitchen Workflow Following are the steps involved in Test Kitchen Workflow. Creating a Cookbook Using Chef Use the following code to create a cookbook. $ chef generate cookbook motd_rhel Installing Cookbook Gems: Compiling Cookbooks… Recipe: code_generator::cookbook * directory[C:/chef/cookbooks/motd_rhel] action create – create new directory C:/chef/cookbooks/motd_rhel * template[C:/chef/cookbooks/motd_rhel/metadata.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/metadata.rb – update content in file C:/chef/cookbooks/motd_rhel/metadata.rb from none to d6fcc2 (diff output suppressed by config) * template[C:/chef/cookbooks/motd_rhel/README.md] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/README.md – update content in file C:/chef/cookbooks/motd_rhel/README.md from none to 50deab (diff output suppressed by config) * cookbook_file[C:/chef/cookbooks/motd_rhel/chefignore] action create – create new file C:/chef/cookbooks/motd_rhel/chefignore – update content in file C:/chef/cookbooks/motd_rhel/chefignore from none to 15fac5 (diff output suppressed by config) * cookbook_file[C:/chef/cookbooks/motd_rhel/Berksfile] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/Berksfile – update content in file C:/chef/cookbooks/motd_rhel/Berksfile from none to 9f08dc (diff output suppressed by config) * template[C:/chef/cookbooks/motd_rhel/.kitchen.yml] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/.kitchen.yml – update content in file C:/chef/cookbooks/motd_rhel/.kitchen.yml from none to 49b92b (diff output suppressed by config) * directory[C:/chef/cookbooks/motd_rhel/test/integration/default/serverspec] action create – create new directory C:/chef/cookbooks/motd_rhel/test/integration/default/serverspec * directory[C:/chef/cookbooks/motd_rhel/test/integration/helpers/serverspec] action create – create new directory C:/chef/cookbooks/motd_rhel/test/integration/helpers/serverspec * cookbook_file [C:/chef/cookbooks/motd_rhel/test/integration/helpers/serverspec/spec_helper.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/test/integration/helpers/serverspec/spec_helper.rb – update content in file C:/chef/cookbooks/motd_rhel/test/integration/helpers/serverspec/spec_helper.rb from none to d85df4 (diff output suppressed by config) * template [C:/chef/cookbooks/motd_rhel/test/integration/default/serverspec/defaul t_spec.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/test/integration/default/serverspec/default_spec.rb – update content in file C:/chef/cookbooks/motd_rhel/test/integration/default/serverspec/default_spec.rb from none to 3fbdbd (diff output suppressed by config) * directory[C:/chef/cookbooks/motd_rhel/spec/unit/recipes] action create – create new directory C:/chef/cookbooks/motd_rhel/spec/unit/recipes * cookbook_file [C:/chef/cookbooks/motd_rhel/spec/spec_helper.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/spec/spec_helper.rb – update content in file C:/chef/cookbooks/motd_rhel/spec/spec_helper.rb from none to 587075 (diff output suppressed by config) * template [C:/chef/cookbooks/motd_rhel/spec/unit/recipes/default_spec.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/spec/unit/recipes/default_spec.rb – update content in file C:/chef/cookbooks/motd_rhel/spec/unit/recipes/default_spec.rb from none to ff3b17 (diff output suppressed by config) * directory[C:/chef/cookbooks/motd_rhel/recipes] action create – create new directory C:/chef/cookbooks/motd_rhel/recipes * template[C:/chef/cookbooks/motd_rhel/recipes/default.rb] action create_if_missing – create new file C:/chef/cookbooks/motd_rhel/recipes/default.rb – update content in file C:/chef/cookbooks/motd_rhel/recipes/default.rb from none to c4b029 (diff output suppressed by config) * execute[initialize-git] action run – execute git init . * cookbook_file[C:/chef/cookbooks/motd_rhel/.gitignore] action create – create new file C:/chef/cookbooks/motd_rhel/.gitignore – update content in file C:/chef/cookbooks/motd_rhel/.gitignore from none to 33d469 (diff output suppressed by config) * execute[git-add-new-files] action run – execute git add . * execute[git-commit-new-files] action run – execute git commit -m “Add generated cookbook content” Following is the Created Cookbook Structure as an output of the above code. Test Kitchen Configuration File .kitchen.yaml file driver: name: vagrant provisioner: name: chef_zero # verifier: # name: inspec # format: doc platforms: – name: ubuntu-14.04 suites: – name: default run_list: – recipe[motd_rhel::default] attributes: Drivers − It specifies the software which manages the machine. Provisioner − It provides specification on how Chef runs. We are using chef_zero because it enables to mimic a Chef server environment on the local machine. This allows to work with node attributes and Chef server specifications. Platform − This specifies the target operating system. Suites − It defines what one wants to apply on the virtual environment. Here, you define multiple definition. It is the location where you define the run list, which specifies which recipe to run and in which sequence we need to run. Running the Commands in Sequence Kitchen List $ kitchen list Instance Driver Provisioner Verifier Transport Last Action ubuntu-1404 Vagrant ChefZero Busser Ssh <Not Created> Kitchen Create $ kitchen create —–> Starting Kitchen (v1.4.2) —–> Creating <default-centos-72>… Bringing machine ”default” up with ”virtualbox” provider… ==> default: Box ”opscode-centos-7.2” could not be found. Attempting to find and install… default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Box file was not detected as metadata. Adding it directly… ==> default: Adding box ”opscode-centos-7.2” (v0) for provider: virtualbox default: Downloading: https://opscode-vmbento.s3.amazonaws.com/vagrant/virtualbox/ opscode_centos-7.1_chefprovisionerless.box[…] Vagrant instance <default-centos-72> created. Finished creating <default-centos-72> (3m12.01s). —–> Kitchen is finished. (3m12.60s) Kitchen Converge $ kitchen converge —–> Converging <default-centos-72>… Preparing files for transfer Preparing dna.json Resolving cookbook dependencies with Berkshelf 4.0.1… Removing non-cookbook files before transfer Preparing validation.pem Preparing client.rb —–> Chef Omnibus installation detected (install only if missing) Transferring files to <default-centos-72> Starting Chef Client, version 12.6.0 resolving cookbooks for run list: [“motd_rhel::default”] Synchronizing Cookbooks: – motd_rhel (0.1.0) Compiling Cookbooks… Converging 1 resources Recipe: motd_rhel::default (up to date) Running handlers: Running handlers complete

Chef – Environment

Chef – Environment ”; Previous Next Chef helps in performing environment specific configuration. It is always a good idea to have a separate environment for development, testing, and production. Chef enables grouping nodes into separate environments to support an ordered development flow. Creating an Environment Creation of environment on the fly can be done using the knife utility. Following command will open a Shell’s default editor, so that one can modify the environment definition. vipin@laptop:~/chef-repo $ knife environment create book { “name”: “book”, “description”: “”, “cookbook_versions”: { }, “json_class”: “Chef::Environment”, “chef_type”: “environment”, “default_attributes”: { }, “override_attributes”: { } } Created book Testing a Created Environment vipin@laptop:~/chef-repo $ knife environment list _default book List Node for All Environments vipin@laptop:~/chef-repo $ knife node list my_server _default Environment Each organization will always start with at least a single environment called default environment, which is always available to the Chef server. A default environment cannot be modified in anyway. Any kind of changes can only be accommodated in the custom environment that we create. Environment Attributes An attribute can be defined in an environment and then used to override the default settings in the node. When the Chef client run takes place, then these attributes are compared with the default attributes that are already present in the node. When the environment attributes take precedence over the default attributes, Chef client will apply these settings and values when the Chef client run takes place on each node. An environment attribute can only be either default_attribute or override_attribute. It cannot be a normal attribute. One can use default_attribute or override_attribute methods. Attribute Type Default − A default attribute is always reset at the start of every Chef client run and have the lowest attribute precedence. Override − An override attribute is always reset at the start of every Chef client run and has a higher attribute precedence than default, force_default and normal. An override attribute is most often defined in the recipe but can also be specified in an attribute file for a role or for an environment. Order of Applying an Attribute Print Page Previous Next Advertisements ”;

Chef – Overview

Chef – Overview ”; Previous Next Chef is an open source technology developed by Opscode. Adam Jacob, co-founder of Opscode is known as the founder of Chef. This technology uses Ruby encoding to develop basic building blocks like recipe and cookbooks. Chef is used in infrastructure automation and helps in reducing manual and repetitive tasks for infrastructure management. Chef have got its own convention for different building blocks, which are required to manage and automate infrastructure. Why Chef? Chef is a configuration management technology used to automate the infrastructure provisioning. It is developed on the basis of Ruby DSL language. It is used to streamline the task of configuration and managing the company’s server. It has the capability to get integrated with any of the cloud technology. In DevOps, we use Chef to deploy and manage servers and applications in-house and on the cloud. Features of Chef Following are the most prominent features of Chef − Chef uses popular Ruby language to create a domain-specific language. Chef does not make assumptions on the current status of a node. It uses its mechanisms to get the current status of machine. Chef is ideal for deploying and managing the cloud server, storage, and software. Advantages of Chef Chef offers the following advantages − Lower barrier for entry − As Chef uses native Ruby language for configuration, a standard configuration language it can be easily picked up by anyone having some development experience. Excellent integration with cloud − Using the knife utility, it can be easily integrated with any of the cloud technologies. It is the best tool for an organization that wishes to distribute its infrastructure on multi-cloud environment. Disadvantages of Chef Some of the major drawbacks of Chef are as follows − One of the huge disadvantages of Chef is the way cookbooks are controlled. It needs constant babying so that people who are working should not mess up with others cookbooks. Only Chef solo is available. In the current situation, it is only a good fit for AWS cloud. It is not very easy to learn if the person is not familiar with Ruby. Documentation is still lacking. Key Building Blocks of Chef Recipe It can be defined as a collection of attributes which are used to manage the infrastructure. These attributes which are present in the recipe are used to change the existing state or setting a particular infrastructure node. They are loaded during Chef client run and comparted with the existing attribute of the node (machine). It then gets to the status which is defined in the node resource of the recipe. It is the main workhorse of the cookbook. Cookbook A cookbook is a collection of recipes. They are the basic building blocks which get uploaded to Chef server. When Chef run takes place, it ensures that the recipes present inside it gets a given infrastructure to the desired state as listed in the recipe. Resource It is the basic component of a recipe used to manage the infrastructure with different kind of states. There can be multiple resources in a recipe, which will help in configuring and managing the infrastructure. For example − package − Manages the packages on a node service − Manages the services on a node user − Manages the users on the node group − Manages groups template − Manages the files with embedded Ruby template cookbook_file − Transfers the files from the files subdirectory in the cookbook to a location on the node file − Manages the contents of a file on the node directory − Manages the directories on the node execute − Executes a command on the node cron − Edits an existing cron file on the node Attribute They are basically settings. They can be thought of as a key value pair of anything which one wants to use in the cookbook. There are several different kinds of attributes that can be applied, with a different level of precedence over the final settings that the node operates under. File It’s a subdirectory within the cookbook that contains any static file which will be placed on the nodes that uses the cookbooks. A recipe then can be declared as a resource that moves the files from that directory to the final node. Templates They are similar to files, but they are not static. Template files end with the .ebr extension, which means they contain embedded Ruby. They are mainly used to substitute an attribute value into the files to create the final file version that will be placed on the node. Metadata.rb It is used to manage the metadata about the package. This includes details like the name and details of the package. It also includes things such as dependency information that tells which cookbooks this cookbook needs to operate. This allows the Chef server to build the run-list of the node correctly and ensures that all of the pieces are transferred correctly. Default Cookbook Structure C:chefcookbooksnginx>tree Folder PATH listing for volume Local Disk Volume serial number is BE8B-6427 C: ├───attributes ├───definitions ├───files │ └───default ├───libraries ├───providers ├───recipes ├───resources └───templates └───default Chef − Related Technologies Following is the list of Chef related technologies. Puppet Puppet provides a standard way of delivering and operating software, no matter where it runs. It is an automated administrative engine for Linux, Unix, and Windows system that performs administrative tasks based on centralized specification. The primary features of Puppet are as follows − Implementing new systems with a uniform configuration. Updating the systems and upgrading the security and software packages. Incorporating new features and adding dexterous capabilities. Customizing configurations for ensuring the availability of data sources. Optimizing the available resources and minimizing the cost. Simplifying the roles and enabling the team to focus on core and productive issues. Getting a bird’s eye view of the available infrastructure. Ansible Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom

Chef – Cookbook Dependencies

Chef – Cookbook Dependencies ”; Previous Next The features of defining cookbook dependencies help in managing cookbook. This feature is used when we want to use the functionality of one cookbook in other cookbooks. For example, if one wants to compile C code then one needs to make sure that all the dependencies required to compile are installed. In order to do so, there might be separate cookbook which can perform such a function. When we are using chef-server, we need to know such dependencies in cookbooks which should be decelerated in the cookbooks metadata file. This file is located at the top on the cookbook directory structure. It provides hints to the Chef server which helps in deploying cookbooks on the correct node. Features of metadata.rb File Located at the top in the cookbook directory structure. Compiled when the cookbook is uploaded to Chef server using knife command. Compiled with knife cookbook metadata subcommand. Created automatically when the knife cookbook create command is run. Configuration of metadata.rb Following is the default content of a metadata file. Print Page Previous Next Advertisements ”;

Chef – Solo Setup

Chef – Solo Setup ”; Previous Next Chef-Solo is an open source tool that runs locally and allows to provision guest machines using Chef cookbooks without the complication of any Chef client and server configuration. It helps to execute cookbooks on a self-created server. Before running Chef-Solo on the local machine, one needs to install the following two files on the local machine. Solo.rb − This file tells Chef about where to find cookbooks, roles, and data bags. Node.json − This file sets the run list and any node-specific attribute, if required. solo.rb Configuration Following are the steps to configure solo.rb. Step 1 − Create a solo.rb file inside the chef repo. current_dir = File.expand_path(File.dirname(__FILE__)) file_cache_path “#{current_dir}” cookbook_path “#{current_dir}/cookbooks” role_path “#{current_dir}/roles” data_bag_path “#{current_dir}/data_bags” Step 2 − Add the file to git repo. $ git add solo.rb Step 3 − Create a node.json file inside the chef repo with the following content. { “run_list”: [ “recipe[ntp]” ] } Step 4 − Get the ntp cookbook inside the chef repo using knife. vipin@laptop:~/chef-repo $ knife cookbook site install ntp Installing ntp to /Users/mma/work/chef-repo/cookbooks …TRUNCATED OUTPUT… Cookbook ntp version 1.3.0 successfully installed Step 5 − Add the node.json file to Git. $ git add node.json Step 6 − Commit and push the files to git repo. vipin@laptop:~/chef-repo $ git commit -m “initial setup for Chef Solo” vipin@laptop:~/chef-repo $ git push Counting objects: 4, done. Delta compression using up to 4 threads. …TRUNCATED OUTPUT… To [email protected]:mmarschall/chef-repo.git b930647..5bcfab6 master -> master Running the Cookbook on the Node Step 1 − Login to the node where one wants to provision the Chef-Solo. Step 2 − Clone the Chef repo on the machine. $ git clone $URL_PATH Step 3 − cd to the chef repo. $ cd chef-repo Finally, run the Chef-Solo to converge the node − $ sudo chef-solo -c solo.rb -j node.json [2017-20-08T22:54:13+01:00] INFO: *** Chef 11.0.0 *** [2017-20-08T22:54:13+01:00] INFO: Setting the run_list to [“recipe[ntp]”] from JSON …TRUNCATED OUTPUT… [2012-12-08T22:54:16+01:00] INFO: Chef Run complete in 2.388374 seconds [2012-12-08T22:54:16+01:00] INFO: Running report handlers solo.rb configures Chef-Solo to look for its cookbooks, roles, and data bags inside the current directory: the Chef repository. Chef-Solo takes its node configuration from a JSON file. In our example, we called it node.json. If you”re going to manage multiple servers, you”ll need a separate file for each node. Then, Chef-Solo just executes a Chef run based on the configuration data found in solo.rb and node.json. Print Page Previous Next Advertisements ”;

Chef – Home

Chef Tutorial PDF Version Quick Guide Resources Job Search Discussion Chef is a configuration management technology developed by Opscode to manage infrastructure on physical or virtual machines. It is an open source developed using Ruby, which helps in managing complex infrastructure on the fly. This tutorial provides a basic understanding of the infrastructure and fundamental concepts of managing an infrastructure using Chef. Audience This tutorial has been prepared for those who want to understand the features and functionality of Chef and how Chef can help in reducing the complexity of managing an infrastructure. After completing this tutorial one would have moderate level understanding of Chef and its key building blocks. It will also give a fair idea on how to configure Chef in a preconfigured infrastructure and how to use it. Prerequisites We assume anyone who wants to learn Chef should have an understanding of system administration, infrastructure and network protocol communication. To automate the infrastructure provisioning, one should have a command over basic Ruby script writing and the underlying system where one wants to use Chef. Print Page Previous Next Advertisements ”;