How to Make Your Own yum Repo

From DISI
Revision as of 19:13, 30 June 2016 by Benrwong (talk | contribs) (Created page based on "HOW TO MAKE YOUR OWN YUM REPO:" from Lab Manual)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 (continuation from making your own repo section):

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