Option |
Description |
Extended Description |
--basedir DIRNAME
|
Use an alternate base directory (git checkout of puppet repository)
|
Option to set the base checkout directory of puppet repository (basedir.rb)
|
--bootstrap-current
|
Run bootstrap script for the current directory too
|
Option to bootstrap the current directory (by default, the bootstrap script is NOT
run when the catalog builds in the current directory). (bootstrap_current.rb)
|
--bootstrap-environment "key1=val1,key2=val2,..."
|
Bootstrap script environment variables in key=value format
|
Allow the bootstrap environment to be set up via the command line. (bootstrap_environment.rb)
|
--bootstrap-script FILENAME
|
Bootstrap script relative to checkout directory
|
Allow specification of a bootstrap script. This runs after checking out the directory, and before running
puppet there. Good for running librarian to install modules, and anything else site-specific that needs
to be done. (bootstrap_script.rb)
|
--bootstrap-then-exit
|
Bootstrap from-dir and/or to-dir and then exit
|
Option to bootstrap directories and then exit (bootstrap_then_exit.rb)
|
--bootstrapped-from-dir DIRNAME
|
Use a pre-bootstrapped 'from' directory
|
Allow (or create) directories that are already bootstrapped. Handy to allow "bootstrap once, build many"
to save time when diffing multiple catalogs on this system. (bootstrapped_dirs.rb)
|
--bootstrapped-to-dir DIRNAME
|
Use a pre-bootstrapped 'to' directory
|
Allow (or create) directories that are already bootstrapped. Handy to allow "bootstrap once, build many"
to save time when diffing multiple catalogs on this system. (bootstrapped_dirs.rb)
|
--cached-master-dir PATH
|
Cache bootstrapped origin/master at this path
|
Cache a bootstrapped checkout of 'master' and use that for time-saving when the SHA
has not changed. (cached_master_dir.rb)
|
--catalog-only
--no-catalog-only
|
Only compile the catalog for the "to" branch but do not diff
|
When set, --catalog-only will only compile the catalog for the 'to' branch, and skip any
diffing activity. The catalog will be printed to STDOUT or written to the output file. (catalog_only.rb)
|
--color
--no-color
|
Enable/disable colors in output
|
Color printing option (color.rb)
|
--command-line STRING1[,STRING2[,...]]
|
Command line arguments globally
|
Provide additional command line flags to set when running Puppet to compile catalogs. (command_line.rb)
|
--compare-file-text
--no-compare-file-text
|
Compare text, not source location, of file resources
|
When a file is specified with `source => 'puppet:///modules/something/foo.txt'`, remove
the 'source' attribute and populate the 'content' attribute with the text of the file.
This allows for a diff of the content, rather than a diff of the location, which is
what is most often desired. (compare_file_text.rb)
|
--create-symlinks STRING1[,STRING2[,...]]
|
Symlinks to create globally
|
Specify which directories from the base should be symlinked into the temporary compilation
environment. This is useful only in conjunction with `--preserve-environments`. (create_symlinks.rb)
|
-d
--debug
--no-debug
|
Print debugging messages to STDERR
|
Debugging option (debug.rb)
|
--debug-bootstrap
|
Print debugging output for bootstrap script
|
Option to print debugging output for the bootstrap script in addition to the normal
debugging output. Note that `--debug` must also be enabled for this option to have
any effect. (debug_bootstrap.rb)
|
--default-header
|
Print default header with output
|
Provide ability to set custom header or to display no header at all (header.rb)
|
--display-datatype-changes
--no-display-datatype-changes
|
Display changes in data type even when strings match
|
Toggle on or off the display of data type changes when the string representation
is the same. For example with this enabled, '42' (the string) and 42 (the integer)
will be displayed as a difference. With this disabled, this is not displayed as a
difference. (display_datatype_changes.rb)
|
--display-detail-add
--no-display-detail-add
|
Display parameters and other details for added resources
|
Provide ability to display details of 'added' resources in the output. (display_detail_add.rb)
|
--display-source
--no-display-source
|
Show source file and line for each difference
|
Display source filename and line number for diffs (display_source_file_line.rb)
|
--enc PATH
|
Path to ENC script, relative to checkout directory or absolute
|
Path to external node classifier, relative to the base directory of the checkout. (enc.rb)
|
--enc-override STRING1[,STRING2[,...]]
|
Override parameter from ENC globally
|
Allow override of ENC parameters on the command line. ENC parameter overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. For parameters nested in hashes, use `::` as the delimiter. (enc_override.rb)
|
--environment STRING
|
Environment for catalog compilation globally
|
Specify the environment to use when compiling the catalog. This is useful only in conjunction
with `--preserve-environments`. (environment.rb)
|
--fact-file STRING
|
Override fact globally
|
Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB. (fact_file.rb)
|
--fact-override STRING1[,STRING2[,...]]
|
Override fact globally
|
Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. (fact_override.rb)
|
--facts-terminus STRING
|
Facts terminus: one of yaml, facter
|
Get the facts terminus. Generally this is 'yaml' and a fact file will be loaded from PuppetDB or
elsewhere in the environment. However it can be set to 'facter' which will run facter on the host
on which this is running. (facts_terminus.rb)
|
--filters FILTER1[,FILTER2[,...]]
|
Filters to apply
|
Specify one or more filters to apply to the results of the catalog difference.
For a list of available filters and further explanation, please refer to
Filtering results. (filters.rb)
|
-f FROM_BRANCH
--from FROM_BRANCH
|
Branch you are coming from
|
Set the 'from' and 'to' branches, which is used to compile catalogs. A branch of '.' means to use
the current contents of the base code directory without any git checkouts. (to_from_branch.rb)
|
--from-catalog FILENAME
|
Use a pre-compiled catalog 'from'
|
If pre-compiled catalogs are available, these can be used to short-circuit the build process.
These files must exist and be in Puppet catalog format. (existing_catalogs.rb)
|
--from-command-line STRING1[,STRING2[,...]]
|
Command line arguments for the from branch
|
Provide additional command line flags to set when running Puppet to compile catalogs. (command_line.rb)
|
--from-create-symlinks STRING1[,STRING2[,...]]
|
Symlinks to create for the from branch
|
Specify which directories from the base should be symlinked into the temporary compilation
environment. This is useful only in conjunction with `--preserve-environments`. (create_symlinks.rb)
|
--from-enc PATH
|
Path to ENC script (for the from catalog only)
|
Path to external node classifier, relative to the base directory of the checkout. (enc.rb)
|
--from-enc-override STRING1[,STRING2[,...]]
|
Override parameter from ENC for the from branch
|
Allow override of ENC parameters on the command line. ENC parameter overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. For parameters nested in hashes, use `::` as the delimiter. (enc_override.rb)
|
--from-environment STRING
|
Environment for catalog compilation for the from branch
|
Specify the environment to use when compiling the catalog. This is useful only in conjunction
with `--preserve-environments`. (environment.rb)
|
--from-fact-file STRING
|
Override fact for the from branch
|
Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB. (fact_file.rb)
|
--from-fact-override STRING1[,STRING2[,...]]
|
Override fact for the from branch
|
Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. (fact_override.rb)
|
--from-hiera-config STRING
|
Full or relative path to global Hiera configuration file for the from branch
|
Specify a relative path to the Hiera yaml file (hiera_config.rb)
|
--from-hiera-path STRING
|
Path to hiera data directory, relative to top directory of repository for the from branch
|
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
Puppet control repo template, the value of this should be 'hieradata', which is the default. (hiera_path.rb)
|
--from-hiera-path-strip STRING
|
Path prefix to strip when munging hiera.yaml for the from branch
|
Specify the path to strip off the datadir to munge hiera.yaml file (hiera_path_strip.rb)
|
--from-puppet-binary STRING
|
Full path to puppet binary for the from branch
|
Set --puppet-binary, --to-puppet-binary, --from-puppet-binary (puppet_binary.rb)
|
--from-puppet-master STRING
|
Hostname or Hostname:PortNumber for Puppet Master for the from branch
|
Specify the hostname, or hostname:port, for the Puppet Master. (puppet_master.rb)
|
--from-puppet-master-api-version STRING
|
Puppet Master API version (2 for Puppet 3.x, 3 for Puppet 4.x) for the from branch
|
Specify the API version to use for the Puppet Master. This makes it possible to authenticate to a
version 3.x PuppetMaster by specifying the API version as 2, or for a version 4.x PuppetMaster by
specifying API version as 3. (puppet_master_api_version.rb)
|
--from-puppet-master-ssl-ca STRING
|
Full path to CA certificate that signed the Puppet Master certificate for the from branch
|
Specify the CA certificate for Puppet Master. If specified, this will enable SSL verification
that the certificate being presented has been signed by this CA, and that the common name
matches the name you are using to connecting. (puppet_master_ssl_ca.rb)
|
--from-puppet-master-ssl-client-cert STRING
|
Full path to certificate file for SSL client auth to Puppet Master for the from branch
|
Specify the SSL client certificate for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_cert.rb)
|
--from-puppet-master-ssl-client-key STRING
|
Full path to key file for SSL client auth to Puppet Master for the from branch
|
Specify the SSL client key for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_key.rb)
|
--from-puppet-master-timeout STRING
|
Puppet Master catalog retrieval timeout in seconds for the from branch
|
Specify a timeout for retrieving a catalog from a Puppet master / Puppet server.
This timeout is specified in seconds. (puppet_master_timeout.rb)
|
--from-puppetdb
--no-from-puppetdb
|
Pull "from" catalog from PuppetDB instead of compiling
|
Set --from-puppetdb to pull most recent catalog from PuppetDB instead of compiling (from_puppetdb.rb)
|
--from-save-catalog STRING
|
Save intermediate catalogs into files for the from branch
|
Allow catalogs to be saved to a file before they are diff'd. (save_catalog.rb)
|
--header STRING
|
Specify header for output
|
Provide ability to set custom header or to display no header at all (header.rb)
|
--hiera-config STRING
|
Full or relative path to global Hiera configuration file globally
|
Specify a relative path to the Hiera yaml file (hiera_config.rb)
|
--hiera-path STRING
|
Path to hiera data directory, relative to top directory of repository globally
|
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
Puppet control repo template, the value of this should be 'hieradata', which is the default. (hiera_path.rb)
|
--hiera-path-strip STRING
|
Path prefix to strip when munging hiera.yaml globally
|
Specify the path to strip off the datadir to munge hiera.yaml file (hiera_path_strip.rb)
|
-n HOSTNAME1[,HOSTNAME2[,...]]
--hostname HOSTNAME1[,HOSTNAME2[,...]]
|
Use PuppetDB facts from last run of a hostname or a comma separated list of multiple hostnames
|
Set hostname, which is used to look up facts in PuppetDB, and in the header of diff display.
This option can recieve a single hostname, or a comma separated list of
multiple hostnames, which are split into an Array. Multiple hostnames do not
work with the `catalog-only` or `bootstrap-then-exit` options. (hostname.rb)
|
--ignore "Type1[Title1],Type2[Title2],..."
|
More resources to ignore in format type[title]
|
Options used when comparing catalogs - set ignored changes. (ignore.rb)
|
--ignore-attr "attr1,attr2,..."
|
Attributes to ignore
|
Specify attributes to ignore (ignore_attr.rb)
|
--ignore-tags STRING1[,STRING2[,...]]
|
Specify tags to ignore
|
Provide ability to set one or more tags, which will cause catalog-diff
to ignore any changes for any defined type where this tag is set. (ignore_tags.rb)
|
--include-tags
--no-include-tags
|
Include changes to tags in the diff output
|
Options used when comparing catalogs - tags are generally ignored; you can un-ignore them. (include_tags.rb)
|
--master-cache-branch BRANCH
|
Branch to cache
|
Allow override of the branch that is cached. This defaults to 'origin/master'. (master_cache_branch.rb)
|
--no-enc
|
Disable ENC
|
Path to external node classifier, relative to the base directory of the checkout. (enc.rb)
|
--no-header
|
Do not print a header
|
Provide ability to set custom header or to display no header at all (header.rb)
|
--no-hiera-config
|
Disable hiera config file installation
|
Specify a relative path to the Hiera yaml file (hiera_config.rb)
|
--no-hiera-path
|
Do not use any default hiera path settings
|
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
Puppet control repo template, the value of this should be 'hieradata', which is the default. (hiera_path.rb)
|
--no-hiera-path-strip
|
Do not use any default hiera path strip settings
|
Specify the path to strip off the datadir to munge hiera.yaml file (hiera_path_strip.rb)
|
--no-ignore-tags
|
Disable ignoring based on tags
|
Provide ability to set one or more tags, which will cause catalog-diff
to ignore any changes for any defined type where this tag is set. (ignore_tags.rb)
|
-o FILENAME
--output-file FILENAME
|
Output results into FILENAME
|
Output file option (output_file.rb)
|
--output-format FORMAT
|
Output format: text,json,legacy_json
|
Output format option. 'text' is human readable text, 'json' is an array of differences
identified by human readable keys (the preferred octocatalog-diff 1.x format), and 'legacy_json' is an
array of differences, where each difference is an array (the octocatalog-diff 0.x format). (output_format.rb)
|
--override-script-path DIRNAME
|
Directory with scripts to override built-ins
|
Provide an optional directory to override default built-in scripts such as git checkout
and puppet version determination. (override_script_path.rb)
|
--parallel
--no-parallel
|
Enable or disable parallel processing
|
Disable or enable parallel processing of catalogs. (parallel.rb)
|
--parser PARSER_NAME
|
Specify parser (default, future)
|
Enable future parser for both branches or for just one (parser.rb)
|
--parser-from PARSER_NAME
|
Specify parser (default, future)
|
Enable future parser for both branches or for just one (parser.rb)
|
--parser-to PARSER_NAME
|
Specify parser (default, future)
|
Enable future parser for both branches or for just one (parser.rb)
|
--pass-env-vars VAR1[,VAR2[,...]]
|
Environment variables to pass
|
One or more environment variables that should be made available to the Puppet binary when parsing
the catalog. For example, --pass-env-vars FOO,BAR will make the FOO and BAR environment variables
available. Setting these variables is your responsibility outside of octocatalog-diff. (pass_env_vars.rb)
|
--pe-enc-ssl-ca FILENAME
|
CA certificate that signed the ENC API certificate
|
Specify the CA certificate for the Puppet Enterprise ENC. If specified, this will enable SSL verification
that the certificate being presented has been signed by this CA, and that the common name
matches the name you are using to connecting. (pe_enc_ssl_ca.rb)
|
--pe-enc-ssl-client-cert FILENAME
|
SSL client certificate to connect to PE ENC
|
Specify the client certificate for connecting to the Puppet Enterprise ENC. This must be specified along with
--pe-enc-ssl-client-key in order to work. (pe_enc_ssl_client_cert.rb)
|
--pe-enc-ssl-client-key FILENAME
|
SSL client key to connect to PE ENC
|
Specify the client key for connecting to Puppet Enterprise ENC. This must be specified along with
--pe-enc-ssl-client-cert in order to work. (pe_enc_ssl_client_key.rb)
|
--pe-enc-token TOKEN
|
Token to access the Puppet Enterprise ENC API
|
Specify the access token to access the Puppet Enterprise ENC. Refer to
https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for
details on generating and obtaining a token. Use this option to specify the text
of the token. (Use --pe-enc-token-file to read the content of the token from a file.) (pe_enc_token.rb)
|
--pe-enc-token-file PATH
|
Path containing token for PE node classifier, relative or absolute
|
Specify the access token to access the Puppet Enterprise ENC. Refer to
https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for
details on generating and obtaining a token. Use this option if the token is stored
in a file, to read the content of the token from the file. (pe_enc_token_file.rb)
|
--pe-enc-url URL
|
Base URL for Puppet Enterprise ENC endpoint
|
Specify the URL to the Puppet Enterprise ENC API. By default, the node classifier service
listens on port 4433 and all endpoints are relative to the /classifier-api/ path. That means
the likely value for this option will be something like:
https://your-pe-console-server:4433/classifier-api (pe_enc_url.rb)
|
--preserve-environments
--no-preserve-environments
|
Enable or disable environment preservation
|
Preserve the `environments` directory from the repository when compiling the catalog. Likely
requires some combination of `--to-environment`, `--from-environment`, and/or `--create-symlinks`
to work correctly. (preserve_environments.rb)
|
--puppet-binary STRING
|
Full path to puppet binary globally
|
Set --puppet-binary, --to-puppet-binary, --from-puppet-binary (puppet_binary.rb)
|
--puppet-master STRING
|
Hostname or Hostname:PortNumber for Puppet Master globally
|
Specify the hostname, or hostname:port, for the Puppet Master. (puppet_master.rb)
|
--puppet-master-api-version STRING
|
Puppet Master API version (2 for Puppet 3.x, 3 for Puppet 4.x) globally
|
Specify the API version to use for the Puppet Master. This makes it possible to authenticate to a
version 3.x PuppetMaster by specifying the API version as 2, or for a version 4.x PuppetMaster by
specifying API version as 3. (puppet_master_api_version.rb)
|
--puppet-master-ssl-ca STRING
|
Full path to CA certificate that signed the Puppet Master certificate globally
|
Specify the CA certificate for Puppet Master. If specified, this will enable SSL verification
that the certificate being presented has been signed by this CA, and that the common name
matches the name you are using to connecting. (puppet_master_ssl_ca.rb)
|
--puppet-master-ssl-client-cert STRING
|
Full path to certificate file for SSL client auth to Puppet Master globally
|
Specify the SSL client certificate for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_cert.rb)
|
--puppet-master-ssl-client-key STRING
|
Full path to key file for SSL client auth to Puppet Master globally
|
Specify the SSL client key for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_key.rb)
|
--puppet-master-timeout STRING
|
Puppet Master catalog retrieval timeout in seconds globally
|
Specify a timeout for retrieving a catalog from a Puppet master / Puppet server.
This timeout is specified in seconds. (puppet_master_timeout.rb)
|
--puppetdb-api-version N
|
Version of PuppetDB API (3 or 4)
|
Specify the API version to use for the PuppetDB. The current values supported are '3' or '4', and '4' is
the default. (puppetdb_api_version.rb)
|
--puppetdb-ssl-ca FILENAME
|
CA certificate that signed the PuppetDB certificate
|
Specify the CA certificate for PuppetDB. If specified, this will enable SSL verification
that the certificate being presented has been signed by this CA, and that the common name
matches the name you are using to connecting. (puppetdb_ssl_ca.rb)
|
--puppetdb-ssl-client-cert FILENAME
|
SSL client certificate to connect to PuppetDB
|
Specify the client certificate for connecting to PuppetDB. This must be specified along with
--puppetdb-ssl-client-key in order to work. (puppetdb_ssl_client_cert.rb)
|
--puppetdb-ssl-client-key FILENAME
|
SSL client key to connect to PuppetDB
|
Specify the client key for connecting to PuppetDB. This must be specified along with
--puppetdb-ssl-client-cert in order to work. (puppetdb_ssl_client_key.rb)
|
--puppetdb-ssl-client-password PASSWORD
|
Password for SSL client key to connect to PuppetDB
|
Specify the password for a PEM or PKCS12 private key on the command line.
Note that `--puppetdb-ssl-client-password-file` is slightly more secure because
the text of the password won't appear in the process list. (puppetdb_ssl_client_password.rb)
|
--puppetdb-ssl-client-password-file FILENAME
|
Read password for SSL client key from a file
|
Specify the password for a PEM or PKCS12 private key, by reading it from a file. (puppetdb_ssl_client_password_file.rb)
|
--puppetdb-token TOKEN
|
Token to access the PuppetDB API
|
Specify the PE RBAC token to access the PuppetDB API. Refer to
https://puppet.com/docs/pe/latest/rbac/rbac_token_auth_intro.html#generate-a-token-using-puppet-access
for details on generating and obtaining a token. Use this option to specify the text
of the token. (Use --puppetdb-token-file to read the content of the token from a file.) (puppetdb_token.rb)
|
--puppetdb-token-file PATH
|
Path containing token for PuppetDB API, relative or absolute
|
Specify the PE RBAC token to access the PuppetDB API. Refer to
https://puppet.com/docs/pe/latest/rbac/rbac_token_auth_intro.html#generate-a-token-using-puppet-access
for details on generating and obtaining a token. Use this option to specify the text
in a file, to read the content of the token from the file. (puppetdb_token_file.rb)
|
--puppetdb-url URL
|
PuppetDB base URL
|
Specify the base URL for PuppetDB. This will generally look like https://puppetdb.yourdomain.com:8081 (puppetdb_url.rb)
|
-q
--quiet
--no-quiet
|
Quiet (no status messages except errors)
|
Quiet option (quiet.rb)
|
--retry-failed-catalog N
|
Retry building a failed catalog N times
|
Transient errors can cause catalog compilation problems. This adds an option to retry
a failed catalog multiple times before kicking out an error message. (retry_failed_catalog.rb)
|
--safe-to-delete-cached-master-dir PATH
|
OK to delete cached master directory at this path
|
By specifying a directory path here, you are explicitly giving permission to the program
to delete it if it believes it needs to be created (e.g., if the SHA has changed of the
cached directory). (safe_to_delete_cached_master_dir.rb)
|
--save-catalog STRING
|
Save intermediate catalogs into files globally
|
Allow catalogs to be saved to a file before they are diff'd. (save_catalog.rb)
|
--storeconfigs
--no-storeconfigs
|
Enable integration with puppetdb for collected resources
|
Set storeconfigs (integration with PuppetDB for collected resources) (storeconfigs.rb)
|
--suppress-absent-file-details
--no-suppress-absent-file-details
|
Suppress certain attributes of absent files
|
If enabled, this option will suppress changes to certain attributes of a file, if the
file is specified to be 'absent' in the target catalog. Suppressed changes in this case
include user, group, mode, and content, because a removed file has none of those.
This option is DEPRECATED; please use --filters AbsentFile instead. (suppress_absent_file_details.rb)
|
-t TO_BRANCH
--to TO_BRANCH
|
Branch you are going to
|
Set the 'from' and 'to' branches, which is used to compile catalogs. A branch of '.' means to use
the current contents of the base code directory without any git checkouts. (to_from_branch.rb)
|
--to-catalog FILENAME
|
Use a pre-compiled catalog 'to'
|
If pre-compiled catalogs are available, these can be used to short-circuit the build process.
These files must exist and be in Puppet catalog format. (existing_catalogs.rb)
|
--to-command-line STRING1[,STRING2[,...]]
|
Command line arguments for the to branch
|
Provide additional command line flags to set when running Puppet to compile catalogs. (command_line.rb)
|
--to-create-symlinks STRING1[,STRING2[,...]]
|
Symlinks to create for the to branch
|
Specify which directories from the base should be symlinked into the temporary compilation
environment. This is useful only in conjunction with `--preserve-environments`. (create_symlinks.rb)
|
--to-enc PATH
|
Path to ENC script (for the to catalog only)
|
Path to external node classifier, relative to the base directory of the checkout. (enc.rb)
|
--to-enc-override STRING1[,STRING2[,...]]
|
Override parameter from ENC for the to branch
|
Allow override of ENC parameters on the command line. ENC parameter overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. For parameters nested in hashes, use `::` as the delimiter. (enc_override.rb)
|
--to-environment STRING
|
Environment for catalog compilation for the to branch
|
Specify the environment to use when compiling the catalog. This is useful only in conjunction
with `--preserve-environments`. (environment.rb)
|
--to-fact-file STRING
|
Override fact for the to branch
|
Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB. (fact_file.rb)
|
--to-fact-override STRING1[,STRING2[,...]]
|
Override fact for the to branch
|
Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
or for both. There is some attempt to handle data types here (since all items on the command line are strings)
by permitting a data type specification as well. (fact_override.rb)
|
--to-hiera-config STRING
|
Full or relative path to global Hiera configuration file for the to branch
|
Specify a relative path to the Hiera yaml file (hiera_config.rb)
|
--to-hiera-path STRING
|
Path to hiera data directory, relative to top directory of repository for the to branch
|
Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
Puppet control repo template, the value of this should be 'hieradata', which is the default. (hiera_path.rb)
|
--to-hiera-path-strip STRING
|
Path prefix to strip when munging hiera.yaml for the to branch
|
Specify the path to strip off the datadir to munge hiera.yaml file (hiera_path_strip.rb)
|
--to-puppet-binary STRING
|
Full path to puppet binary for the to branch
|
Set --puppet-binary, --to-puppet-binary, --from-puppet-binary (puppet_binary.rb)
|
--to-puppet-master STRING
|
Hostname or Hostname:PortNumber for Puppet Master for the to branch
|
Specify the hostname, or hostname:port, for the Puppet Master. (puppet_master.rb)
|
--to-puppet-master-api-version STRING
|
Puppet Master API version (2 for Puppet 3.x, 3 for Puppet 4.x) for the to branch
|
Specify the API version to use for the Puppet Master. This makes it possible to authenticate to a
version 3.x PuppetMaster by specifying the API version as 2, or for a version 4.x PuppetMaster by
specifying API version as 3. (puppet_master_api_version.rb)
|
--to-puppet-master-ssl-ca STRING
|
Full path to CA certificate that signed the Puppet Master certificate for the to branch
|
Specify the CA certificate for Puppet Master. If specified, this will enable SSL verification
that the certificate being presented has been signed by this CA, and that the common name
matches the name you are using to connecting. (puppet_master_ssl_ca.rb)
|
--to-puppet-master-ssl-client-cert STRING
|
Full path to certificate file for SSL client auth to Puppet Master for the to branch
|
Specify the SSL client certificate for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_cert.rb)
|
--to-puppet-master-ssl-client-key STRING
|
Full path to key file for SSL client auth to Puppet Master for the to branch
|
Specify the SSL client key for Puppet Master. This makes it possible to authenticate with a
client certificate keypair to the Puppet Master. (puppet_master_ssl_client_key.rb)
|
--to-puppet-master-timeout STRING
|
Puppet Master catalog retrieval timeout in seconds for the to branch
|
Specify a timeout for retrieving a catalog from a Puppet master / Puppet server.
This timeout is specified in seconds. (puppet_master_timeout.rb)
|
--to-save-catalog STRING
|
Save intermediate catalogs into files for the to branch
|
Allow catalogs to be saved to a file before they are diff'd. (save_catalog.rb)
|
--truncate-details
--no-truncate-details
|
Truncate details with --display-detail-add
|
When using `--display-detail-add` by default the details of any field will be truncated
at 80 characters. Specify `--no-truncate-details` to display the full output. This option
has no effect when `--display-detail-add` is not used. (truncate_details.rb)
|
--validate-references
--no-validate-references
|
References to validate
|
Confirm that each `before`, `require`, `subscribe`, and/or `notify` points to a valid
resource in the catalog. This value should be specified as an array of which of these
parameters are to be checked. (validate_references.rb)
|
## Using these options in API calls
Most of these options can also be used when making calls to the [API](/doc/dev/api.md).
Generally, parameters for the API are named corresponding to the names of the command line parameters, with dashes (`-`) converted to underscores (`_`). For example, the command line option `--hiera-config` is passed to the API as the symbol `:hiera_config`.
Each of the options above has a link to the source file where it is declared, should you wish to review the specific parameter names and data structures that are being set. octocatalog-diff-1.5.4/doc/advanced-bootstrap.md 0000644 0000041 0000041 00000005477 13413744025 021645 0 ustar www-data www-data # Bootstrapping your Puppet checkout
For many implementations of Puppet, an intermediate step is required between checking out code from a repository and having that code be ready to be served via a Puppet Master server. For example, you may need to run `bundler` to install gems or `librarian-puppet` to download Puppet modules. This document will refer to this process -- whatever it may mean for your particular use case -- as *bootstrapping*.
## Bootstrapping with `octocatalog-diff`
Since `octocatalog-diff` integrates closely with your git repository, we provide a mechanism to allow you to perform your bootstrapping between the checkout of the branch and the build of the catalog.
The `--bootstrap-script` option takes a string parameter consisting of either:
- An absolute path, starting with `/`
- A path relative to your Puppet checkout, not starting with `/`
For example, if you have a script named `script/bootstrap.sh` in a subdirectory of your Puppet repository, you could instruct `octocatalog-diff` to use this script for bootstrap by specifying:
```
octocatalog-diff --bootstrap-script script/bootstrap.sh ...
```
If you have your bootstrap script at a known location on the system (not stored in your Puppet repository), you can refer to it with an absolute path.
```
octocatalog-diff --bootstrap-script /etc/puppetlabs/repo-bootstrap.sh ...
```
## Configuring bootstrapping via the configuration file
The [example configuration file](/examples/octocatalog-diff.cfg.rb) contains an example setting for the bootstrap script.
```
# settings[:bootstrap_script] = '/etc/puppetlabs/repo-bootstrap.sh' # Absolute path
# settings[:bootstrap_script] = 'script/bootstrap' # Relative path
```
## Bootstrap environment
When the bootstrap script runs, a limited set of environment variables are passed from the shell running octocatalog-diff. Only these variables are set:
- `HOME`
- `PATH`
- `PWD` (set to the base directory of your Puppet checkout)
- `BASEDIR` (as explicitly set with `--basedir` CLI option or `settings[:basedir]` setting)
If you wish to set additional environment variables for your bootstrap script, you may do so via the `--bootstrap-environment VAR=value` command line flag, or by defining `settings[:bootstrap_environment] = { 'VAR' => 'value' }` in your configuration file.
As an example, consider that your bootstrap script is written in Python, and needs the `PYTHONPATH` variable set to `/usr/local/lib/python-custom`. Even if this environment variable is set when octocatalog-diff is run, it will not be available to the bootstrap script. You may supply it via the command line:
```
octocatalog-diff --bootstrap-environment PYTHONPATH=/usr/local/lib/python-custom ...
```
Or you may specify it in your configuration file:
```
settings[:bootstrap_environment] = {
'PYTHONPATH' => '/usr/local/lib/python-custom'
}
```
octocatalog-diff-1.5.4/doc/requirements.md 0000644 0000041 0000041 00000004416 13413744025 020600 0 ustar www-data www-data # Requirements
To run `octocatalog-diff` you will need these basics:
- An appropriate Puppet version and [corresponding ruby version](https://puppet.com/docs/puppet/5.4/system_requirements.html)
- Puppet 5.x officially supports Ruby 2.4
- Puppet 4.x officially supports Ruby 2.1, but seems to work fine with later versions as well
- Puppet 3.8.7 -- we attempt to maintain compatibility in `octocatalog-diff` to facilitate upgrades even though this version is no longer supported by Puppet
- We don't officially support Puppet 3.8.6 or before
- Mac OS, Linux, or other Unix-line operating system (Windows is not supported)
- Ability to install gems, e.g. with [rbenv](https://github.com/rbenv/rbenv) or [rvm](https://rvm.io/), or root privileges to install into the system Ruby
- Puppet agent for [Linux](https://docs.puppet.com/puppet/latest/reference/install_linux.html) or [Mac OS X](https://docs.puppet.com/puppet/latest/reference/install_osx.html), or installed as a gem
We recommend that you also have the following to get the most out of `octocatalog-diff`, but these are not absolute requirements:
- If your Puppet code stored in a git repository, `octocatalog-diff` can check out branches for you as it does its comparisons. Your git repository can be stored on [GitHub.com](https://github.com/), [GitHub Enterprise](https://enterprise.github.com/home), or similar. If your Puppet code is not stored in a git repository, you can still point the tool at "from" and "to" directories, but you'll have to check them out yourself.
- If you have API access (HTTPS) to PuppetDB, `octocatalog-diff` can retrieve facts automatically and also support [exported resources](https://docs.puppet.com/puppet/latest/reference/lang_exported.html) if you use them. If you are not using PuppetDB or don't have access, the tool can still read facts from YAML files.
- If your site uses an [external node classifier](https://docs.puppet.com/guides/external_nodes.html), `octocatalog-diff` can execute the ENC script as part of its catalog compiles. Depending on how your ENC is designed, this may require network access or credentials to some service. If you are not using an ENC, that's fine. If you have an ENC but don't have the requisite access, depending on your setup the tool could produce unexpected results.
octocatalog-diff-1.5.4/doc/troubleshooting.md 0000644 0000041 0000041 00000005052 13413744025 021301 0 ustar www-data www-data # Troubleshooting
Things not quite working as expected? This section will contain hints to help you get up and running.
### Make sure the tests pass
If you are getting errors from ruby, we'd really like to know if the tests are passing on your platform. Please follow the [installation instructions](/doc/installation.md#installing-from-source) to install octocatalog-diff from source, if you have not already done so. Once the repository is checked out, change into the directory run `rake` to perform the tests.
If you get test failures from a clean checkout of the master branch, please [open an issue](https://github.com/github/octocatalog-diff/issues/new) to let us know.
### Make sure your configuration file is found and error-free
Run the following command to test for the existence and integrity of your configuration file.
```
octocatalog-diff --config-test
```
If you get an error indicating that the file can't be found, or you get errors arising from the content of the file, please review the [configuration instructions](/doc/configuration.md) to make sure you've set things up correctly.
### Run the command in debug mode
Supplying `-d` on the command line, in addition to the node name and any other arguments, will provide a substantial amount of debugging information to the terminal window. If you ultimately end up requesting our help, we will need this debugging output.
Example:
```
octocatalog-diff -d -n SomeNodeName.yourdomain.com
```
### Run only certain components of the command
To perform the bootstrapping and catalog compilation in separate steps, you can run octocatalog-diff with arguments asking it to do only one or the other. This will help you narrow down whether the problem is in the bootstrapping (first command) or catalog compilation (second command).
Be sure you are in the directory where your Puppet code is checked out when you run these commands.
To run just the bootstrapping code (do this within a checkout of your Puppet repository):
```
mkdir /tmp/octo-test
octocatalog-diff -d --bootstrap-then-exit --bootstrapped-from-dir=/tmp/octo-test
```
To run just the catalog compilation code (do this within a checkout of your Puppet repository):
```
octocatalog-diff -d -n SomeNodeName.yourdomain.com -o /tmp/catalog.json --bootstrapped-to-dir=$PWD --catalog-only
```
### Contact us
Still having trouble? Please [open an issue](https://github.com/github/octocatalog-diff/issues/new) and we will do our best to help.
Please follow the provided issue template, which will ask you for certain output that we need to diagnose the problem.
octocatalog-diff-1.5.4/doc/advanced-storeconfigs.md 0000644 0000041 0000041 00000010655 13413744025 022327 0 ustar www-data www-data # Enabling storeconfigs for exported resources in PuppetDB
The "storeconfigs" setting in Puppet is a feature related to [exported resources](https://docs.puppet.com/puppet/latest/reference/lang_exported.html).
It is possible to enable the collection of exported resources when `octocatalog-diff` compiles catalogs, to give the most accurate representation possible of the catalogs before they are compared.
## Usage
When you provide the `--storeconfigs` command line option, or set `settings[:storeconfigs] = true` in the [configuration file](/doc/configuration.md), the following behavior is triggered:
- `octocatalog-diff` will create a `puppetdb.conf` file in its temporary compilation directory, using the [PuppetDB configuration settings](/doc/configuration-puppetdb.md) that you have specified, either as command line parameters or in a configuration file.
- `octocatalog-diff` will install the SSL client certificates you have provided for PuppetDB, if any, in its temporary compilation directory, so that Puppet will pick these up and use them to connect to PuppetDB. This allows SSL client authentication to PuppetDB. (Please note: Puppet *must* connect to PuppetDB over an SSL connection, although not necessarily an authenticated SSL connection.)
- `octocatalog-diff` will create a `routes.yaml` file in its temporary compilation directory so that Puppet does not try to send fact data, resource data, or reports back to PuppetDB. We have done our best to make this connection be "read only" although we do encourage you to set up a separate, read-only port for PuppetDB to ensure this.
## Caveats
- Beware of load this may cause on PuppetDB, especially if you run `octocatalog-diff` simultaneously in a CI environment. At GitHub, we run `octocatalog-diff` distributed across 8 CI nodes, each of which is capable of performing 16 simultaneous catalog compilations. We have noticed performance degradation or outages when a "thundering herd" of 128 catalog compilations hit PuppetDB at the same time, leading us to implement a layer of caching on top of PuppetDB.
- `octocatalog-diff` compiles a "before" and "after" catalog in mostly parallel fashion, but it is possible that the order of operations happens as follows: (a) "before" catalog compiles; (b) something else writes updated data to PuppetDB; (c) "after" catalog compiles. In this case, there can be false differences reported in the output.
## Advanced configuration
This section contains tips on setting up a proxy in front of PuppetDB to control access and/or enable caching. You are not required to do this in order to use `--storeconfigs` but you may find these tips useful if simultaneous runs of `octocatalog-diff` put too much load on your PuppetDB instance.
### Making a read-only PuppetDB port
It is possible to create a read-only endpoint to PuppetDB by setting up a proxy that only allows the desired URLs. This ensures that the Puppet runs cannot submit fact data, resource data, or reports back to PuppetDB from `octocatalog-diff` runs. (As noted previously, we do set up `routes.yaml` to prevent this, but the strategy in this section provides an extra layer of security.)
To allow only the desired traffic, you should configure a port on your proxy that will pass to these URLs only:
- /pdb/query
- /pdb/meta
### Caching
To reduce the impact of a "thundering herd" of simultaneous `octocatalog-diff` runs, you can set up a caching proxy in front of the `/pdb/query` endpoint.
Here is a portion of the nginx configuration that has provided the best balance between performance and accuracy. We have chosen a 1 minute TTL on results, and incorporated the request body into the cache key. You will need to adjust and incorporate this configuration into your own nginx proxy.
```
upstream puppetdb {
server localhost:8080;
}
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pdb_cache:10m max_size=25g inactive=2m;
server {
listen 10.0.0.1:8082;
# Some SSL settings omitted. Configure as per your own needs.
ssl_client_certificate /etc/nginx/ca.crt
ssl_verify_client on;
proxy_cache_key "$scheme$proxy_host$uri$is_args$args|$request_body";
deny all;
location /pdb/query {
proxy_cache pdb_cache;
proxy_ignore_headers Cache-Control;
proxy_cache_valid any 1m;
proxy_pass http://puppetdb;
proxy_redirect off;
add_header X-Cache-Status $upstream_cache_status;
allow all;
}
# Other settings omitted.
}
```
octocatalog-diff-1.5.4/doc/advanced-environments.md 0000644 0000041 0000041 00000006674 13413744025 022357 0 ustar www-data www-data # Environment setup
When building a catalog, the default behavior of `octocatalog-diff` is to:
1. Create a temporary directory
2. Create a symlink from `