How to install GIT on puppet Server

400 views
Skip to first unread message

Satish Katuru

unread,
Aug 8, 2014, 7:50:04 AM8/8/14
to puppet...@googlegroups.com
Hi ,

I wanted to Install GIT on Linux machine using Puppet.I need step by step details.So Can any one help me on this?

Where do i download it and where do i need to place these folder...etc

Regards,
Sathish.

Dan White

unread,
Aug 8, 2014, 8:34:59 AM8/8/14
to puppet...@googlegroups.com
package { 'git': ensure => present, }

Or a more detailed approach is available at https://forge.puppetlabs.com/puppetlabs/git
Also, check out : https://docs.puppetlabs.com/puppet_core_types_cheatsheet.pdf  and "The Trifecta"
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”  (Bill Waterson: Calvin & Hobbes)
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ed3abe4f-02f0-4968-b802-57a51315deff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Satish Katuru

unread,
Aug 11, 2014, 5:50:45 AM8/11/14
to puppet...@googlegroups.com
Correct me If I am wrong.This means puppet automatically takes the latest version of GIT from the Repository and deploy it on the Master Server.
What about other softwares like java...etc ?
What is the procedure for other software installation which puppet wont take from the repository?

Dan White

unread,
Aug 11, 2014, 6:57:19 AM8/11/14
to puppet...@googlegroups.com
Yes and no. 
Yes: it takes the latest git from the repo. 
No: it will not deploy git on the Puppet Master. It will deploy git on the node running the Puppet agent that has that statement in its catalog.  The node can be the Puppet Master, but it also does noy have to be. 
Other softwares:  According to http://en.m.wikipedia.org/wiki/Git_(software)
git is written in C.  Why do you believe it needs java ?  Perhaps you mean some java based tool/GUI that acts as a front end for git.   Contrarywise, the provider under the Puppet package type should detect and deal with dependencies. 

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."

Bill Waterson (Calvin & Hobbes)

Vikas Kumar

unread,
Aug 11, 2014, 8:21:44 PM8/11/14
to puppet...@googlegroups.com
Hi Satish,

I would make a local repo and install it from there, just in case my server isn't connected to internet. If it is, you need not worry about it.

Just install the package, and tweak the configuration files for your setup.

Regards,
Vikas 

Satish Katuru

unread,
Aug 12, 2014, 3:00:15 AM8/12/14
to puppet...@googlegroups.com
Hi Vikas,

Thanks for your reply...Below are the steps I followed:

I have copied GIT software to my node (git-2.0.4) and my nodes.pp looks like below:

node "dayrhetamp076.enterprisenet.org"
{


package { 'git':

ensure => present,
source =>'/etc/puppet/git-2.0.4',  (Path of the git software)

}


}

First I tried with not providing Source and later I provided the GIT software path on the machine where it exists.But in both the scenarios I got the following errors:

TypeError: Can not open SQL database: unable to open database file
Error: /Stage[main]/Main/Node[dayrhetamp076.enterprisenet.org]/Package[git]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list git' returned 1: (process:9133): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed

(process:9133): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 434, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 187, in populate
    dobj = repo_cache_function(xml, csum)
  File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 46, in getPrimary
    self.repoid))
TypeError: Can not open SQL database: unable to open database file

Can you please help me out to resolve this?

Satish.

Vikas Kumar

unread,
Aug 12, 2014, 3:12:10 AM8/12/14
to puppet...@googlegroups.com
Hi Satish,

Which flavor or version of Linux are you using ?

I can try creating the scenario on my test machine and check myself.

In the meantime, can you please post output of this command -
/usr/bin/yum -d 0 -e 0 -y list git

 

A small suggestion - Use code syntax for pasting logs, it makes a post much readable.

Regards,
Vikas

Satish Katuru

unread,
Aug 12, 2014, 6:52:39 AM8/12/14
to puppet...@googlegroups.com
Hi Vikas,

Please find the below information:

Linux version: Linux 2.6.32-358.6.2.el6.x86_64 x86_64


Below is the output for the command

/usr/bin/yum -d 0 -e 0 -y list git


*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
Error: No matching Packages to list

Vikas Kumar

unread,
Aug 12, 2014, 7:17:26 PM8/12/14
to puppet...@googlegroups.com
Hi Satish,

I was looking the flavor of Linux OS not the kernel.

Run the below command to check OS major and minor version.
facter | egrep 'operatingsystem|lsbdistid|lsbdistdescription'


Also, the output of the command states that you do not git in your repository. 

/usr/bin/yum -d 0 -e 0 -y list git


*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
Error: No matching Packages to list

I think git rpm is there by default in all RedHat based OS. Still can you run below commands and share the output.

yum clean all
yum repolist
yum list all
| grep git


Regards,
Vikas

Jason Antman

unread,
Aug 13, 2014, 8:37:30 AM8/13/14
to puppet...@googlegroups.com
The module doesn't install git from source, because nobody should install packages from source on a RedHat derivative OS. Have you read the documentation for the git module? Or the package type, since you're specifying the "source" parameter?


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages