How to Make Your Own yum Repo: Difference between revisions
Jump to navigation
Jump to search
(Created page based on "HOW TO MAKE YOUR OWN YUM REPO:" from Lab Manual) |
No edit summary |
||
Line 17: | Line 17: | ||
puppet module install -f pkg/****.tar.gz (This is whatever file the output says | puppet module install -f pkg/****.tar.gz (This is whatever file the output says | ||
To list out all the facts you can use in templates: facter --puppet | To list out all the facts you can use in templates: facter --puppet | ||
==To create a puppet module== | |||
To create a puppet module | |||
cd manifests | cd manifests | ||
vim init.pp | vim init.pp | ||
Line 31: | Line 30: | ||
puppet module generate bks-bla | puppet module generate bks-bla | ||
To test it, import the puppet class in the https://foreman.ucsf.bkslab.org/puppetclassesssh | To test it, import the puppet class in the https://foreman.ucsf.bkslab.org/puppetclassesssh | ||
Then add the module to a test machine on foreman, then on the test machine type: | Then add the module to a test machine on foreman, then on the test machine type: puppet agent -t | ||
For the exec statements make sure you have ensure => refreshonly | |||
[[Category:Sysadmin]] | [[Category:Sysadmin]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 19:15, 30 June 2016
Basic Steps
ssh alpha cd /share/repos mkdir custom (or whatever you are calling the repo) cd custom scp the rpm file to your new directory createrepo . cd /opt/bks/src/cluster/puppet/modules/bks-yum-repos/files/yum.repos.d cp hpsdr.repo custom.repo vim custom.repo
change whats in [] and the name and the baseurl save and quit
cd /opt/bks/src/cluster/puppet/modules/bks-yum-repos/ vim Modulefile
increment version, save and quit
puppet module build . puppet module install -f pkg/****.tar.gz (This is whatever file the output says
To list out all the facts you can use in templates: facter --puppet
To create a puppet module
cd manifests vim init.pp cd ../../ puppet module generate bks-arkeia (or whatever you want to name it) cd bks-arkeia cd manifests vim client.pp (you can call it whatever you want .pp)
To test the puppet module:
puppet parser validate filename
To create a module:
puppet module generate bks-bla
To test it, import the puppet class in the https://foreman.ucsf.bkslab.org/puppetclassesssh Then add the module to a test machine on foreman, then on the test machine type: puppet agent -t
For the exec statements make sure you have ensure => refreshonly