Puppet How to install a packagesoftware. Play Dog Vs Cat Hacked Zombie . In this post, we will see on how to install software in a machine using Puppet.Puppet is all about how you manage serversmachines in a programmatical way by using underlying tools.For example take installing a software, puppet will talk to software installing tools like rpmYumapt getMSIWindows Microsoft Installer etc in order to install required packages.In this post we will see how it do it and some examples of installing software using Puppet tool.How Puppet install packages It is simple, Puppet uses ruby scripts which are located in usrlibrubyvendorrubypuppetproviderpackageOn Linux based machine to talk to above mention software installation tools.When you say to Puppet please install some XYZ package, then our puppet do below stuff.Will check all system properties provided by facter tool.Read Puppet manifests and check what packages to install.After doing this, Puppet will just pass those details to these package installation tools for installation.Puppet tries to execute one of the matched script from the above mention folder in order to install a package on a node.Just for your understanding try to visit usrlibrubyvendorrubypuppetproviderpackage and see how many package installation tool Puppet can talk.Below is the list of tools scripts for people who do not want to visit thememail protected usrlibrubyvendorrubypuppetproviderpackage lsaix.Want to see for Windows Have a look at below output email protected usrlibrubyvendorrubypuppetproviderpackage cd windowsemail protected usrlibrubyvendorrubypuppetproviderpackagewindows lsexepackage.Hope this gives you a bit of introduction on how Puppet can install those many types of software irrespective of OS you are using.Let use see how we can install a package using Puppet.We will try to walk through as given below sequence to get more about how we can install packages in different ways.Syntax for installing a package type title argument value,otherarg value,Type This is a type of resource which can be a package, file, user etc.Title Can be a name of the resource or description.Argument Is a task what you have to do, this explains what title has to do.Value Is something to take effect.To understand more about this syntax we will see below example My site.If you observe my site.My testmodule for this post in it.Note I am going to use puppet apply command in order to execute code on the same machine where my manifests are there.Installing a single package using Puppet.Example 1 Change the ensure value in testmodulemanifestsinit.Output email protected etcpuppet puppet apply manifestssite.Notice Compiled catalog for linuxnix in environment production in 0.Info Applying configuration version 1.Notice StagemainTestmodulePackagescreenensure created.Notice Finished catalog run in 7.The above code says install screen package.We are giving package name as a screen and what we are doing with that package.This no need to be the latest version, just this package should be present on the target machine.Suppose you want to install package to latest version, use below code.Install a package to latest version using Puppet.Example 2 Change ensure to latest in testmodulemanifestsinit.Output email protected etcpuppet puppet apply manifestssite.Notice Compiled catalog for linuxnix in environment production in 0.Info Applying configuration version 1.For your security, if youre on a public computer and have finished using your Red Hat services, please be sure to log out.Log Out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |