Questions reg. Hiera v3 to v5 migration

25 views
Skip to first unread message

Dirk Heinrichs

unread,
Mar 3, 2020, 5:18:18 AM3/3/20
to puppet...@googlegroups.com
Hi,

while reading through the documentation about migrating to Hiera v5, the following questions came to my mind:

  • Can <Environment>/hiera.yaml be a symlink? Our setup is as such that each subdirectory (modules, manifests, hiera) of each environment is a clone of a Git repository, with different branches checked out. That means that in order to be able to enable per-environment hierarchies, I'd need to put hiera.yaml into the hiera repository.
  • Does the eyaml backend NEED to have the path(s) specified? In our current (v3) setup, we configure eyaml globally and then simply mix encrypted and uncencrypted values in the files given in the hierarchy. As I understand the documentation, the eyaml backend now has its own hierarchy. Is this correct?

Thanks...

Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Henrik Lindberg

unread,
Mar 3, 2020, 9:13:16 AM3/3/20
to puppet...@googlegroups.com
On 2020-03-03 11:17, Dirk Heinrichs wrote:
> Hi,
>
> while reading through the documentation about migrating to Hiera v5, the
> following questions came to my mind:
>
> * Can <Environment>/hiera.yaml be a symlink? Our setup is as such that
> each subdirectory (modules, manifests, hiera) of each environment is
> a clone of a Git repository, with different branches checked out.
> That means that in order to be able to enable per-environment
> hierarchies, I'd need to put hiera.yaml into the hiera repository.

I think it should work with a symlink. Report as an issue if it doesn't.

> * Does the eyaml backend NEED to have the path(s) specified? In our
> current (v3) setup, we configure eyaml globally and then simply mix
> encrypted and uncencrypted values in the files given in the
> hierarchy. As I understand the documentation, the eyaml backend now
> has its own hierarchy. Is this correct?
>

It does not have its own hierarchy. You can set up a default data
provider and that can be the eyaml one as it supports both clear text
and encrypted yaml content. You will need to repeat the default in each
of the hiera.yaml files as I don't think the defaults carry over from
global to env to module hiera.yaml configurations.

Hope that helps.
- henrik

>
> Thanks...
>
> Dirk
> --
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhei...@opentext.com <mailto:dhei...@opentext.com>
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If
> you are not the intended recipient (or have received this e-mail in
> error) please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
> E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
> Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
> die unbefugte Weitergabe dieser Mail sind nicht gestattet.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/637cf3f1b30ef085cbf67a27c07150adb2de3889.camel%40opentext.com
> <https://groups.google.com/d/msgid/puppet-users/637cf3f1b30ef085cbf67a27c07150adb2de3889.camel%40opentext.com?utm_medium=email&utm_source=footer>.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Dirk Heinrichs

unread,
Mar 4, 2020, 2:56:20 AM3/4/20
to puppet...@googlegroups.com
Am Dienstag, den 03.03.2020, 15:12 +0100 schrieb Henrik Lindberg:

Hope that helps.

Yeah, thanks a lot. Got another one, though.

I assume these two are equivalent:

hierarchy:
- name: "Per-kernel data"
path: "kernel/%{facts.kernel}.yaml"
- name: "Common data"
path: "common.yaml"

hierarchy:
- name: "All in one"
paths:
- "kernel/%{facts.kernel}.yaml"
- "common.yaml"

Is this correct?

Thanks...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind

Dirk Heinrichs

unread,
Mar 4, 2020, 3:12:35 AM3/4/20
to puppet...@googlegroups.com
Am Mittwoch, den 04.03.2020, 07:56 +0000 schrieb Dirk Heinrichs:

I assume these two are equivalent:

Once again, with better indentation:

Martin Alfke

unread,
Mar 4, 2020, 4:59:09 AM3/4/20
to puppet...@googlegroups.com
Hi Dirk,

On 4. Mar 2020, at 09:12, Dirk Heinrichs <dhei...@opentext.com> wrote:

Am Mittwoch, den 04.03.2020, 07:56 +0000 schrieb Dirk Heinrichs:

I assume these two are equivalent:

Yes, both deliver same results.
I prefer the second option (using paths)
The first option is useful in case that you need to set hierarchy individual settings.

Hth,
Martin

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ea220a40404e01eca25eb5ddf7e51c9dc9ccdaf6.camel%40opentext.com.

Dirk Heinrichs

unread,
Mar 4, 2020, 5:06:59 AM3/4/20
to puppet...@googlegroups.com
Am Mittwoch, den 04.03.2020, 10:58 +0100 schrieb Martin Alfke:

Yes, both deliver same results.
I prefer the second option (using paths)
The first option is useful in case that you need to set hierarchy individual settings.

Great. Thanks a lot.

Bye...
Reply all
Reply to author
Forward
0 new messages