Skip to content

Commit f5975bc

Browse files
author
Kevin Paulisse
committed
Add documentation
1 parent ac78579 commit f5975bc

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

doc/advanced-override-enc.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Overriding ENC parameters
2+
3+
One powerful feature of `octocatalog-diff` allows you to override ENC parameters when compiling the catalogs, to predict the effect of an ENC parameter change on the catalog. This is useful to simulate a change in agent node configuration without actually setting up an agent to do so.
4+
5+
## Usage
6+
7+
To override an ENC parameter in both catalogs:
8+
9+
```
10+
--enc-override parameters::some_class::some_param=value
11+
```
12+
13+
To override an ENC parameter in the "to" catalog:
14+
15+
```
16+
--to-enc-override parameters::some_class::some_param=value
17+
```
18+
19+
To override an ENC parameter in the "from" catalog:
20+
21+
```
22+
--from-enc-override parameters::some_class::some_param=value
23+
```
24+
25+
You may use as many of these arguments as you wish to adjust as many ENC parameters as you wish.
26+
27+
## Limitations
28+
29+
As presently implemented, this only works on ENCs that supply their results as YAML.
30+
31+
Is your ENC doing something different? Please [let us know](https://github.com/github/octocatalog-diff/issues/new) so we can enhance octocatalog-diff to handle it!
32+
33+
## Examples
34+
35+
Simulate a change to a top-level parameter named "role" only in the "to" catalog:
36+
37+
```
38+
octocatalog-diff -n some-node.example.com -f master -t master \
39+
--to-enc-override parameters::role=some_new_role
40+
```
41+
42+
Simulate a change in a class parameter between the catalogs:
43+
44+
```
45+
octocatalog-diff -n some-node.example.com -f master -t master \
46+
--from-enc-override parameters::my_class::my_value=value_in_old \
47+
--to-enc-override parameters::my_class::my_value=value_in_new
48+
```
49+
50+
Note that each of the examples specified the from branch and to branch to be `master`. There is no requirement that you do this, but you can generally obtain the most accurate test results by changing only one variable at a time.
51+
52+
## Advanced usage
53+
54+
The format for declaring overrides with data types is the same as [overriding facts](/doc/advanced-override-facts.md#advanced-usage).

doc/advanced.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ See also:
1818
- [Building catalogs instead of diffing catalogs](/doc/advanced-catalog-only.md)
1919
- [Enabling storeconfigs for exported resources in PuppetDB](/doc/advanced-storeconfigs.md)
2020
- [Fetching catalogs from Puppet Master / PuppetServer](/doc/advanced-puppet-master.md)
21+
- [Overriding ENC parameters](/doc/advanced-override-enc.md)
2122
- [Overriding facts](/doc/advanced-override-facts.md)
2223
- [Puppet Enterprise node classification service](/doc/advanced-pe-enc.md)
2324
- [Using `octocatalog-diff` without git](/doc/advanced-using-without-git.md)

0 commit comments

Comments
 (0)