Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SUP-2386) updating documentation and dependancies [SUP-2386] #45

Merged
merged 1 commit into from Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
2.6.0
2.7.2
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -30,6 +30,7 @@ group :development do
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "toml-rb", require: false
gem "rspec-puppet-facts", '>= 2.0.1', require: false
gem 'aws-partitions', '>= 1.446.0'
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
77 changes: 45 additions & 32 deletions REFERENCE.md
Expand Up @@ -6,49 +6,63 @@

### Classes

* [`rsan::exporter`](#rsanexporter)
* [`rsan::exporter`](#rsanexporter): Sets up target nodes with nessary services and access for RSAN When Applied to the Infrastruture Agent Node group, Will dynamically configure
* [`rsan::importer`](#rsanimporter): Class to consume the resources provided by the exporter class. when applied to a node, all tooling agttributed to RSAN will be set up
* [`rsan::remove_exporter`](#rsanremove_exporter): A short summary of the purpose of this class
* [`rsan::remove_exporter`](#rsanremove_exporter): disables and removes services and components enabled by the exporter class

### Functions

* [`rsan::get_postgres_hosts`](#rsanget_postgres_hosts)
* [`rsan::get_puppet_servers`](#rsanget_puppet_servers)
* [`rsan::get_postgres_hosts`](#rsanget_postgres_hosts): Function to provide a list of pe_postgresql hosts to RSAN
* [`rsan::get_puppet_servers`](#rsanget_puppet_servers): Function to return a list of components running pe_puppetserver to RSAN
* [`rsan::get_puppetdb_hosts`](#rsanget_puppetdb_hosts)
* [`rsan::get_rsan_importer_ips`](#rsanget_rsan_importer_ips)
* [`rsan::license_uuid`](#rsanlicense_uuid): return the uuid from a Puppet license file supplied in $content If no $content parameter specified, tries to read the license file from /etc/
* [`rsan::license_uuid`](#rsanlicense_uuid): If no $content parameter specified, tries to read the license file from /etc/puppetlabs/license.key

### Tasks

* [`supportuser`](#supportuser): Creates pesupport user and PE Support Role, generated password should be shared with Puppet Enterprise Support personnel

## Classes

### `rsan::exporter`
### <a name="rsanexporter"></a>`rsan::exporter`

The rsan::exporter class.
Sets up target nodes with nessary services and access for RSAN
When Applied to the Infrastruture Agent Node group,
Will dynamically configure all matching nodes to allow access to key elements of Puppet Enterprise to the RSAN node

#### Examples

#####

```puppet
include rsan::exporter
```

#### Parameters

The following parameters are available in the `rsan::exporter` class.
The following parameters are available in the `rsan::exporter` class:

##### `rsan_importer_ips`
* [`rsan_importer_ips`](#rsan_importer_ips)
* [`rsan_host`](#rsan_host)

Data type: `Array`
##### <a name="rsan_importer_ips"></a>`rsan_importer_ips`

Data type: `Array`

An array of rsan ip addresses
Defaults to the output of a PuppetDB query

Default value: `rsan::get_rsan_importer_ips()`

##### `rsan_host`
##### <a name="rsan_host"></a>`rsan_host`

Data type: `Optional[String]`


The certname of the rsan node

Default value: ``undef``

### `rsan::importer`
### <a name="rsanimporter"></a>`rsan::importer`

Class to consume the resources provided by the exporter class.
when applied to a node, all tooling agttributed to RSAN will be set up
Expand All @@ -61,9 +75,9 @@ when applied to a node, all tooling agttributed to RSAN will be set up
include rsan::importer
```

### `rsan::remove_exporter`
### <a name="rsanremove_exporter"></a>`rsan::remove_exporter`

A description of what this class does
In the event RSAN should be uninstalled on all or some of the exporter nodes, this will stop NFS service, and remove the database components if applied to a postgres node

#### Examples

Expand All @@ -75,31 +89,31 @@ include rsan::remove_exporter

## Functions

### `rsan::get_postgres_hosts`
### <a name="rsanget_postgres_hosts"></a>`rsan::get_postgres_hosts`

Type: Puppet Language

The rsan::get_postgres_hosts function.
Function to provide a list of pe_postgresql hosts to RSAN

#### `rsan::get_postgres_hosts()`

The rsan::get_postgres_hosts function.
Function to provide a list of pe_postgresql hosts to RSAN

Returns: `Any`
Returns: `Array` List of FQDN

### `rsan::get_puppet_servers`
### <a name="rsanget_puppet_servers"></a>`rsan::get_puppet_servers`

Type: Puppet Language

The rsan::get_puppet_servers function.
Function to return a list of components running pe_puppetserver to RSAN

#### `rsan::get_puppet_servers()`

The rsan::get_puppet_servers function.
Function to return a list of components running pe_puppetserver to RSAN

Returns: `Any`
Returns: `Array` List of Fqdn of nodes with the Master profile

### `rsan::get_puppetdb_hosts`
### <a name="rsanget_puppetdb_hosts"></a>`rsan::get_puppetdb_hosts`

Type: Puppet Language

Expand All @@ -109,9 +123,9 @@ The rsan::get_puppetdb_hosts function.

The rsan::get_puppetdb_hosts function.

Returns: `Any`
Returns: `Array` List of node running Puppetdb

### `rsan::get_rsan_importer_ips`
### <a name="rsanget_rsan_importer_ips"></a>`rsan::get_rsan_importer_ips`

Type: Puppet Language

Expand All @@ -123,31 +137,30 @@ The rsan::get_rsan_importer_ips function.

Returns: `Array` List of IP addresses for RSAN nodes or an empty array

### `rsan::license_uuid`
### <a name="rsanlicense_uuid"></a>`rsan::license_uuid`

Type: Puppet Language

return the uuid from a Puppet license file supplied in $content
If no $content parameter specified, tries to read the license file
from /etc/puppetlabs/license.key

#### `rsan::license_uuid(Optional[String] $content)`

return the uuid from a Puppet license file supplied in $content
If no $content parameter specified, tries to read the license file
from /etc/puppetlabs/license.key

Returns: `String`
Returns: `String` the uuid from a Puppet license file supplied in $content

##### `content`

Data type: `Optional[String]`


An array of rsan ip addresses
Defaults to the output of a PuppetDB query

## Tasks

### `supportuser`
### <a name="supportuser"></a>`supportuser`

Creates pesupport user and PE Support Role, generated password should be shared with Puppet Enterprise Support personnel

Expand Down
2 changes: 2 additions & 0 deletions functions/get_postgres_hosts.pp
@@ -1,3 +1,5 @@
# Function to provide a list of pe_postgresql hosts to RSAN
# @return [Array] List of FQDN
function rsan::get_postgres_hosts() {
$postgres_hosts =
puppetdb_query('resources[certname] {
Expand Down
2 changes: 2 additions & 0 deletions functions/get_puppet_servers.pp
@@ -1,3 +1,5 @@
# Function to return a list of components running pe_puppetserver to RSAN
# @return [Array] List of Fqdn of nodes with the Master profile
function rsan::get_puppet_servers() {
$puppet_servers =
puppetdb_query('nodes[certname] {
Expand Down
2 changes: 2 additions & 0 deletions functions/get_puppetdb_hosts.pp
@@ -1,3 +1,5 @@

# @return [Array] List of node running Puppetdb
function rsan::get_puppetdb_hosts() {
if $settings::storeconfigs {
$puppetdb_hosts =
Expand Down
5 changes: 4 additions & 1 deletion functions/license_uuid.pp
@@ -1,6 +1,9 @@
# return the uuid from a Puppet license file supplied in $content
# @return [String] the uuid from a Puppet license file supplied in $content
# If no $content parameter specified, tries to read the license file
# from /etc/puppetlabs/license.key
# @param [Optional[String]] content
# An array of rsan ip addresses
# Defaults to the output of a PuppetDB query
function rsan::license_uuid(Optional[String] $content) >> String {
$license_file_path = '/etc/puppetlabs/license.key'
if $content {
Expand Down
10 changes: 4 additions & 6 deletions manifests/exporter.pp
@@ -1,15 +1,13 @@
#
# Sets up target nodes with nessary services and access for RSAN
# When Applied to the Infrastruture Agent Node group,
#Will dynamically configure all matching nodes to allow access to key elements of Puppet Enterprise to the RSAN node
# @param [Array] rsan_ip_list
# Will dynamically configure all matching nodes to allow access to key elements of Puppet Enterprise to the RSAN node
# @param [Array] rsan_importer_ips
# An array of rsan ip addresses
# Defaults to the output of a PuppetDB query
# @param [String] rsan_host
# @param [Optional[String]] rsan_host
# The certname of the rsan node
#
# @example
# include rsan::exporter

class rsan::exporter (
Array $rsan_importer_ips = rsan::get_rsan_importer_ips(),
Optional[String] $rsan_host = undef,
Expand Down
4 changes: 2 additions & 2 deletions manifests/remove_exporter.pp
@@ -1,6 +1,6 @@
# @summary A short summary of the purpose of this class
# @summary disables and removes services and components enabled by the exporter class
#
# A description of what this class does
# In the event RSAN should be uninstalled on all or some of the exporter nodes, this will stop NFS service, and remove the database components if applied to a postgres node
#
# @example
# include rsan::remove_exporter
Expand Down
8 changes: 2 additions & 6 deletions metadata.json
Expand Up @@ -12,10 +12,6 @@
"name": "puppetlabs/postgresql",
"version_requirement": ">= 6.6.0 < 7.0.0"
},
{
"name": "puppetlabs/puppet_metrics_collector",
"version_requirement": ">= 6.1.0 < 7.0.0"
},
{
"name": "puppetlabs/puppet_metrics_dashboard",
"version_requirement": ">= 2.3.0 < 3.0.0"
Expand Down Expand Up @@ -62,10 +58,10 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 6.0.0 < 7.0.0"
"version_requirement": ">= 6.16.0 < 8.0.0"
}
],
"pdk-version": "1.18.1",
"pdk-version": "2.1.0",
"template-url": "https://github.com/puppetlabs/pdk-templates#master",
"template-ref": "remotes/origin/master-0-ga58fd92"
}