Verified Commit 70b14d15 authored by Jérôme Charaoui's avatar Jérôme Charaoui 🕯️
Browse files

howto/puppet: environments vs exported resources (team#40861)

parent b47f2855
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -489,6 +489,10 @@ component of complex Puppet deployments. Exported resources allow one
host to define a configuration that will be *exported* to the Puppet
host to define a configuration that will be *exported* to the Puppet
server and then *realized* on another host.
server and then *realized* on another host.


These exported resources are not confined by environments: for example,
resources exported by a node assigned to the `foo` environment will be
available on all resources of the `production` environment, and vice-versa.

We commonly use this to punch holes in the firewall between nodes. For
We commonly use this to punch holes in the firewall between nodes. For
example, this manifest in the `roles::puppetmaster` class:
example, this manifest in the `roles::puppetmaster` class:


@@ -1594,6 +1598,10 @@ reverted before the branch is deleted on the control repo using `git push
--delete <branch>`. The git hook will take care of cleaning up the environment
--delete <branch>`. The git hook will take care of cleaning up the environment
files under `/etc/puppet/code/environments`.
files under `/etc/puppet/code/environments`.


It should be noted that contrary to hiera data and modules, [exported
resources](#exported-resources) are not confined by environments. Rather, they
all shared among all nodes regadless of their assigned environment.

The environments themselves are structured as follows. All paths are relative
The environments themselves are structured as follows. All paths are relative
to the root of that git repository.
to the root of that git repository.