Thursday, July 9, 2020
Install Chef
Install Chef Install Chef 6 Simple Steps for Installing Chef On CentOS Back Home Categories Online Courses Mock Interviews Webinars NEW Community Write for Us Categories Artificial Intelligence AI vs Machine Learning vs Deep LearningMachine Learning AlgorithmsArtificial Intelligence TutorialWhat is Deep LearningDeep Learning TutorialInstall TensorFlowDeep Learning with PythonBackpropagationTensorFlow TutorialConvolutional Neural Network TutorialVIEW ALL BI and Visualization What is TableauTableau TutorialTableau Interview QuestionsWhat is InformaticaInformatica Interview QuestionsPower BI TutorialPower BI Interview QuestionsOLTP vs OLAPQlikView TutorialAdvanced Excel Formulas TutorialVIEW ALL Big Data What is HadoopHadoop ArchitectureHadoop TutorialHadoop Interview QuestionsHadoop EcosystemData Science vs Big Data vs Data AnalyticsWhat is Big DataMapReduce TutorialPig TutorialSpark TutorialSpark Interview QuestionsBig Data TutorialHive TutorialVIEW ALL Blockchain Blockchain TutorialWhat is BlockchainHyperledger FabricWhat Is EthereumEthereum TutorialB lockchain ApplicationsSolidity TutorialBlockchain ProgrammingHow Blockchain WorksVIEW ALL Cloud Computing What is AWSAWS TutorialAWS CertificationAzure Interview QuestionsAzure TutorialWhat Is Cloud ComputingWhat Is SalesforceIoT TutorialSalesforce TutorialSalesforce Interview QuestionsVIEW ALL Cyber Security Cloud SecurityWhat is CryptographyNmap TutorialSQL Injection AttacksHow To Install Kali LinuxHow to become an Ethical Hacker?Footprinting in Ethical HackingNetwork Scanning for Ethical HackingARP SpoofingApplication SecurityVIEW ALL Data Science Python Pandas TutorialWhat is Machine LearningMachine Learning TutorialMachine Learning ProjectsMachine Learning Interview QuestionsWhat Is Data ScienceSAS TutorialR TutorialData Science ProjectsHow to become a data scientistData Science Interview QuestionsData Scientist SalaryVIEW ALL Data Warehousing and ETL What is Data WarehouseDimension Table in Data WarehousingData Warehousing Interview QuestionsData warehouse architectureTalend T utorialTalend ETL ToolTalend Interview QuestionsFact Table and its TypesInformatica TransformationsInformatica TutorialVIEW ALL Databases What is MySQLMySQL Data TypesSQL JoinsSQL Data TypesWhat is MongoDBMongoDB Interview QuestionsMySQL TutorialSQL Interview QuestionsSQL CommandsMySQL Interview QuestionsVIEW ALL DevOps What is DevOpsDevOps vs AgileDevOps ToolsDevOps TutorialHow To Become A DevOps EngineerDevOps Interview QuestionsWhat Is DockerDocker TutorialDocker Interview QuestionsWhat Is ChefWhat Is KubernetesKubernetes TutorialVIEW ALL Front End Web Development What is JavaScript â" All You Need To Know About JavaScriptJavaScript TutorialJavaScript Interview QuestionsJavaScript FrameworksAngular TutorialAngular Interview QuestionsWhat is REST API?React TutorialReact vs AngularjQuery TutorialNode TutorialReact Interview QuestionsVIEW ALL Mobile Development Android TutorialAndroid Interview QuestionsAndroid ArchitectureAndroid SQLite DatabaseProgramming 6 Simple ... DevOps (8 4 Blogs) Become a Certified Professional AWS Global Infrastructure Introduction To DevOps What is DevOps? A Beginner's Guide To Understanding DevOps And Its EvolutionWhat Are Important Pre-Requisites For DevOps Professionals?DevOps in various domains â" How DevOps solves the problem?DevOps Real Time Scenarios â" Know What Happens Real TimeWaterfall vs Agile: Which Is Better For You And Why?DevOps vs Agile! Everything You Need To KnowMystery of DevOpsInfrastructure as Code â" What is it and Why is it it important?Linux commands in DevOps: Must Know For Every DevOps ProfessionalDevOps Tutorial : Introduction To DevOpsTop 10 DevOps Tools You Must Know In 2020Understanding DevOps Tools Development, Testing Deployment Technologies Involved In DevOps Git 6 Simple Steps for Installing Chef On CentOS Last updated on May 22,2019 18.2K Views Saurabh Saurabh is a technology enthusiast working as a Research Analyst at Edureka.... Saurabh is a technology enthusiast working as a Re search Analyst at Edureka. His areas of interest are - DevOps, Artificial Intelligence, Big Data and...2 Comments Bookmark 2 / 3 Blog from Chef Become a Certified Professional Install ChefAre you looking forward to become a Certified Professional in DevOps? Well, if the answer is yes, let me tell you that you need to master in all top tools of DevOps. One such tool out of the lot is Chef. So this blog is a guide on how to install Chef on a CentOS machine. Installing Chef is like a cake walk, you just have to execute a few commands.Chef has three major components:WorkstationServerNodesFor demonstration purpose I will be using only one Node. There can be hundredsof Nodes managed by one Chef Server. I am using two CentOS Virtual Images one for Workstation and other for a Node. For Server, I will use the hosted version of Chef Server (on a cloud) available at manage. chef. myselfFollowing are the steps to install Chef:Install Chef DK (Development Kit) on Chef WorkstationSetupa Chef S erverCreate a Recipe or a Cookbook/ download a Cookbook from Chef Supermarketin WorkstationUpload a Cookbook on the Chef ServerConnect ANode To The Chef ServerDeploy the Cookbook from the Server to the Node1. Install Chef DK (Development Kit)In my Chef Workstation I will install Chef DK.Chef DK is a package that contains all the development tools that you will need when coding Chef. Here is the link to download Chef DK.Here, choose the operating system that you are using. I am using CentOS 6.8. So, I will click on Red Hat Enterprise Linux.Copy the link according to the version of CentOS that you are using. I am using CentOS 6, as you can see that I have highlighted in the above screenshot.Go to your Workstation terminal and download the Chef DK by using wget command and paste the link.Execute this command: wget https://packages.chef.io/stable/el/6/chefdk-1.0.3-1.el6.x86_64.rpm The package is now downloaded.Now I will install this package using rpm.Execute this: rpm -ivh chefdk-1.0.3-1.el6.x86_64.rpm 2. SetupChef ServerI will use the hosted version of Chef Server on the cloud but you can use a physical machine as well.This Chef-Server is present at manage.chef.ioOver here, create an account if you dont have one. Once you have created an account, sign-in with your login credentials.This is how Chef Server looks like.If you are signing in for the first time, the very first thing that you will be doing is creating an organization. Organization is basically a group of Machines that you will be managing with the Chef Server.First, I will go to the administration tab. Over there, I have already created an organization called edu. So I need to download the starter kit in my Workstation. This starter kit will help you to push files from the Workstation to the Chef Server. Click on the settings icon on the right hand side and click on Starter Kit.Now you will get an option to download the Starter Kit. Just click on it to download the Starter Kit zip file.Move this file to your root direct ory. Now unzip this file by using unzip command in your terminal. You will notice that it includes a directory called chef-repo.Execute this: unzip chef-starter.zip Now move this starter kit tothe cookbook directory in chef-repodirectory.Execute this: mv starter /root/chef-repo/cookbooks 3. Download ACookbook From Chef Supermarket In WorkstationChef Cookbooks are available in the Cookbook Supermarket, we can go to the Chef Supermarket. Download the required Cookbooks from supermarket.chef.io. Im downloading one of the Cookbook to install Apache from there.Execute this: cd chef-repo knife cookbook site download learn_chef_httpd There is Tar ball downloaded for the Apache Cookbook. Now, I willextract the contents from this downloaded Tar file. For that, I will use tar command.Execute this: tar -xvf learn_chef_httpd-0.2.0.tar.gz All the required files are automatically created under this Cookbook. There is no need to make any modifications. Lets check the Recipe description inside my recipe folder.Execute this: cd /root/chef-repo/learn_chef_httpd/recipes cat default.rb Now, I will just upload this cookbook to my Chef Server as it looks perfect to me.4. Upload A Cookbook InThe Chef ServerIn order to upload the Apache Cookbook that I have downloaded, first move this learn_chef_httpd file to the Cookbooks folder in the chef-repo. Then change your directory to cookbooks.Execute this: mv /root/chef-repo/learn_chef_httpd /root/chef-repo/cookbooks cd /root/chef-repo/cookbooks Now in this directory, execute the below command to upload the Apache Cookbook:Execute this: knife cookbook upload learn_chef_httpd Verify the Cookbook from the Chef Server Management console. In the policy section, you will find the Cookbook that you have uploaded. Refer the screenshot below:Now, our final step is to add Chef Node. Weve setup a Workstation, a Chef Server and we need to add our Nodesto the Chef Server for automation.5. Connect ANode To The Chef ServerThe terminal color of my Node machine is different from the Workstation so that you will be able to differentiate between both.I just need the IP address of my Node for that I will execute the below command in my Node machine.Execute this: ifconfig I will add my Chef Node to the Server by executing Knife Bootstrap command in which I will specify the IP address of The Chef Node and its name. Execute the command shown below:Execute this: knife bootstrap 192.168.56.102 --ssh-user root --ssh-password edureka --node-name chefNode This command will also initialize the installation of the Chef-Client in the Chef Node. You can verify it from the CLI on the Workstation using the knife command,as shown below:Execute this: Knife node list You can also verify from the Chef Server. Go to the nodes tab in your Server Management Console, here you will notice that the node that you have added is present. Refer the screenshot below:6. Deploy The Cookbook From The Server To The NodeLets see how we can add a Cookbook to the Node and manage its Run list from the Chef Server. Run List describes the order in which the Cookbooks should be executed. As you can see in the screenshot below, click the Actions tab and select the Edit Run list option to manage the Run list.In the Available Recipes, you can see our learn_chef_httpd Recipe, you can drag that from the available packages to the current Run List and save the Run list.Now login to your Node and just run chef-client to execute the Run List.Execute this: chef-client Congratulations! youhave successfully installed Chef and deployed Apache from your Chef Serverto the Node.I hope you were able to follow me through the installation process of Chef and by now Chef must be up and running in your machine.If you found this blog on InstallChef relevant,check out theDevOps training by Edureka,a trusted online learning companywith a network of more than250,000satisfied learnersspread acrossthe globe. The Edureka DevOps Certification Training coursehelps learners gain expertise in various DevOps processes and tools such asPuppet, Chef, Jenkins, Nagios and GIT for automating multiple steps in SDLC.Recommended videos for you Continuous Integration With Jenkins Watch Now Puppet Tutorial DevOps Tool For Configuration Management Watch Now Devops : Automate Your Infrastructure With Puppet Watch Now Top DevOps Interview Questions And Answers Watch Now DevOps Tutorial For Beginners Watch Now Ansible Tutorial For Beginners Ansible Playbook Watch Now DevOps-Redefi ning your IT Strategy Watch Now DevOps is Going to Replace SDLC! Learn Why Watch Now 5 Best Practices In DevOps Culture Watch Now What is Jenkins? Continuous Integration With Jenkins Watch Now What is Git A Complete Git Tutorial For Beginners Watch Now What is DevOps A Beginners Guide To DevOps Watch Now What is Docker DevOps Tool For Containerization Watch NowRecommended blogs for you What Is Agile Methodology Know the What and How? Read Article Why DevOps? 3 Ways In Which DevOps Improves Organizational Performance Read Article Kubernetes Tutorial A Comprehensive Guide For Kubernetes Read Article Git Submodules vs. Googleâs Repo Tool Read Article Jenkins Tutorial | Continuous Integration Using Jenkins | Edureka Read Article Git bisect: How to identify a bug in your code? Read Article Docker Swarm For Achieving High Availability Read Article All You Need To Know About DevOps Read Article Ansible Provisioning: Smarter and Effortless way of Provisioning Read Article Gitâting Ahead: Hacking Git And GitHub Part 3 Read Article Continuous Deployment A Comprehensive Guide With An Example Read Article Top Puppet Interview Questions For 2020 All You Need To Know About Puppet Read Article Ansible Roles- Ultimate way to untangle your Playbooks Read Article Top 50 Ansible Interview Questions And Answers in 2020 Read Article DevOps Engineer Career Path: Your Guide To Bagging Top DevOps Jobs Read Article Top Git Interview Questions You Need To Prepare In 2020 Read Article Exploring Ansible Tower With A Hands-On Read Article Understanding DevOps Tools Development, Testing Deployment Technologies Involved In DevOps Read Article This is how you share your work on a git remote repository Read Article Top 6 DevOps Skills That Organizations Are Looking For Read Article Comments 2 Comments Trending Courses in DevOps DevOps Certification Training72k Enrolled LearnersWeekend/WeekdayLive Class Reviews 5 (28700)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.