baculaweb
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'andeman-baculaweb', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
baculaweb
Table of Contents
- Overview
- Requirements
- Beginning with baculaweb
- Usage
- Reference
- Limitations
- Development
- Release Notes
Overview
This module install and configures the baculaweb a web based reporting and monitoring tool for Bacula.
You can find the baculaweb documention here: https://www.bacula-web.org/
The module only install and configure the webapp itself. You still require a webserver (nginx or apache) with php.
Requirements
- Puppet >= 4.10.0 < 7.0.0
- puppetlabs/stdlib
- puppet/archive
Optional Setup Requirements
Recommended modules for apache + php setup:
The needed requirements for the webserver and for php are documented here:
http://docs.bacula-web.org/en/latest/02_install/requirements.html
Beginning with baculaweb
All parameters for the baculaweb module are contained within the main baculaweb class, so for any function of the module, set the options you want. All configuration parameters can be assigned hiera. The default values are also lookuped up by hiera. See the common usages below for examples.
Usage
Install and enable baculaweb
include baculaweb
Configure bacula catalog databases
To get baculaweb up and running configure at least one bacula catalog database with the paramter catalog_db.
See the following example for the different catalog database types:
class { 'baculaweb':
catalog_db => [
{
'label' => 'EXAMPLE: MySQL backup catalog',
'host' => 'localhost',
'login' => 'bacula',
'password' => 'verystrongpassword',
'db_name' => 'bacula',
'db_type' => 'mysql',
'db_port' => 3306,
},
{
'label' => 'EXAMPLE: PostgreSQL backup catalog',
'host' => 'localhost',
'login' => 'bacula',
'password' => 'verystrongpassword',
'db_name' => 'bacula',
'db_type' => 'mysql',
'db_port' => 3306,
},
{
'label' => 'EXAMPLE: SQLite backup catalog',
'db_name' => '/path/to/database',
'db_type' => 'sqlite',
},
]
}
Using Hiera:
baculaweb::catalog_db:
- label: 'EXAMPLE: MySQL backup catalog'
host: 'localhost'
login: 'bacula'
password: 'verystrongpassword'
db_name: 'bacula'
db_type: 'mysql'
db_port: 3306
- label: 'EXAMPLE: PostgreSQL backup catalog'
host: 'localhost'
login: 'bacula'
password: 'verystrongpassword'
db_name: 'bacula'
db_type: 'pgsql'
db_port: 5432
- label: 'EXAMPLE: SQLite backup catalog'
db_name: '/path/to/database'
db_type: 'sqlite'
Configure custom installation options
Configure custom directories, ownerships and version:
class { 'baculaweb':
version => '8.3.3'
root_dir => '/var/www/html/bacula-web',
extract_base_dir => '/opt/bacula-web',
user => 'apache',
group => 'apache'
}
Using Hiera:
baculaweb:
version: '8.3.3'
root_dir: '/var/www/html/bacula-web'
extract_base_dir: '/opt/bacula-web'
user: 'apache'
group: 'apache'
Configure baculaweb
You find an overview of the baculaweb settings here: http://docs.bacula-web.org/en/latest/02_install/configure.html
See the following example to configure the settings:
class { 'baculaweb':
language => 'en_US',
hide_empty_pools => true,
show_inactive_clients => true,
datetime_format => 'Y-m-d H:i:s',
enable_users_auth => false,
debug => false,
catalog_db => [
{
'label' => 'MySQL backup catalog',
'host' => 'localhost',
'login' => 'bacula',
'password' => 'verystrongpassword',
'db_name' => 'bacula',
'db_type' => 'mysql',
'db_port' => 3306,
},
]
}
Using Hiera:
baculaweb:
language: 'en_US'
hide_empty_pools: true
show_inactive_clients: true
datetime_format: 'Y-m-d H:i:s'
enable_users_auth: false
debug: false
catalog_db:
- label: 'MySQL backup catalog'
host: 'localhost'
login: 'bacula'
password: 'verystrongpassword'
db_name: 'bacula'
db_type: 'mysql'
db_port: 3306
Reference
See REFERENCE.md
Limitations
For a list of supported operating systems, see metadata.json
Development
This module uses puppet_litmus for running acceptance tests.
Setup testing and development environment (MacOSX)
Install required software with brew
brew cask install docker
brew cask install puppetlabs/puppet/pdk
brew cask install puppet-bolt
brew install rbenv
rbenv init
echo 'eval "$(rbenv init -)"' >> $HOME/.zshrc
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
rbenv install 2.6.5
Then execute the following command in the root dir of the module:
rbenv local 2.6.5
gem install bundle
bundle install --path .bundle/gems/
To configure the CentOS docker container:
bundle exec rake 'litmus:provision_list[default]'
bolt command run 'yum -y install http php php php-gettext php-mysql php-pdo php-pgsql php-process' -n localhost:2222 -i inventory.yaml
bolt command run 'service httpd start' -n localhost:2222 -i inventory.yaml
docker exec -it waffleimage_centos7_-2222 /bin/bash
vim /etc/httpd/conf.d/bacula-web.conf
<Directory /var/www/html/bacula-web>
AllowOverride All
</Directory>
vim /etc/php.ini
date.timezone = Europe/Berlin
service httpd restart
Build ssh tunnel and access the baculaweb application:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@localhost -p 2222 -L 27000:localhost:80 -Nf
http://localhost:27000/
http://localhost:27000/
Running acceptance tests
Update module code in container & run tests:
bolt command run 'puppet module uninstall andeman-baculaweb' -n localhost:2222 -i inventory.yaml
bundle exec rake litmus:install_module
bundle exec rake litmus:acceptance:parallel
Running unit tests
pdk test unit
Release Notes
See CHANGELOG.md
Reference
Table of Contents
Classes
Public Classes
baculaweb
: Installs bacula-web - A web based reporting and monitoring tool for Bacula.
Private Classes
baculaweb::config
: Configure the bacula-web application and set proper permissionsbaculaweb::install
: Download the baculaweb source and install it in the root_dir
Classes
baculaweb
== Class: baculaweb
- See also https://www.bacula-web.org/
Parameters
The following parameters are available in the baculaweb
class.
version
Data type: String
This version of baculaweb will be installed
archive_name
Data type: String
The filename of the archive which will be fetched from the mirror
user
Data type: String
The user under which the webserver is running
group
Data type: String
The group under which the webserver is running
archive_path
Data type: Stdlib::Compat::Absolute_path
The path where the fetched archive from the mirror will be saved
mirror_base_url
Data type: Variant[Stdlib::HTTPUrl,Stdlib::HTTPSUrl]
The base url from where the archive will be downloaded
mirror
Data type: Variant[Stdlib::HTTPUrl,Stdlib::HTTPSUrl]
The complete URL to download the archive
extract_base_dir
Data type: Stdlib::Compat::Absolute_path
The base directory for extracting the archive
extract_dir
Data type: Stdlib::Compat::Absolute_path
The full path of the directory where to save the archive for the specific version
extract_creates
Data type: Stdlib::Compat::Absolute_path
The path of the directory that will be created after extracting the specific version
archive_symlink_to_root_dir
Data type: Boolean
Whether the extracted archive should be symlinked to the document root directory
root_dir
Data type: Stdlib::Compat::Absolute_path
The document root directory for the application
config_path
Data type: Stdlib::Compat::Absolute_path
The path of the application config file
cache_path
Data type: Stdlib::Compat::Absolute_path
The path of the application cache directory
assets_protected_path
Data type: Stdlib::Compat::Absolute_path
The path of the application assets directory
show_inactive_clients
Data type: Boolean
Show inactive clients or not
hide_empty_pools
Data type: Boolean
Hide empty pools
datetime_format
Data type: String
Change default date and time format
enable_users_auth
Data type: Boolean
Enable or disable users authentication - This settings is useful if you already authenticate users on Web server side, using .htpasswd or LDAP authentication (mod_auth_ldap or any other).
debug
Data type: Boolean
Enable or disable debug mode - Debug mode could be helpful to troubleshoot Bacula-Web setup problem
language
Data type: Enum['en_US', 'be_BY', 'ca_ES', 'pl_PL', 'ru_RU', 'zh_CN', 'no_NO', 'ja_JP', 'sv_SE', 'es_ES', 'de_DE', 'it_IT', 'fr_FR', 'pt_BR', 'nl_NL']
Set displayed language - choose from ['en_US', 'be_BY', 'ca_ES', 'pl_PL', 'ru_RU', 'zh_CN', 'no_NO', 'ja_JP', 'sv_SE', 'es_ES', 'de_DE', 'it_IT', 'fr_FR', 'pt_BR', 'nl_NL']
catalog_db
Data type: Array[Struct[{ label => String, host => Optional[String], login => Optional[String], password => Optional[String], db_name => Optional[String], db_type => Enum['mysql', 'pgsql', 'sqlite'], db_port => Optional[Integer], }]]
Database connection settings for the bacula catalog databases
Dependencies
- puppetlabs/stdlib (>= 4.13.1 < 7.0.0)
- puppet/archive (>= 1.1.0 < 5.0.0)