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, 2021.7.x
- Puppet >= 7.24 < 9.0.0
Start using this module
Add this module to your Puppetfile:
mod 'fraenki-f_upgrade', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-f_upgrade
Table of Contents
Overview
A Puppet module to install and configure the f-upgrade service. It automates the process of installing FreeBSD operating system updates.
Usage
Basic usage
Assuming that the system is currently running FreeBSD 13.2 and should be upgraded to FreeBSD 14.0, the following configuration should be used:
class { 'f_upgrade':
upgrade => '14.0',
}
NOTE: Please read the f-upgrade documentation carefully before attempting an operating system upgrade.
Custom configuration
In order to change the f-upgrade configuration file, options may be added to the $config
parameter:
class { 'f_upgrade':
config => {
free_diskspace => 2048,
log_debug => 2,
task_timeout => 28800,
},
upgrade => '14.0',
}
Using hooks
Hooks make it possible to customize the upgrade process. They need to have valid POSIX shell syntax. Hooks may either be specified directly using the content
parameter or by specifying an alternative download source using the source
parameter:
class { 'f_upgrade':
hooks => {
'1000.pre' => {
content => "echo hello world\n exit 0",
},
'1000.post.14' => {
content => "echo task 1000 completed\n exit 0",
},
'5000.post.14.0' => {
source => 'puppet:///modules/example/hook_5000.sh',
},
'8000.post.12.2' => {
ensure => absent,
},
},
upgrade => '14.0',
}
Note that hooks can be removed by adding ensure => absent
.
Reference
Classes and parameters are documented in REFERENCE.md.
Limitations
Upgrades of ActiveMQ Artemis are supported to a certain degree, provided that the new version is compatible with this module. Please note that in-place upgrades are performed and the official upgrade script is not used. This may have unwanted side-effect. Overall this upgrade procedure should be pretty safe for multi-instance primary/backup setups.
Development
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.
Reference
Table of Contents
Classes
Public Classes
f_upgrade
: Install and configure f-upgrade
Private Classes
f_upgrade::config
: Manage the f-upgrade configuration filef_upgrade::hooks
: Manage hook files for f-upgradef_upgrade::install
: Install f-upgradef_upgrade::service
: Enable and start the f-upgrade upgrade process
Classes
f_upgrade
Install and configure f-upgrade
Parameters
The following parameters are available in the f_upgrade
class.
config
Data type: Hash
A list of options and values that should be added to the f-upgrade
configuration file. Note that the "upgrade" option should not be listed
here, the parameter $upgrade
should be used instead.
If an option is set to an empty string, it will be removed from the file.
config_file
Data type: Stdlib::Absolutepath
The path to the f-upgrade configuration file.
cronjob_options
Data type: Hash
Options for the f-upgrade cron job.
hook_dir
Data type: Stdlib::Absolutepath
The target directory for hook files.
hooks
Data type: Hash
A list of hooks. The content may be specified either directly using the "content" parameter or by specifying the "source" parameter – as supported by the file resource.
manage_cronjob
Data type: Boolean
Enables the f-upgrade cron job. By default it runs hourly to start or resume the upgrade process.
package_ensure
Data type: Enum['absent', 'installed', 'latest']
The desired state for the f-upgrade package.
package_name
Data type: String
The name of the f-upgrade package.
upgrade
Data type: Optional[String]
The target FreeBSD version for the upgrade. When this parameter is specified, the module immediately starts the f-upgrade service and the upgrade process should begin only a few seconds later.
Default value: undef
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.0.0 - 2023-12-01
Initial release
Dependencies
- puppetlabs-stdlib (>= 4.25.0 < 10.0.0)
Copyright 2023 Frank Wall All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted providing that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.