You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,15 @@
8
8
</tr>
9
9
</thead><tbody>
10
10
<trvalign=top>
11
+
<td>1.5.0</td>
12
+
<td>2017-10-18</td>
13
+
<td>
14
+
<li><ahref="https://github.com/github/octocatalog-diff/pull/151">#151</a>: (Enhancement) Support text differences in files where `source` is an array</li>
15
+
<li><ahref="https://github.com/github/octocatalog-diff/pull/153">#153</a>: (Enhancement) Support for hiera 5</li>
The following environment variables have special meaning to octocatalog-diff:
4
+
5
+
### `OCTOCATALOG_DIFF_CONFIG_FILE`
6
+
7
+
This environment variable is used to locate the configuration file for the CLI. The use of configuration files is described generally in:
8
+
9
+
-[Configuration](/doc/configuration.md)
10
+
11
+
### `OCTOCATALOG_DIFF_CUSTOM_VERSION`
12
+
13
+
When set, the `octocatalog-diff` CLI will display this as the version number within debugging, instead of the version number in the package. This is most useful if you want to use or include a git SHA in the version number.
When set, instead of loading libraries from the system or bundler location, libraries will be loaded from the specified value of this environment variable. This is used internally for development as we point users to unreleased code for debugging or testing.
-`octocatalog-diff` will create all of its temporary directories within the specified directory.
36
+
-`octocatalog-diff` will not attempt to remove any temporary directories it creates.
37
+
38
+
This is useful in the following situations:
39
+
40
+
- You are calling `octocatalog-diff` from within another program which is highly parallelized, and `at_exit` handlers are difficult to implement. Instead of figuring that all out (if it can even be figured out), you create a temporary directory before the parallelized logic, and remove it afterwards.
41
+
42
+
- You wish to debug intermediate output. For example, you may be instructed to set this variable and send some of the output to the project maintainers if you request assistance.
43
+
44
+
This variable is used internally for the parallelized logic for catalog compilation, but the value set from the environment will override any internal usage.
45
+
46
+
### `OCTOCATALOG_DIFF_VERSION`
47
+
48
+
This variable is used when building the gem, to override the default version. This is used for internal testing of `octocatalog-diff` before public releases. This variable is not useful outside the build context.
49
+
50
+
### `PUPPETDB_HOST`
51
+
52
+
This variable specifies the fully qualified domain name or IP address of the PuppetDB server.
53
+
54
+
Note: If `PUPPETDB_URL` is specified, then `PUPPETDB_HOST` is not consulted.
55
+
56
+
### `PUPPETDB_PORT`
57
+
58
+
This variable specifies the port number of the PuppetDB server.
59
+
60
+
Note: If `PUPPETDB_URL` is specified, then `PUPPETDB_PORT` is not consulted.
61
+
62
+
### `PUPPETDB_URL`
63
+
64
+
This variable specifies the URL to the PuppetDB server.
65
+
66
+
Example: `https://puppetdb.example.net:8081`
67
+
68
+
### `PUPPET_FACT_DIR`
69
+
70
+
This variable specifies the directory path where puppet fact files are stored. (Fact files must be named `<fqdn>.yaml` where `<fqdn>` is specified when running `octocatalog-diff`.)
Copy file name to clipboardExpand all lines: doc/configuration-hiera.md
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,28 @@
1
1
# Configuring octocatalog-diff to use Hiera
2
2
3
-
If you are using Hiera with Puppet, then you must already have a [`hiera.yaml`](https://docs.puppet.com/puppet/latest/reference/config_file_hiera.html) file to configure it. These instructions will guide you through pointing octocatalog-diff at that configuration file.
3
+
## Hiera 5
4
+
5
+
Hiera 5 is included with Puppet 4.9 and higher.
6
+
7
+
If there is a `hiera.yaml` file in the base directory of the environment that is in hiera 5 format, and you are running Puppet 4.9 or higher, then that file will be recognized by Puppet (and therefore, by octocatalog-diff). There is no special configuration for octocatalog-diff needed to make this work. Similarly, there is no command line option or setting to changed this behavior, because there is no corresponding option to change Puppet's behavior.
8
+
9
+
If you are running Puppet 4.8 or lower, then the `hiera.yaml` file in the base directory of the environment will be ignored (unless you use `--hiera-config` to specify it as your global configuration file).
10
+
11
+
If you have no global hiera configuration and you wish to rely on a `hiera.yaml` file in the base directory of your environment, make sure that you are *not* using any of the following command line options or [configuration settings](/doc/configuration.md):
12
+
13
+
-`--hiera-path` or `settings[:hiera_path]`
14
+
-`--hiera-path-strip` or `settings[:hiera_path_strip]`
15
+
-`--hiera-config` or `settings[:hiera_config]`
16
+
17
+
There is more information about Hiera 5 in Puppet's documentation:
18
+
19
+
-[Enable the environment layer for existing Hiera data](https://puppet.com/docs/puppet/5.3/hiera_migrate_environments.html)
20
+
21
+
## Hiera global configuration
22
+
23
+
If you are using Hiera 5 with a global configuration, or you are using Hiera 3 or before, then you must already have a [`hiera.yaml`](https://docs.puppet.com/puppet/latest/reference/config_file_hiera.html) file to configure it. These instructions will guide you through pointing octocatalog-diff at that configuration file.
24
+
25
+
octocatalog-diff will automatically determine the version of your Hiera configuration file and treat it accordingly. (Hiera 5 configuration files are identified as such by a `version: 5` line in the file itself.)
4
26
5
27
Before you start, please understand how octocatalog-diff compiles a catalog:
6
28
@@ -10,9 +32,9 @@ Before you start, please understand how octocatalog-diff compiles a catalog:
10
32
- It compiles the catalog, based on the temporary directory, for environment=production
11
33
- It removes the temporary directory
12
34
13
-
## Configuring the location of hiera.yaml
35
+
###Configuring the location of global hiera.yaml
14
36
15
-
The command line option `--hiera-config PATH` allows you to set the path to hiera.yaml.
37
+
The command line option `--hiera-config PATH` allows you to set the path to the global hiera.yaml.
16
38
17
39
You may specify this as either an absolute or a relative path.
18
40
@@ -24,12 +46,9 @@ You may specify this as either an absolute or a relative path.
The path is relative to a checkout of your Puppet repository. With the setting above, it will use the file named `hiera.yaml` that is at the top level
28
-
of your Puppet checkout.
49
+
The path is relative to a checkout of your Puppet repository. With the setting above, it will use the file named `hiera.yaml` that is at the top level of your Puppet checkout.
29
50
30
-
Perhaps your hiera.yaml file is in a subdirectory of your Puppet checkout. In that case, just use the relative directory path. Be sure not to add a leading `/` though,
31
-
because you don't want octocatalog-diff to treat it as an absolute path. In the following example, suppose you have a top level directory called `config` and your
32
-
`hiera.yaml` file is contained within it. You could then use:
51
+
Perhaps your hiera.yaml file is in a subdirectory of your Puppet checkout. In that case, just use the relative directory path. Be sure not to add a leading `/` though, because you don't want octocatalog-diff to treat it as an absolute path. In the following example, suppose you have a top level directory called `config` and your `hiera.yaml` file is contained within it. You could then use:
@@ -65,7 +84,7 @@ You may specify this as either an absolute or a relative path.
65
84
66
85
We strongly recommend that you version-control your hiera.yaml file within your Puppet repository, and use the relative path option described above.
67
86
68
-
## Configuring the directory in your repository in which hiera data files are found
87
+
### Configuring the directory in your repository in which hiera data files are found
69
88
70
89
The command line option `--hiera-path PATH` allows you to set the directory path, relative to the checkout of your Puppet repository, of your Hiera YAML/JSON data files.
71
90
@@ -88,7 +107,7 @@ If you are specifying the Hiera data path in the [configuration file](/doc/confi
88
107
89
108
octocatalog-diff will fail if you specify a path that is not a directory.
90
109
91
-
## Configuring the prefix path to strip
110
+
### Configuring the prefix path to strip
92
111
93
112
This is a different, and potentially more complex, alternative to `--hiera-path` / `settings[:hiera_path]` described in the prior section. Unless you have a very good reason, you should prefer to use the instructions above.
Copy file name to clipboardExpand all lines: doc/dev/releasing.md
+6-17Lines changed: 6 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,13 @@ The project maintainers are responsible for bumping the version number, regenera
6
6
7
7
*This procedure is performed by a GitHubber.*
8
8
9
-
To test the new version of `octocatalog-diff` in the GitHub Puppet repository:
9
+
To test the new version of `octocatalog-diff` in the GitHub Puppet repository, check out `github/puppet` and:
10
10
11
-
0. In a checkout of the GitHub Puppet repository, start a new branch based off master.
12
-
0. In the `octocatalog-diff` checkout:
13
-
- Ensure that the desired branch is checked out.
14
-
- Choose a unique internal version number which has never been used in CI. A good guideline is that if you're planning to release a version `0.6.0` then for these tests, use `0.6.0a`, `0.6.0b`, ...
15
-
- Build the gem using your internal version number:
0. Back in the Puppet checkout, ensure that the changes are as expected (updates to Gemfile / Gemfile.lock, addition of new gem). Push the change and build appropriate CI job(s) to validate the changes.
11
+
- Start a new branch based off master
12
+
- Run `script/update-octocatalog-diff -r <ocd_branch_name>`
13
+
- Confirm and commit the result
14
+
- Make sure all CI jobs pass
15
+
- Run the `puppet-catalog-diff` CI job and make sure it passes and shows expected results
Full or relative path to global Hiera configuration file for the from branch
659
+
</td>
660
+
<td valign=top>
661
+
Specify a relative path to the Hiera yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_config.rb">hiera_config.rb</a>)
662
+
</td>
663
+
</tr>
664
+
665
+
<tr>
666
+
<td valign=top>
667
+
<pre><code>--from-hiera-path STRING</code></pre>
668
+
</td>
669
+
<td valign=top>
670
+
Path to hiera data directory, relative to top directory of repository for the from branch
671
+
</td>
672
+
<td valign=top>
673
+
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
674
+
Puppet control repo template, the value of this should be 'hieradata', which is the default. (<ahref="../lib/octocatalog-diff/cli/options/hiera_path.rb">hiera_path.rb</a>)
Path prefix to strip when munging hiera.yaml for the from branch
684
+
</td>
685
+
<td valign=top>
686
+
Specify the path to strip off the datadir to munge hiera.yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_path_strip.rb">hiera_path_strip.rb</a>)
@@ -773,10 +817,10 @@ This timeout is specified in seconds. (<a href="../lib/octocatalog-diff/cli/opti
773
817
774
818
<tr>
775
819
<td valign=top>
776
-
<pre><code>--hiera-config PATH</code></pre>
820
+
<pre><code>--hiera-config STRING</code></pre>
777
821
</td>
778
822
<td valign=top>
779
-
Relative path to hiera YAML file
823
+
Full or relative path to global Hiera configuration file globally
780
824
</td>
781
825
<td valign=top>
782
826
Specify a relative path to the Hiera yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_config.rb">hiera_config.rb</a>)
@@ -785,10 +829,10 @@ This timeout is specified in seconds. (<a href="../lib/octocatalog-diff/cli/opti
785
829
786
830
<tr>
787
831
<td valign=top>
788
-
<pre><code>--hiera-path PATH</code></pre>
832
+
<pre><code>--hiera-path STRING</code></pre>
789
833
</td>
790
834
<td valign=top>
791
-
Path to hiera data directory, relative to top directory of repository
835
+
Path to hiera data directory, relative to top directory of repository globally
792
836
</td>
793
837
<td valign=top>
794
838
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
@@ -798,10 +842,10 @@ Puppet control repo template, the value of this should be 'hieradata', which is
798
842
799
843
<tr>
800
844
<td valign=top>
801
-
<pre><code>--hiera-path-strip PATH</code></pre>
845
+
<pre><code>--hiera-path-strip STRING</code></pre>
802
846
</td>
803
847
<td valign=top>
804
-
Path prefix to strip when munging hiera.yaml
848
+
Path prefix to strip when munging hiera.yaml globally
805
849
</td>
806
850
<td valign=top>
807
851
Specify the path to strip off the datadir to munge hiera.yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_path_strip.rb">hiera_path_strip.rb</a>)
@@ -1541,6 +1585,43 @@ by permitting a data type specification as well. (<a href="../lib/octocatalog-di
1541
1585
</td>
1542
1586
</tr>
1543
1587
1588
+
<tr>
1589
+
<td valign=top>
1590
+
<pre><code>--to-hiera-config STRING</code></pre>
1591
+
</td>
1592
+
<td valign=top>
1593
+
Full or relative path to global Hiera configuration file for the to branch
1594
+
</td>
1595
+
<td valign=top>
1596
+
Specify a relative path to the Hiera yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_config.rb">hiera_config.rb</a>)
1597
+
</td>
1598
+
</tr>
1599
+
1600
+
<tr>
1601
+
<td valign=top>
1602
+
<pre><code>--to-hiera-path STRING</code></pre>
1603
+
</td>
1604
+
<td valign=top>
1605
+
Path to hiera data directory, relative to top directory of repository for the to branch
1606
+
</td>
1607
+
<td valign=top>
1608
+
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
1609
+
Puppet control repo template, the value of this should be 'hieradata', which is the default. (<ahref="../lib/octocatalog-diff/cli/options/hiera_path.rb">hiera_path.rb</a>)
Path prefix to strip when munging hiera.yaml for the to branch
1619
+
</td>
1620
+
<td valign=top>
1621
+
Specify the path to strip off the datadir to munge hiera.yaml file (<a href="../lib/octocatalog-diff/cli/options/hiera_path_strip.rb">hiera_path_strip.rb</a>)
0 commit comments