Puppet development tips
Creating a 'testing' environment for new puppet code:
- Create a new patch in infra-puppet, assuming your branch/topic name is 'fix_puppet'
Push your patch into a new branch, lets assume you name it 'testing':
git push gerrit fix_puppet:testing
ssh to foreman.ovirt.org and populate the new enviornment:
su puppet-repos -c "cd /home/puppet-repos && scl enable ruby193 '/home/puppet-repos/bin/r10k deploy environment testing'"
In foreman import the new environment:
https://foreman.ovirt.org/environments -> 'Import from foreman.ovirt.org'
Change in foreman the puppet environment to 'testing' for the host you are working on.
Run puppet on your host to see the changes:
puppet agent --test
for logging you can use:
rm -rf puppetlog; puppet agent --test 2>&1 puppetlog | tee -a puppetlog
Iterate as you need (steps 2 and 3).
- Note that if the environment already exists, you don't need step 4.
- Once done, delete the testing branch you used.