control-repo how to use the profile setup

39 views
Skip to first unread message

Alex Samad

unread,
Jul 10, 2016, 8:17:45 PM7/10/16
to Puppet Users
Hi

I am using the control-rep from git (https://github.com/puppetlabs/control-repo)

it has site/profile/manifest/<profiles>.pp

I am creating a profile for standard install of java.

There is a file I would like to associated with this profile / class.

But I have created

site/profile/manifests/myjava.pp   << a file not a directory. so I am unsure where do I put the file resource ??

do I change myjava.pp to a directory and place myjava.pp into myjava/manifest/init.pp and place the file ?? which path of the tree.

I would like to be able to download the file from puppet and then I want to be able to rpm install it

the rpm is the oracle rpm

Alex

aar...@bigmirrorlabs.com

unread,
Jul 11, 2016, 9:56:08 AM7/11/16
to Puppet Users

New to puppet here, but I used this to handle my java dependency.

Alex Samad

unread,
Jul 11, 2016, 8:00:58 PM7/11/16
to Puppet Users
Ta

but !  I don't want to use the rpm / package from the distro (Centos), I want to use the one from oracle. I had hoped to use puppet for storing that. I have a repo setup and could add it there.

It was a 2 part question, 1 to solve the package problem, the other how to use the download from puppet web site. I remember from the training module you can store files in classes

A

Matthaus Owens

unread,
Jul 11, 2016, 8:13:16 PM7/11/16
to Puppet Users
Alex,

It looks like puppetlabs/java has a defined type to handle getting the oracle version of java (https://forge.puppet.com/puppetlabs/java#usage). The link has some examples of using the defined type to install oracle java 6 and oracle java 8.

HTH

--
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/fae84d50-ed98-4c5e-8cd5-c5c43bb88bd2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alex Samad

unread,
Jul 11, 2016, 8:36:30 PM7/11/16
to puppet...@googlegroups.com
Hi

Thanks, but ! not all of my boxes have internet access.

But thanks
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/er8PS8hY2iY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAcYKRuK3NnBcDWJ74ShKY8ZO6t6U%3D%3DvLr%3D9nHrFbYE2yA%40mail.gmail.com.

Gavin Williams

unread,
Jul 12, 2016, 4:23:00 AM7/12/16
to Puppet Users
Alex

I've done something similar for managing Oracle Java installation... 

I've created a 'base::software::java' class [1] within a site 'base' module, but you could equally do this in your profile I guess... 

As you can see from the class, if the '$source' param starts with 'puppet', then it's treated as a puppet fileserver path, and the RPM file is copied from the corresponding location on the Puppetmaster. 
This could be within the 'files' subfolder of your site module [2] or a separate file server path on your Puppetmaster [3][4].

I then call the 'base::software::java' class wherever it's required. An example is [5].

HTH

Gav

Alex Samad

unread,
Jul 12, 2016, 7:07:10 PM7/12/16
to puppet...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages