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-3734) Switch to Operational Dashboards #84

Merged
merged 3 commits into from
Oct 20, 2022
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
8 changes: 6 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],
Expand Down
16 changes: 6 additions & 10 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
fixtures:
forge_modules:
stdlib: "puppetlabs/stdlib"
concat: "puppetlabs/concat"
postgresql: "puppetlabs/postgresql"
puppetdb: "puppetlabs/puppetdb"
puppet_metrics_dashboard:
repo: "puppetlabs/puppet_metrics_dashboard"
ref: "2.4.0"
puppet_metrics_collector: "puppetlabs/puppet_metrics_collector"
puppet_metrics_dashboard: "puppetlabs/puppet_operational_dashboards"
nfs: "derdanne/nfs"
yumrepo: "puppetlabs/yumrepo_core"
grafana: "puppet/grafana"
telegraf:
repo: "puppet/telegraf"
ref: "3.1.0"
puppetserver_gem: "puppetlabs/puppetserver_gem"
telegraf: "puppet/telegraf"
influxdb: "puppetlabs/influxdb"
concat: "puppetlabs/concat"
transition: "puppetlabs/transition"
apt: "puppetlabs/apt"
repositories:
facts: 'https://github.com/puppetlabs/puppetlabs-facts'
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent'
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.4'
TargetRubyVersion: '2.5'
Include:
- "**/*.rb"
Exclude:
Expand Down
35 changes: 20 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,29 @@ def location_for(place_or_version, fake_version = nil)
end
end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "toml-rb", require: false
gem "github_changelog_generator", require: false
gem "puppet_litmus", require: false, git: 'https://github.com/puppetlabs/puppet_litmus', ref: 'main' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.5.0')
gem "json", '~> 2.0', require: false
gem "voxpupuli-puppet-lint-plugins", '~> 3.0', require: false
gem "facterdb", '~> 1.18', require: false
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
gem "puppetlabs_spec_helper", '>= 3.0.0', '< 5.0.0', require: false
gem "rspec-puppet-facts", '~> 2.0', require: false
gem "codecov", '~> 0.2', require: false
gem "dependency_checker", '~> 0.2', require: false
gem "parallel_tests", '~> 3.4', require: false
gem "pry", '~> 0.10', require: false
gem "simplecov-console", '~> 0.5', require: false
gem "puppet-debugger", '~> 1.0', require: false
gem "rubocop", '= 1.6.1', require: false
gem "rubocop-performance", '= 1.9.1', require: false
gem "rubocop-rspec", '= 2.0.1', require: false
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "toml-rb", require: false
gem "github_changelog_generator", require: false
gem "puppet_litmus", require: false, git: 'https://github.com/puppetlabs/puppet_litmus', ref: 'main' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.5.0')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "serverspec", '~> 2.41', require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,28 @@

#### Table of Contents

1. [RSAN is currently part of a Beta Program](#rsan-is-currently-part-of-a-beta-program)
2. [Description](#description)
3. [Setup - The basics of getting started with rsan](#setup)
* [What RSAN modifies in your PE Installation](#what-rsan-modifies-in-your-pe-installation)
* [Setup requirements](#setup-requirements)
* [Beginning with rsan](#beginning-with-rsan)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)
- [rsan](#rsan)
- [Table of Contents](#table-of-contents)
- [RSAN is currently part of a Beta Program](#rsan-is-currently-part-of-a-beta-program)
- [Description](#description)
- [Setup](#setup)
- [What RSAN modifies in your PE Installation](#what-rsan-modifies-in-your-pe-installation)
- [Setup Requirements](#setup-requirements)
- [Module Dependencies](#module-dependencies)
- [Minimum Hardware requirements](#minimum-hardware-requirements)
- [OS Restrictions](#os-restrictions)
- [Beginning with rsan](#beginning-with-rsan)
- [Usage](#usage)
- [Live Telemetry Display](#live-telemetry-display)
- [Infrastructure node file and log access](#infrastructure-node-file-and-log-access)
- [Optional Configuration](#optional-configuration)
- [PE Client tools](#pe-client-tools)
- [Creating Support User](#creating-support-user)
- [Puppet Enterprise Database Access](#puppet-enterprise-database-access)
- [Uninstallation](#uninstallation)
- [Limitations](#limitations)
- [Known Issues](#known-issues)
- [Contributions](#contributions)


## RSAN is currently part of a Beta Program
Expand Down Expand Up @@ -48,16 +61,17 @@ Software required for the proper functioning of the RSAN will be deployed on the

- derdanne/nfs (>= 2.1.5)
- puppetlabs/postgresql (>= 6.6.0)
- puppetlabs/puppet_metrics_dashboard (>= 2.3.0)
- puppetlabs/stdlib (>= 4.5.0 < 8.1.0)
- puppetlabs/puppet_operational_dashboards (>= 1.7.0)
- puppetlabs/influxdb (>=1.3.1)
- puppetlabs/stdlib (>= 4.5.0 < 9.0.0)
- puppetlabs/concat (>= 1.1.2 < 7.0.0)
- puppetlabs/transition (>= 0.1.0 < 1.0.0)
- herculesteam/augeasproviders_core (>= 2.1.5 < 4.0.0)
- herculesteam/augeasproviders_shellvar (>= 1.2.0 < 5.0.0)
- puppetlabs/apt (>= 2.0.0 < 8.0.0)
- puppet-grafana (>= 3.0.0 < 10.0.0)
- puppet-telegraf (>= 2.0.0 < 5.0.0)
- puppetlabs-apt (>= 4.3.0 < 8.0.0)
- puppet-grafana (>= 3.0.0 < 11.0.0)
- puppet-telegraf (>= 2.0.0 < 6.0.0)
- puppetlabs-apt (>= 4.3.0 < 9.0.0)
- puppetlabs-inifile (>= 2.0.0 < 5.0.0)
- puppetlabs-puppetserver_gem (>= 1.1.1 < 3.0.0)

Expand Down Expand Up @@ -88,15 +102,15 @@ Infrastructure Agent(s)->RSAN Agent->Infrastructure Agent(s)->RSAN Agent
The following outlines the main features of RSAN and how to consume them
### Live Telemetry Display

The Rsan node will host an instance of the [Puppet Metrics Dashboard](https://forge.puppet.com/modules/puppetlabs/puppet_metrics_dashboard)
The Rsan node will host an instance of the [Puppet Operational Dashboard](https://forge.puppet.com/modules/puppetlabs/puppet_operational_dashboards)

The Dashboard can be accessed on

**URL:** http://<RSAN-ip\>:3000\
**User:** admin\
**Password:** admin

For advanced configuration and documentation please see [Puppet Metrics Dashboard](https://forge.puppet.com/modules/puppetlabs/puppet_metrics_dashboard)
For advanced configuration and documentation please see [Puppet Operational Dashboard](https://forge.puppet.com/modules/puppetlabs/puppet_operational_dashboards)

### Infrastructure node file and log access

Expand Down
7 changes: 2 additions & 5 deletions functions/get_postgres_hosts.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 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] {
$postgres_hosts =
puppetdb_query('resources[certname] {
type = "Class" and
title = "Pe_postgresql::Server::Install" and
nodes {
Expand All @@ -12,7 +12,4 @@ function rsan::get_postgres_hosts() {
}').map |$data| { $data['certname'] }

pe_sort($postgres_hosts)

}


6 changes: 3 additions & 3 deletions functions/get_puppet_servers.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# @return [Array] List of Fqdn of nodes with the Master profile
function rsan::get_puppet_servers() {
$puppet_servers =
puppetdb_query('nodes[certname] {
puppetdb_query('nodes[certname] {
resources {
type = "Class" and
title = "Puppet_enterprise::Profile::Master"
} and deactivated is null and expired is null }').map |$node| {
$node['certname']
}
$node['certname']
}
pe_sort($puppet_servers)
}
3 changes: 1 addition & 2 deletions functions/get_puppetdb_hosts.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

# @return [Array] List of node running Puppetdb
function rsan::get_puppetdb_hosts() {
if $settings::storeconfigs {
$puppetdb_hosts =
puppetdb_query('resources[certname] {
puppetdb_query('resources[certname] {
type = "Class" and
title = "Puppet_enterprise::Profile::Puppetdb" and
nodes {
Expand Down
2 changes: 1 addition & 1 deletion functions/get_rsan_importer_ips.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
function rsan::get_rsan_importer_ips() {
if $settings::storeconfigs {
$rsan_importer_ips =
puppetdb_query('facts[value]{
puppetdb_query('facts[value]{
name = "ipaddress" and
certname in resources[certname] {
type = "Class" and
Expand Down