[OpenStack-Infra] Remove placeholder hiera defaults commits
Paul Belanger
pabelanger at redhat.com
Wed Oct 28 02:27:51 UTC 2015
On Tue, Oct 27, 2015 at 06:35:38PM -0700, Spencer Krum wrote:
> 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.
Cannot speak to bitrot, as I think if we do something like this[1] we should be
consuming the same data production would use but in test enviornment.
Note, this is a quick hack. Ideally we'd be moving this data in to testing and
breaking things out from common.yaml
Also, 25mins of hacking.
[1] https://review.openstack.org/#/c/239783/7
>
> On Tue, Oct 27, 2015 at 6:30 PM, Paul Belanger <pabelanger at redhat.com>
> wrote:
>
> > On Tue, Oct 27, 2015 at 05:47:27PM -0700, Spencer Krum wrote:
> > > Paul,
> > >
> > > The hiera defaults were there to allow the apply test to work. Since
> > > Jonathan added a sed command to the apply test, they are no longer
> > needed.
> > >
> > > The defaults always were a code smell, they presented the issue that if a
> > > hiera key was not found, some parameter would be set to a publicly known
> > > string. Imagine if this had been a password!
> > >
> > > If you look at the apply test I think you can find the sed commands we
> > use
> > > to add back in hiera defaults. I hope that can help.
> > >
> > Repling here to keep the disussion going (I also posted something into
> > irc). My
> > concern about just using sed, seems to add an unneeded step into the
> > process.
> >
> > What I would much rather see us do is include a working hieradata folder,
> > with
> > dummy data, which then allows the user to pass the hiera_config flag to
> > puppet
> > apply.
> >
> > Something long the lines of:
> >
> > # hiera_config file
> > tools/hiera.yaml
> > ---
> > :backends:
> > - yaml
> > :yaml:
> > :datadir: tools/hieradata
> > :hierarchy:
> > - common
> >
> > # default hiera data holder
> > tools/hieradata/common.yaml
> > ---
> > stackalytics_ssh_private_key_contents: 'XXX'
> >
> > sudo puppet apply --modulepath=/etc/puppet/modules:modules
> > manifests/site.pp \
> > --certname=stackalytics.openstack.org --hiera_config tools/hiera.yaml
> >
> > This would again allow somebody to consume site.pp, using hiera data,
> > without
> > the need to create their own version of site.pp for testing or use sed.
> >
> > NOTE: I was just linked this[1] before sending, however wanted still
> > wanted to
> > send this email to continue discussions.
> >
> > [1] https://review.openstack.org/#/c/206779/
> >
> >
> > > Thanks
> > > Spencer
> > >
> > > On Tue, Oct 27, 2015 at 5:22 PM, Paul Belanger <pabelanger at redhat.com>
> > > wrote:
> > >
> > > > Greetings,
> > > >
> > > > I was hoping somebody could explain the reasoning behind the remove of
> > > > hiera
> > > > defaults in system-config? The commit title in question is 'Remove
> > > > placeholder
> > > > hiera defaults'.
> > > >
> > > > If you are not aware, this patch has currently broken my testing
> > > > environments,
> > > > as I currently don't setup hiera (actually unneeded until now).
> > > > Additionally, I
> > > > haven't been keeping up with the in tree hiera conversion, but
> > currently
> > > > cannot
> > > > find a sane hiera yaml file for testing enviornments. Could somebody
> > please
> > > > point me to the location?
> > > >
> > > > Hopefully this is just an oversight and somebody will be able to help
> > me
> > > > testing
> > > > without having to install hiera.
> > > >
> > > > ---
> > > > $ sudo puppet apply --modulepath=/etc/puppet/modules:modules
> > > > manifests/site.pp --certname=stackalytics.openstack.org
> > > > Error: Could not find data item
> > stackalytics_ssh_private_key_contents in
> > > > any Hiera data file and no default supplied at
> > > > /home/ubuntu/system-config/manifests/site.pp:144 on node
> > > > stackalytics.openstack.org
> > > > Error: Could not find data item
> > stackalytics_ssh_private_key_contents in
> > > > any Hiera data file and no default supplied at
> > > > /home/ubuntu/system-config/manifests/site.pp:144 on node
> > > > stackalytics.openstack.org
> > > >
> > > > _______________________________________________
> > > > OpenStack-Infra mailing list
> > > > OpenStack-Infra at lists.openstack.org
> > > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra
> > > >
> > >
> > >
> > >
> > > --
> > > Spencer Krum
> > > (619)-980-7820
> >
>
>
>
> --
> Spencer Krum
> (619)-980-7820
More information about the OpenStack-Infra
mailing list