adding in docker and configs

This commit is contained in:
christopher.lawrence 2020-03-26 14:56:40 +00:00
parent 6477ed01f5
commit 5f78f7fe04
8 changed files with 47 additions and 18 deletions

View File

@ -46,6 +46,7 @@ mod 'derdanne-nfs', '2.1.2'
mod 'herculesteam-augeasproviders_core', '2.6.0'
mod 'herculesteam-augeasproviders_shellvar', '4.0.0'
mod 'puppetlabs-transition', '0.1.3'
mod 'puppetlabs-docker', '3.9.1'
# Modules from Git
# Examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples

View File

@ -1,3 +1,3 @@
---
profile::puppetserver::authority: true
profile::puppetserver::authority::validity: 7200
profile::puppetserver::authority::validity: '7200'

View File

@ -36,6 +36,19 @@ node 'puppet' {
}
node 'peadm-03.pe' {
include profile::tools::docker_install
include profile::tools::nfs_mount
}
node 'agent-02' {
include profile::tools::nfs_mount
}
node 'peadm-04.pe' {
include profile::metrics_dashboard

View File

@ -7,13 +7,19 @@ Optional[Array] $puppetdb_list = ['peadm-01.pe'],
Optional[Array] $postgres_host_list = ['peadm-01.pe'],
) {
class { 'puppet_metrics_dashboard':
add_dashboard_examples => $dashboard_examples,
overwrite_dashboards => $overwrite_dashboards,
master_list => $master_list,
puppetdb_list => $puppetdb_list,
postgres_host_list => $postgres_host_list,
}
class { 'docker':
version => 'latest',
}
class {'docker::compose':
version => 'latest',
}
}

View File

@ -1,7 +1,6 @@
class profile::puppetserver (
Boolean $puppetserver = true,
Boolean $authority = false,
Boolean $metrics_server = false,
Boolean $nfs_export = true,
) {
if $puppetserver {
@ -10,11 +9,6 @@ class profile::puppetserver (
if $authority {
class { '::profile::puppetserver::authority': }
}
if $metrics_server {
include puppet_metrics_collector
include puppet_metrics_collector::system
include puppet_metrics_dashboard::profile::master::postgres_access
}
if $nfs_export {
class { '::profile::puppetserver::nfs_export': }
}

View File

@ -32,12 +32,12 @@ class profile::puppetserver::bootstrap {
mode => '0750',
}
pe_node_group { 'puppetmaster-dashboard':
ensure => 'present',
classes => {'puppet_metrics_dashboard::profile::master::postgres_access' => { }},
description => 'Puppetmaster Dashboard workaround group',
environment => 'production',
parent => 'All Nodes',
rule => ['or', ['=', 'name', $facts['puppet_master_server']]],
}
# pe_node_group { 'puppetmaster-dashboard':
# ensure => 'present',
# classes => {'puppet_metrics_dashboard::profile::master::postgres_access' => { }},
# description => 'Puppetmaster Dashboard workaround group',
# environment => 'production',
# parent => 'All Nodes',
# rule => ['or', ['=', 'name', $facts['puppet_master_server']]],
# }
}

View File

@ -0,0 +1,15 @@
class profile::tools::docker_install (
$docker_version = '19.03',
$compose_version = '1.24',
) {
class { 'docker':
ensure => present,
version => '$docker_version',
}
class {'docker::compose':
ensure => present,
version => '$compose_version',
}
}

View File

@ -1,5 +1,5 @@
class profile::tools::nfs_mount (
$server = 'peadm-01.pe',
$server = 'puppet',
) {
class { '::nfs':
server_enabled => false,