Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

More parameters to make bacula::cient working on Solaris #7

Merged
merged 2 commits into from

4 participants

@pesimon

Please have a look, to the following changes

  • make config template a paramenter
  • default to linux package names and paths

    Example usage on solaris with CSWbaclua package

    class { 'bacula::client':
    director_server => 'director',
    director_password => 'xxxxxxx',
    client_package => 'CSWbaculaclient',
    package_provider => "pkgutil",
    client_conf => "/opt/csw/etc/bacula/bacula-fd.conf",
    client_service => "cswbacula",
    working_dir => "/opt/csw/var/bacula/working",
    pid_dir => "/opt/csw/var/bacula/run"
    }

Peter Simon Add Solaris support for bacula client
   - make config template a paramenter
   - default to linux package names and paths

    Example usage on solaris with CSWbaclua package

      class { 'bacula::client':
         director_server   => 'director',
         director_password => 'xxxxxxx',
         client_package    => 'CSWbaculaclient',
         package_provider  => "pkgutil",
         client_conf       => "/opt/csw/etc/bacula/bacula-fd.conf",
         client_service    => "cswbacula",
         working_dir       => "/opt/csw/var/bacula/working",
         pid_dir           => "/opt/csw/var/bacula/run"
      }
36e5c32
@ccaum
Owner

This is pretty awesome. Thanks. Can you update the parameters list in the README and maybe add a section about how to manage it in Solaris?

@pesimon

Sure. Do you think it'd make sense to introduce top scope equivalents to all new bacula::client parameters?

@ccaum
Owner

@pesimon Sorry I've been lagging on this. It's been fairly busy around here. Yes, I think all parameters should have top scope equivalents. My goal is to keep this module configurable from the top scop/ENC level as well as class parameters. I'm also trying to stick to having a single point of entry, being the bacula class. This makes delegation to sub-classes easier and makes things like validation easier.

@ccaum
Owner

@justinellison Can you take a look at this and merge if it works?

@justinellison
Collaborator

We've phased out all of our Solaris hosts, so I can't test for the positive. However, so long as it doesn't break the Linux path, I'll take @pesimon word for it that it does work on Solaris. Give us a week or two to get the bandwidth to get our bacula project moving again so we can test it, then I'll merge it.

@mhaskel mhaskel merged commit 3622d01 into puppetlabs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 1, 2012
  1. Add Solaris support for bacula client

    Peter Simon authored
       - make config template a paramenter
       - default to linux package names and paths
    
        Example usage on solaris with CSWbaclua package
    
          class { 'bacula::client':
             director_server   => 'director',
             director_password => 'xxxxxxx',
             client_package    => 'CSWbaculaclient',
             package_provider  => "pkgutil",
             client_conf       => "/opt/csw/etc/bacula/bacula-fd.conf",
             client_service    => "cswbacula",
             working_dir       => "/opt/csw/var/bacula/working",
             pid_dir           => "/opt/csw/var/bacula/run"
          }
Commits on Feb 17, 2012
  1. add documentation howto use bacula::client on Solaris

    Peter Simon authored
This page is out of date. Refresh to see the latest.
Showing with 57 additions and 8 deletions.
  1. +30 −0 README.md
  2. +25 −6 manifests/client.pp
  3. +2 −2 templates/bacula-fd.conf.erb
View
30 README.md
@@ -115,6 +115,16 @@ The following lists all the class parameters the bacula class accepts as well as
use_console bacula_use_console Whether to configure a console resource on the director
console_password bacula_console_password The password to use for the console resource on the director
+Additionally the following (uncommon) parameters can be passed to the bacula::client class:
+
+ client_conf - File name of bacula-fd configuration file
+ client_conf_template - Template for bacula-fd configuration file
+ client_service - The name of bacula-fd service
+ package_provider - Package provider (for solaris only)
+ pid_dir - The bacula-fd pid dir
+ working_dir - The bacula-fd working dir
+
+
CLIENTS
=======
@@ -271,6 +281,26 @@ stored the custom template.
[Using Puppet Templates](http://docs.puppetlabs.com/guides/templating.html)
+SOLARIS SUPPORT
+===============
+
+Currently this module only configures the Bacula client on Solaris. Bacula Directors and Storage Daemon are not supported yet.
+
+To use bacula::client with the Solaris CSWbaculaclient package set the following class paramenters:
+
+```puppet
+ class { 'bacula::client':
+ director_server => 'bacula.domain.com',
+ director_password => 'xxxxxxx',
+ client_package => 'CSWbaculaclient',
+ package_provider => "pkgutil",
+ client_conf => "/opt/csw/etc/bacula/bacula-fd.conf",
+ client_service => "cswbacula",
+ working_dir => "/opt/csw/var/bacula/working",
+ pid_dir => "/opt/csw/var/bacula/run"
+ }
+```
+
TODO
====
View
31 manifests/client.pp
@@ -9,6 +9,18 @@
# The director's password
# $client_package:
# The name of the package to install the bacula-fd service.
+# $client_conf:
+# File name of bacula-fd configuration file
+# $client_conf_template:
+# Template for bacula-fd configuration file
+# $client_service:
+# The name of bacula-fd service
+# $package_provider:
+# Package provider (for solaris only)
+# $pid_dir:
+# The bacula-fd pid dir
+# $working_dir:
+# The bacula-fd working dir
#
# Actions:
# - Enforce the $client_package package be installed
@@ -23,9 +35,15 @@
# client_package => 'bacula-client',
# }
class bacula::client(
- $director_server,
+ $client_conf = "/etc/bacula/bacula-fd.conf",
+ $client_conf_template = "bacula/bacula-fd.conf.erb",
+ $client_package = "bacula-client",
+ $client_service = "bacula-fd",
$director_password,
- $client_package
+ $director_server,
+ $package_provider = undef,
+ $pid_dir = "/var/run/bacula",
+ $working_dir = "/var/lib/bacula"
) {
$director_name_array = split($director_server, '[.]')
@@ -33,16 +51,17 @@
package { $client_package:
ensure => installed,
+ provider => $package_provider
}
- file { '/etc/bacula/bacula-fd.conf':
+ file { $client_conf:
ensure => file,
- content => template('bacula/bacula-fd.conf.erb'),
- notify => Service['bacula-fd'],
+ content => template($client_conf_template),
+ notify => Service[$client_service],
require => Package[$client_package],
}
- service { 'bacula-fd':
+ service { $client_service:
ensure => running,
enable => true,
require => Package[$client_package],
View
4 templates/bacula-fd.conf.erb
@@ -13,8 +13,8 @@ Director {
# Now configure the actual File Daemon
FileDaemon {
Name = "<%= hostname.split('.').first -%>"
- Working Directory = /var/lib/bacula
- PID Directory = /var/run/bacula
+ Working Directory = <%= working_dir %>
+ PID Directory = <%= pid_dir %>
Maximum Concurrent Jobs = 3
}
Something went wrong with that request. Please try again.