diff --git a/doc/_index.html b/doc/_index.html index 6b8c1d8..000fb3b 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -103,6 +103,16 @@ +
# File 'manifests/params.pp', line 64 @@ -1307,10 +1331,10 @@ class puppet_cd::params ( ) { # facts - $fqdn = $facts['networking']['fqdn'] - $domain = $facts['networking']['domain'] - $os_name = $facts['os']['name'] - $os_release = $facts['os']['release']['major'] + $fqdn = $facts['networking']['fqdn'] + $domain = $facts['networking']['domain'] + $os_name = $facts['os']['name'] + $os_release = $facts['os']['release']['major'] # directories ## puppet @@ -1324,10 +1348,12 @@ class puppet_cd::params ( $pt_rundir_master = '/var/run/puppetlabs/puppetserver' $pt_vardir = '/opt/puppetlabs/puppet/cache' $pt_vardir_master = '/opt/puppetlabs/server/data/puppetserver' - ## r10k $pt_r10k_dir = "${pt_main_dir}/r10k" $pt_r10k_webhook_dir = '/etc/r10k-webhook' +## puppetdb + $pt_puppetdb_dir = '/etc/puppetlabs/puppetdb' + $pt_puppetdb_conf_dir = "${pt_puppetdb_dir}/conf.d" # files ## puppet @@ -1340,13 +1366,31 @@ class puppet_cd::params ( $pt_routes_erb = 'puppet_cd/puppetdb/routes.yaml.erb' $pt_node_rb_file = "${pt_puppetdir}/node.rb" $pt_node_rb_erb = 'puppet_cd/puppetdb/node.rb.erb' - ## r10k $pt_r10k_file = "${pt_r10k_dir}/r10k.yaml" $pt_r10k_erb = 'puppet_cd/r10k/r10k.yaml.erb' $pt_webhook_link = 'ln -sf /usr/local/share/gems/gems/r10k_gitlab_webhook-0.1.3/bin/r10k_gitlab_webhook /usr/bin/' $pt_webhook_service_file = '/etc/systemd/system/r10k_gitlab_webhook.service' $pt_webhook_service_erb = 'puppet_cd/r10k/r10k_webhook_service.erb' +## puppetdb + $pt_bootstrap_conf_file = "${pt_puppetdb_dir}/bootstrap.cfg" + $pt_bootstrap_conf_erb = 'puppet_cd/puppetdb/bootstrap.cfg.erb' + $pt_logback_conf_file = "${pt_puppetdb_dir}/logback.xml" + $pt_logback_conf_erb = 'puppet_cd/puppetdb/logback.xml.erb' + $pt_logging_conf_file = "${pt_puppetdb_dir}/request-logging.xml" + $pt_logging_conf_erb = 'puppet_cd/puppetdb/request_logging.xml.erb' + $pt_auth_conf_file = "${pt_puppetdb_conf_dir}/auth.conf" + $pt_auth_conf_erb = 'puppet_cd/puppetdb/auth.conf.erb' + $pt_config_ini_file = "${pt_puppetdb_conf_dir}/config.ini" + $pt_config_ini_erb = 'puppet_cd/puppetdb/config.ini.erb' + $pt_db_ini_file = "${pt_puppetdb_conf_dir}/database.ini" + $pt_db_ini_erb = 'puppet_cd/puppetdb/database.ini.erb' + $pt_jetty_ini_file = "${pt_puppetdb_conf_dir}/jetty.ini" + $pt_jetty_ini_erb = 'puppet_cd/puppetdb/jetty.ini.erb' + $pt_repl_ini_file = "${pt_puppetdb_conf_dir}/repl.ini" + $pt_repl_ini_erb = 'puppet_cd/puppetdb/repl.ini.erb' + $pt_service_conf_file = '/usr/lib/systemd/system/puppetdb.service' + $pt_service_conf_erb = 'puppet_cd/puppetdb/service.conf.erb' # service $pt_server_service = 'puppetserver' diff --git a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Adirs.html b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Adirs.html index 8b56273..31a2ebd 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Adirs.html +++ b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Adirs.html @@ -77,7 +77,7 @@Summary
- Class manages puppetdb directories + Class manages directories for the puppetdb sectionOverview
@@ -129,37 +129,7 @@ 31 32 33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 +34
# File 'manifests/puppetdb/dirs.pp', line 6 @@ -167,58 +137,28 @@ class puppet_cd::puppetdb::dirs ( ) inherits puppet_cd::params { - if ($fqdn == $pt_db_fqdn) and ($pt_use_puppetdb == true) { + if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) { require puppet_cd::main::install - # main directory - file { $pt_puppetdb_main: + file { $pt_puppetdb_dir: ensure => directory, - path => $pt_puppetdb_main, - owner => $pt_db_user, - group => $pt_db_user, + owner => 'puppetdb', + group => 'puppetdb', mode => '0750', selrange => s0, selrole => object_r, - seltype => etc_t, + seltype => puppet_etc_t, seluser => system_u, } - # conf.d directory - file { $pt_puppetdb_conf_d: + file { $pt_puppetdb_conf_dir: ensure => directory, - path => $pt_puppetdb_conf_d, - owner => $pt_db_user, - group => $pt_db_user, - mode => '0750', + owner => 'root', + group => 'root', + mode => '0755', selrange => s0, selrole => object_r, - seltype => etc_t, - seluser => system_u, - } - - # ssl directory - file { $pt_puppetdb_ssl: - ensure => directory, - path => $pt_puppetdb_ssl, - owner => $pt_db_user, - group => $pt_db_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => etc_t, - seluser => system_u, - } - - # log dir - file { $pt_puppetdb_log: - ensure => directory, - path => $pt_puppetdb_log, - owner => $pt_db_user, - group => $pt_db_user, - mode => '0700', - selrange => s0, - selrole => object_r, - seltype => var_log_t, + seltype => puppet_etc_t, seluser => system_u, } } diff --git a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Afiles.html b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Afiles.html index cbb07c9..e2cd136 100644 --- a/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Afiles.html +++ b/doc/puppet_classes/puppet_cd_3A_3Apuppetdb_3A_3Afiles.html @@ -77,7 +77,7 @@Summary
- Class manages puppetdb files + Class manages config files for the puppetdb sectionOverview
@@ -212,7 +212,21 @@ 114 115 116 -117 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131
# File 'manifests/puppetdb/files.pp', line 6
@@ -220,13 +234,12 @@
class puppet_cd::puppetdb::files (
) inherits puppet_cd::params {
- if ($fqdn == $pt_db_fqdn) and ($pt_use_puppetdb == true) {
+ if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
require puppet_cd::puppetdb::dirs
# bootstrap.cfg
- file { $pt_bootstrap_conf:
+ file { $pt_bootstrap_conf_file:
ensure => file,
- path => $pt_bootstrap_conf,
owner => 'root',
group => 'root',
mode => '0644',
@@ -234,29 +247,12 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_bootstrap_erb),
+ content => template($pt_bootstrap_conf_erb),
notify => Service[$pt_db_service],
}
-
- # requestlogging.xml
- file { $pt_request_logging_conf:
- ensure => file,
- path => $pt_request_logging_conf,
- owner => 'root',
- group => 'root',
- mode => '0644',
- selrange => s0,
- selrole => object_r,
- seltype => puppet_etc_t,
- seluser => system_u,
- content => template($pt_request_logging_erb),
- notify => Service[$pt_db_service],
- }
-
# logback.xml
- file { $pt_logback_conf:
+ file { $pt_logback_conf_file:
ensure => file,
- path => $pt_logback_conf,
owner => 'root',
group => 'root',
mode => '0644',
@@ -264,14 +260,52 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_logback_erb),
+ content => template($pt_logback_conf_erb),
+ notify => Service[$pt_db_service],
+ }
+ # request-logging.xml
+ file { $pt_logging_conf_file:
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => puppet_etc_t,
+ seluser => system_u,
+ content => template($pt_logging_conf_erb),
+ notify => Service[$pt_db_service],
+ }
+ # service config
+ file { $pt_service_conf_file:
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => systemd_unit_file_t,
+ seluser => system_u,
+ content => template($pt_service_conf_erb),
+ notify => Service[$pt_db_service],
+ }
+ # conf.d files
+ ## auth.conf
+ file { $pt_auth_conf_file:
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => puppet_etc_t,
+ seluser => system_u,
+ content => template($pt_auth_conf_erb),
notify => Service[$pt_db_service],
}
-
# config.ini
- file { $pt_puppetdb_config_ini:
+ file { $pt_config_ini_file:
ensure => file,
- path => $pt_puppetdb_config_ini,
owner => 'root',
group => 'root',
mode => '0644',
@@ -279,14 +313,12 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_puppetdb_config_erb),
+ content => template($pt_config_ini_erb),
notify => Service[$pt_db_service],
}
-
# database.ini
- file { $pt_puppetdb_database_ini:
+ file { $pt_db_ini_file:
ensure => file,
- path => $pt_puppetdb_database_ini,
owner => 'root',
group => 'root',
mode => '0644',
@@ -294,14 +326,12 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_puppetdb_database_erb),
+ content => template($pt_db_ini_erb),
notify => Service[$pt_db_service],
}
-
# jetty.ini
- file { $pt_puppetdb_jetty_ini :
+ file { $pt_jetty_ini_file:
ensure => file,
- path => $pt_puppetdb_jetty_ini ,
owner => 'root',
group => 'root',
mode => '0644',
@@ -309,14 +339,12 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_puppetdb_jetty_erb),
+ content => template($pt_jetty_ini_erb),
notify => Service[$pt_db_service],
}
-
# repl.ini
- file { $pt_puppetdb_repl_ini:
+ file { $pt_repl_ini_file:
ensure => file,
- path => $pt_puppetdb_repl_ini,
owner => 'root',
group => 'root',
mode => '0644',
@@ -324,7 +352,7 @@ class puppet_cd::puppetdb::files (
selrole => object_r,
seltype => puppet_etc_t,
seluser => system_u,
- content => template($pt_puppetdb_repl_erb),
+ content => template($pt_repl_ini_erb),
notify => Service[$pt_db_service],
}
}
diff --git a/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
index c1af0f2..7b90692 100644
--- a/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html
@@ -147,7 +147,8 @@
49
50
51
-52
+52
+53
# File 'manifests/server/service.pp', line 6
@@ -190,6 +191,7 @@ class puppet_cd::server::service (
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
require puppet_cd::firewall::iptables
+ require puppet_cd::puppetdb::files
service { $pt_db_service:
ensure => running,