baculaweb
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'markt-baculaweb', '1.1.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-baculaweb
Table of Contents
- baculaweb
Overview
This module install and configures Bacula-Web, a web based reporting and monitoring tool for Bacula.
Requirements
- Bacula-Web 8.6.0 or later (due to breaking changes in this release)
- A webservice like Apache or Nginx, puppetlabs/apache is recommended.
- A supported version of PHP (PHP-FPM is strongly recommended), puppet/php is recommended.
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
Default User and Password for fresh installs
After installation the default user is admin and the default password is password. You should change this after installation.
See: https://docs.bacula-web.org/en/latest/02_install/finalize.html#reset-user-password
The default application.db is only deployed once. Data is persisted between upgrades in baculaweb::data_dir
.
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.6.3'
root_dir => '/var/www/html/bacula-web',
extract_base_dir => '/opt/bacula-web',
user => 'apache',
group => 'apache'
}
Using Hiera:
baculaweb:
version: '8.6.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.
Running acceptance tests
Create test environment:
./scripts/create_test_env
Run the acceptance tests:
./scripts/acceptance_tests
(Optional) Access the baculaweb application (user/pw: admin/password):
http://127.0.0.1:8091/bacula-web
Remove the test environment:
./scripts/remove_test_env
Running unit tests
./scripts/unit_tests
Release module to Puppet Forge
Prepare
First prepare the release with:
./scripts/release_prep
This will set the version in metadata.json
, create REFERENCE.md
and CHANGELOG.md
.
Commit and push
Then commit the changes and push them to the repository.
configure github actions secrets
https://github.com/markt-de/puppet-opnsense/settings/secrets/actions
Ensure that the following secrets are set in the github repository:
- FORGE_API_KEY (your puppet forge api key)
Run github actions release workflow
Then run github actions pipeline "Publish module to puppet forge" from main branch to release the module to the forge:
https://github.com/markt-de/puppet-baculaweb/actions/workflows/release.yaml
Contributing
Please use the GitHub issues functionality to report any bugs or requests for new features. Feel free to fork and submit pull requests for potential contributions.
All contributions must pass all existing tests, new features should provide additional unit/acceptance tests.
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
Parameters
The following parameters are available in the baculaweb
class:
version
archive_name
user
group
archive_path
mirror_base_url
mirror
extract_base_dir
data_dir
data_dir_assets_protected_path
extract_dir
extract_creates
archive_symlink_to_root_dir
data_dir_symlink
root_dir
config_path
cache_path
assets_protected_path
show_inactive_clients
hide_empty_pools
datetime_format
enable_users_auth
debug
language
catalog_db
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
Default value: "bacula-web-${version}.tgz"
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
Default value: "${extract_base_dir}/${archive_name}"
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
Default value: "${mirror_base_url}/v${version}/${archive_name}"
extract_base_dir
Data type: Stdlib::Compat::Absolute_path
The base directory for extracting the archive
data_dir
Data type: Stdlib::Compat::Absolute_path
The directory wich holds persistent data for baculaweb
data_dir_assets_protected_path
Data type: Stdlib::Compat::Absolute_path
Subfolder for assets/protected in data_dir
Default value: "${data_dir}/protected"
extract_dir
Data type: Stdlib::Compat::Absolute_path
The full path of the directory where to save the archive for the specific version
Default value: "${extract_base_dir}/v${version}"
extract_creates
Data type: Stdlib::Compat::Absolute_path
The path of the directory that will be created after extracting the specific version
Default value: "${extract_dir}/bacula-web-${version}"
archive_symlink_to_root_dir
Data type: Boolean
Whether the extracted archive should be symlinked to the document root directory
data_dir_symlink
Data type: Boolean
Whether the data dir should be symlinked. This ensures data persistence after an upgrade e.g. user database.
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
Default value: "${root_dir}/application/config/config.php"
cache_path
Data type: Stdlib::Compat::Absolute_path
The path of the application cache directory
Default value: "${root_dir}/application/views/cache"
assets_protected_path
Data type: Stdlib::Compat::Absolute_path
The path of the application assets directory
Default value: "${root_dir}/application/assets/protected"
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
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.1.0 - 2023-08-14
Changed
- Update module dependencies, OS support and Puppet version
- Update PDK from 2.6.0 to 3.0.0
Fixed
- Fix compatibility with puppetlabs/stdlib v9.0.0
- Fix Github Actions Pipeline
v1.0.0 - 2023-01-20
Changed
- Update OS support, dependencies and documentation
Added
- Persists User Database after upgrade
Fixed
- Fix tests for GitHub actions
[v0.1.0] - 2020-01-15
initial release
Summary
Dependencies
- puppetlabs/stdlib (>= 8.0.0 < 10.0.0)
- puppet/archive (>= 6.0.0 < 8.0.0)