diff --git a/REFERENCE.md b/REFERENCE.md new file mode 100644 index 0000000..b5ca980 --- /dev/null +++ b/REFERENCE.md @@ -0,0 +1,252 @@ +# Reference + + + +## Table of Contents + +### Classes + +#### Public Classes + +* [`hitch`](#hitch): Class: hitch =========================== Full description of class hitch here. Parameters ---------- + +#### Private Classes + +* `hitch::config`: == Class hitch::config This class is called from hitch for service config. +* `hitch::install`: == Class hitch::install This class is called from hitch for install. +* `hitch::service`: == Class hitch::service This class is meant to be called from hitch. It ensure the service is running. + +### Defined types + +* [`hitch::domain`](#hitchdomain): == Define hitch::domain This define installs pem files to the config root, and configures them in the hitch config file. The CA certificate + +## Classes + +### `hitch` + +Class: hitch +=========================== + +Full description of class hitch here. + +Parameters +---------- + +#### Parameters + +The following parameters are available in the `hitch` class. + +##### `package_name` + +Data type: `String` + +Package name for installing hitch. + +##### `service_name` + +Data type: `String` + +Service name for the hitch service. + +##### `user` + +Data type: `String` + +User running the service. + +##### `group` + +Data type: `String` + +Group running the service. + +##### `file_owner` + +Data type: `String` + +User owning the configuration files. Defaults to "root". + +##### `dhparams_file` + +Data type: `Stdlib::Absolutepath` + +Path to file for Diffie-Hellman parameters, which are shared +by all domains. + +##### `dhparams_content` + +Data type: `Optional[String]` + +Content for the DH parameter file. If unset, DH parameters will +be generated on the node, which may take a long time. + +##### `config_root` + +Data type: `Stdlib::Absolutepath` + +Configuration root directory. Default: /etc/hitch/ + +##### `purge_config_root` + +Data type: `Boolean` + +If true, will delete all unmanaged files from the config_root. +Defaults to false. + +##### `frontend` + +Data type: `Variant[String, Array]` + +The listening frontend(s) for hitch. + +##### `manage_repo` + +Data type: `Boolean` + +If true, install the EPEL repository on RedHat OS family. + +##### `config_file` + +Data type: `Stdlib::Absolutepath` + + + +##### `backend` + +Data type: `String` + + + +##### `write_proxy_v2` + +Data type: `Enum['on', 'off']` + + + +##### `ciphers` + +Data type: `String` + + + +##### `domains` + +Data type: `Optional[Hash]` + + + +##### `workers` + +Data type: `Variant[Integer, Enum['auto']]` + + + +##### `prefer_server_ciphers` + +Data type: `Enum['on','off']` + + + +##### `alpn_protos` + +Data type: `Optional[String]` + + + +##### `tls_protos` + +Data type: `Optional[String]` + + + +## Defined types + +### `hitch::domain` + +== Define hitch::domain + +This define installs pem files to the config root, and configures +them in the hitch config file. + +The CA certificate (if present), server certificate, key and DH +parameters are concatenated, and placed in the hitch configuration. + +You can specify cacert, cert and key with either _content or _source +suffix. + +Parameters: + +#### Parameters + +The following parameters are available in the `hitch::domain` defined type. + +##### `ensure` + +Data type: `Enum['present', 'absent']` + +The desired state of the hitch domain. Default is 'present'. + +Default value: `present` + +##### `default` + +Data type: `Boolean` + +If there are multiple domains, set this to true to make this the +default domain used by hitch. If there is only one domain, it +will be the default domain no matter what you set here. Defaults +to false. + +Default value: ``false`` + +##### `cacert_content` + +Data type: `Optional[String]` + +A PEM encoded CA certificate. + +Default value: ``undef`` + +##### `cacert_source` + +Data type: `Optional[Stdlib::Filesource]` + +Path to a PEM encoded CA certificate. + +Default value: ``undef`` + +##### `cert_content` + +Data type: `Optional[String]` + +A PEM encoded certificate. This must be a certificate matching the +key. + +Default value: ``undef`` + +##### `cert_source` + +Data type: `Optional[Stdlib::Filesource]` + +Path to a PEM encoded certificate. This must be a certificate +matching the key. + +Default value: ``undef`` + +##### `key_content` + +Data type: `Optional[String]` + +A PEM encoded key. This must be a key matching the certificate. + +Default value: ``undef`` + +##### `key_source` + +Data type: `Optional[Stdlib::Filesource]` + +Path to a PEM encoded key. This must be a key matching the +certificate. + +Default value: ``undef`` + diff --git a/manifests/install.pp b/manifests/install.pp index 57c7bc5..45cfd65 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,20 +1,21 @@ # == Class hitch::install # # This class is called from hitch for install. # +# @api private class hitch::install ( String $package, Boolean $manage_repo, ) { if $manage_repo { if $facts['os']['family'] == 'RedHat' { ensure_resource('package', 'epel-release', { 'ensure' => 'present' }) Package['epel-release'] -> Package[$package] } } package { $package: ensure => present, } } diff --git a/manifests/service.pp b/manifests/service.pp index f67c1e0..34f1fa4 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -1,22 +1,23 @@ # == Class hitch::service # # This class is meant to be called from hitch. # It ensure the service is running. # +# @api private class hitch::service ( String $service_name, ) { service { $service_name: ensure => running, enable => true, hasstatus => true, hasrestart => true, } # configure hitch.service systemd::dropin_file { 'limits.conf': unit => 'hitch.service', content => template('hitch/limits.conf.erb'), } }