Thursday, July 9, 2020

Install Ansible

Install Ansible Install Ansible Ansible Installation In Two Easy Steps 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 Ansibl... DevOps (84 B logs) 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 Ansible Installation In Two Easy Steps Last updated on May 22,2019 26.9K Views Reshma Ahmed Reshma is a tech-savvy professional working as a Research Analyst at Edureka.... Reshma is a tech-savvy professional working as a Rese arch Analyst at Edureka. She is a DevOps evangelist, a Cloud enthusiast, a Big Data Hadoop...2 Comments Bookmark 2 / 8 Blog from Ansible Become a Certified Professional Install AnsibleThis blog will guide you to install Ansible in your CentOS machine in two easy steps. Ansible installation is just a piece of cake ;)You will also learn how to setup your node machines andI will show you an example of how to install Nginx in your node machine from your control machine. If you are still a little doubtful about using Ansible to manage your servers go through the features and advantages of using Ansible in my previous blog on What is Ansible and then you would be sure that Ansible is one of the best tool in the marketplace for automation and orchestration purpose. ;)Lets begin with the installation now.Install Ansible on CentOS 6.8Step 1: Set EPEL RepositoryEPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provi des high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.Ansible package is not available in the default yum repositories, so we will enable EPEL repository for CentOS 6.8 using the command below:sudo rpm -ivhhttp://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpmThis will download all the necessary packages which will be required to install Ansible.Step 2: Install AnsibleNow that your EPEL repository has been added, all you have to do now is install Ansible using the command below:yum install ansible -yAnd its done. I told you Ansible is easy! :DNow, if you want to check out your version of Ansible which you have installed, you can use the command below:ansible versionYou can see in the above snapshot that Ansible version 2.2.0.0 has been installed in your systemPost InstallationAfter installing Ansible you need to add servers which you want to manage through Ansible. For that I have cre ated another CentOS VM which will act as my node machine.The first task is to setup password-lessSSH authentication with nodes on my Control machine.Step 1: Generate SSH key on the Ansible Control Machine. In order to do that, use the command below:ssh-keygenAs you can see in the above snapshot a public SSH key has been generated.Step 2: Now, check the IP addresses of your nodes because you will need to specify it in the Ansible inventory later. To do that, type in the command ifconfig on your node terminal.Step 3: After the key is generated, the next task isto copy public key of Ansible server to its nodes. Use the command below:ssh-copy-id -i root@ip address of your node machineStep 4: Now, you can use any editor to write your inventory or specify the IP addresses of your nodes grouped under test-servers (or whatever you want your group name to be). I am using the vi editor.use the following command:vi /etc/ansible/hostsThis will open a vi editor like the snapshot below:After you have added the IP address under test-servers, save the file and then exit.Step 5: You might want to check if the IP address of your host has been added or not. To sample output of the host files using the following command:cat /etc/ansible/hostsYou can see the IP address of my host being displayed in the snapshot above.Step 6: Let us now perform a simple ping operation to test the connectivity using Ansible. To do that, just type the following command:ansible -m ping test-serversNow, that you have checked the connection with your host machines, you are ready to manage them with Ansible.Let me show you few shell command examples using Ansible.Check uptime of your node machinesUptime is a measure of the availability and working time of a computer. In order to check that use the following command:ansible -m command -a uptime test-serversCheck kernel version of your nodes It can be useful to know the version number of the kernel (i.e., the core of the operating system). Use the command below:ansible -m command -a uname -r test-serversNow, let us install Nginx into my node machine from my control machine using Ansible.Deploy Nginx Using AnsibleNginxis software to provide a web server. It can act as a reverse proxy server for TCP, UDP, HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache.I am deploying Nginx using Ansible in just one node. You can deploy it in multiple nodes too using the same way. All you have to do is list out the IP addresses of the nodes under test-servers. Use the following command in your control machine:ansible test-servers -m yum -a name=nginx state=installedNow to check if it is installed in your node machine, type the following command in your node:ps waux | grep nginxThe above snapshot shows that few processes are running with the PID 16387 and 772 which indicates that Nginx has been installed and it is ready to get started.I have used Ad hoc commands here to install Nginx on my nodes, but you can do t he same using Ansible playbooks or using the pre-defined Ansible modules as well.I hope you have enjoyed this Install Ansible blog and Ansible is up and running in your machine by now. :)If you want to learn how to manage your servers by using Ansible playbooks and Adhoc commands in my next blog on Ansible Tutorial.If you found this Install Ansible relevant,check out theDevOps trainingby 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, Jenkins, Ansible, Nagios and Git for automating multiple steps in SDLC.Recommended videos for you What is DevOps A Beginners Guide To DevOps Watch Now Devops : Automate Your Infrastructure With Puppet Watch Now 5 Best Practices In DevOps Culture Watch Now DevOps is Going to Replace SDLC! Learn Why Watch Now DevOps Tutorial For Beginners Watch Now Top DevO ps Interview Questions And Answers Watch Now What is Git A Complete Git Tutorial For Beginners Watch Now Ansible Tutorial For Beginners Ansible Playbook Watch Now What is Docker DevOps Tool For Containerization Watch Now Puppet Tutorial DevOps Tool For Configuration Management Watch Now What is Jenkins? Continuous Integration With Jenkins Watch Now Continuous Integration With Jenkins Watch Now DevOps-Redefining your IT Strategy Watch NowRecommended blogs for you AWS CodeDeploy: How To Automate Code Deployment? Read Article All You Need To Know About Continuous Integration With Jenkins Read Article Kubernetes Dashboard Installation and Views Read Article Nagios Tutorial Continuous Monitoring With Nagios Read Article DevOps vs Agile! Everything You Need To Know Read Article Infrastructure as Code What is it and Why is it it important? Read Article Azure Pipelines : Learn How To Create Azure Pipelines Read Article What Is Agile Methodology Know the What and How? Read Article AWS DevOps: Introduction to DevOps on AWS Read Article DevOps in various domains How DevOps solves the problem? Read Article Kubernetes Tutorial A Comprehensive Guide For Kubernetes Read Article Who Is A DevOps Engineer? DevOps Engineer Roles And Responsibilities Read Article What are the common Git mistakes and how to fix them? Read Article Top Jenkins Interview Questions You Must Prepare In 2020 Read Article What Is Docker Docker Container ? A Deep Dive Into Docker ! Read Article Install Ansible Ansible Installation In Two Easy Steps Read Article Git’ting Ahead: Hacking Git And GitHub Part 3 Read Article Install Jenkins In 5 Simple Steps | Jenkins Installation | Edureka Read Article What is Jenkins X and how is it Different from Jenkins? Read Article Jenkins Master and Slave Architecture A Complete Guide Read Article Comments 2 Comments Trending Courses in DevOps DevOps Certification Training72k Enrolled LearnersWeekend/WeekdayLive Class Reviews 5 (28700)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.