<div dir="ltr">I'd like to see us make an example hiera common.yaml file for input to openstackci, but not for system-config. I worry if we don't get testing inside it, then it will bitrot almost instantly.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 27, 2015 at 6:30 PM, Paul Belanger <span dir="ltr"><<a href="mailto:pabelanger@redhat.com" target="_blank">pabelanger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 27, 2015 at 05:47:27PM -0700, Spencer Krum wrote:<br>
> Paul,<br>
><br>
> The hiera defaults were there to allow the apply test to work. Since<br>
> Jonathan added a sed command to the apply test, they are no longer needed.<br>
><br>
> The defaults always were a code smell, they presented the issue that if a<br>
> hiera key was not found, some parameter would be set to a publicly known<br>
> string. Imagine if this had been a password!<br>
><br>
> If you look at the apply test I think you can find the sed commands we use<br>
> to add back in hiera defaults. I hope that can help.<br>
><br>
</span>Repling here to keep the disussion going (I also posted something into irc). My<br>
concern about just using sed, seems to add an unneeded step into the process.<br>
<br>
What I would much rather see us do is include a working hieradata folder, with<br>
dummy data, which then allows the user to pass the hiera_config flag to puppet<br>
apply.<br>
<br>
Something long the lines of:<br>
<br>
# hiera_config file<br>
tools/hiera.yaml<br>
---<br>
:backends:<br>
- yaml<br>
:yaml:<br>
:datadir: tools/hieradata<br>
:hierarchy:<br>
- common<br>
<br>
# default hiera data holder<br>
tools/hieradata/common.yaml<br>
---<br>
stackalytics_ssh_private_key_contents: 'XXX'<br>
<span class=""><br>
sudo puppet apply --modulepath=/etc/puppet/modules:modules manifests/site.pp \<br>
</span>--certname=<a href="http://stackalytics.openstack.org" rel="noreferrer" target="_blank">stackalytics.openstack.org</a> --hiera_config tools/hiera.yaml<br>
<br>
This would again allow somebody to consume site.pp, using hiera data, without<br>
the need to create their own version of site.pp for testing or use sed.<br>
<br>
NOTE: I was just linked this[1] before sending, however wanted still wanted to<br>
send this email to continue discussions.<br>
<br>
[1] <a href="https://review.openstack.org/#/c/206779/" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/206779/</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> Thanks<br>
> Spencer<br>
><br>
> On Tue, Oct 27, 2015 at 5:22 PM, Paul Belanger <<a href="mailto:pabelanger@redhat.com">pabelanger@redhat.com</a>><br>
> wrote:<br>
><br>
> > Greetings,<br>
> ><br>
> > I was hoping somebody could explain the reasoning behind the remove of<br>
> > hiera<br>
> > defaults in system-config? The commit title in question is 'Remove<br>
> > placeholder<br>
> > hiera defaults'.<br>
> ><br>
> > If you are not aware, this patch has currently broken my testing<br>
> > environments,<br>
> > as I currently don't setup hiera (actually unneeded until now).<br>
> > Additionally, I<br>
> > haven't been keeping up with the in tree hiera conversion, but currently<br>
> > cannot<br>
> > find a sane hiera yaml file for testing enviornments. Could somebody please<br>
> > point me to the location?<br>
> ><br>
> > Hopefully this is just an oversight and somebody will be able to help me<br>
> > testing<br>
> > without having to install hiera.<br>
> ><br>
> > ---<br>
> > $ sudo puppet apply --modulepath=/etc/puppet/modules:modules<br>
> > manifests/site.pp --certname=<a href="http://stackalytics.openstack.org" rel="noreferrer" target="_blank">stackalytics.openstack.org</a><br>
> > Error: Could not find data item stackalytics_ssh_private_key_contents in<br>
> > any Hiera data file and no default supplied at<br>
> > /home/ubuntu/system-config/manifests/site.pp:144 on node<br>
> > <a href="http://stackalytics.openstack.org" rel="noreferrer" target="_blank">stackalytics.openstack.org</a><br>
> > Error: Could not find data item stackalytics_ssh_private_key_contents in<br>
> > any Hiera data file and no default supplied at<br>
> > /home/ubuntu/system-config/manifests/site.pp:144 on node<br>
> > <a href="http://stackalytics.openstack.org" rel="noreferrer" target="_blank">stackalytics.openstack.org</a><br>
> ><br>
> > _______________________________________________<br>
> > OpenStack-Infra mailing list<br>
> > <a href="mailto:OpenStack-Infra@lists.openstack.org">OpenStack-Infra@lists.openstack.org</a><br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Spencer Krum<br>
> <a href="tel:%28619%29-980-7820" value="+16199807820">(619)-980-7820</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Spencer Krum<br>(619)-980-7820</div>
</div>