OpenVox
repository·main·Indexed 41 days ago
https://github.com/openvoxproject/openvoxA community-maintained implementation of Puppet providing automated administrative capabilities for Linux, Unix, and Windows systems via centralized specifications.
What's inside OpenVox
- OpenVox is a community implementation of Puppet, an automated administrative engine for Linux, Unix, and Windows systems. It is designed to perform administrative tasks—such as adding users, installing packages, and updating server configurations—based on a centralized specification.
Overview of OpenVox command line tools
mainOpenVox's command line interface is provided via a single
puppetbinary that utilizes a subcommand architecture. The tools are categorized by their frequency of use and intended workflow:- Core Tools: Essential subcommands for daily operations (agent, apply, lookup, module, resource).
- Secondary subcommands: Tools used for configuration, inspection, and specific tasks (config, describe, device, doc, epp, generate, help, node, parser, plugin, script, ssl).
- Niche subcommands: Interfaces for internal subsystems or specialized workflows (catalog, facts, filebucket, report).
Note on Certificate Management: If you are using Puppet version 6.0 or later, do not use
puppet cert. Instead, use thepuppetserver certcommand.What is the OpenVox All-In-One (AIO) Agent?
mainThe OpenVox All-In-One (AIO) agent (also known as
openvox-agent) is a collection of software required for OpenVox and its dependencies to run. It bundles core components like openvox and openfact along with vendored dependencies such as Ruby, curl, and openssl.This repository provides the configuration to build the
openvox-agentAIO package and theopenfactgem for all Puppet-supported platforms using vanagon, a packaging utility.Supported Serialization Formats
mainOpenVox uses the following formats for message exchange:
- JSON: The primary format for REST services.
- Binary Data: Used for
application/octet-streampayloads (e.g., file contents).
Note:
PSONandYAMLare no longer supported for performance and security reasons, respectively.Configure Node Data Plugins (node_terminus)
mainThe
node_terminussetting determines which plugin is used to compile node catalogs. A node data plugin provides a list of classes, the environment, and top-scope variables for a node.Supported values:
plain: Returns no data; the main manifest controls all node configuration. (Default)exec: Uses an External Node Classifier (ENC) configured via theexternal_nodessetting. This allows pulling classes from external systems via a script that returns YAML.json: (Used in conjunction withnode_cache_terminus).
Decide which branch to patch (master vs stable)
mainUse the following logic to determine which base branch a change set belongs to:
masterbranch: Use this for new functionality that is not a bug fix. This is the branch for major and minor (feature) releases.stablebranch: Use this for bug fixes against the latest release or release candidate. This branch does not receive new functionality.- Patching Policy: Only the latest minor release of a major release should be patched.
- If the change contains new functionality: Merge into
masteronly. - If the change fixes a critical bug: Merge into both
stableandmaster.
- If the change contains new functionality: Merge into
Implement 'Decent Precedence' in grammar
mainInstead of relying solely on a precedence table, you can structure your grammar to mimic a recursive descent parser. This involves grouping expressions into hierarchical rules based on their precedence levels.
Example pattern:
expr : mulexp | expr PLUS mulexp | expr MINUS mulexp mulexp : primary | mulexp TIMES primary | mulexp DIV primary primary : NUMBERThis approach makes the precedence explicit in the grammar structure itself.
Manage packages with the `package` resource
mainThe
packageresource type is used to manage software packages on a target system. OpenVox automatically detects the appropriate packaging format based on the platform, but you can manually specify aproviderto override this behavior.Key Concepts
- Providers: Different backends (e.g.,
yum,apt,gem,rpm) handle package management. Some providers can retrieve files themselves, while others require asourcefile. - Titles vs Names: You must use the title of the resource to create references (e.g.,
Package['my_title']). Thenameattribute is the actual internal name used by the packaging system, which may differ from the title. - Autorequires: If you use
adminfile,responsefile, orsourceto manage files, thepackageresource will automatically create a dependency on those files.
package { 'my_package_title': name => 'actual_package_name', ensure => installed, provider => 'apt', }- Providers: Different backends (e.g.,
Understand the OpenVox testing hierarchy
mainOpenVox uses three distinct types of tests to ensure system stability:
- Unit Tests: Test individual components in isolation. They use canned information to hide system implementation and must never affect the running system's state. Located in the
spec/directory. - Integration Tests: Test different units of code together to ensure subsystems interact correctly. Located in the
spec/directory. - Acceptance Tests: Test high-level behaviors by changing system state and verifying the outcome. These can be destructive and should only be run on throwaway systems. Located in the
acceptance/tests/directory.
- Unit Tests: Test individual components in isolation. They use canned information to hide system implementation and must never affect the running system's state. Located in the
Recursively manage directories with `recurse` and `purge`
mainWhen
ensure => directoryis set, you can manage the contents of the directory.recurseoptionsfalse(default): Contents are not managed.remote: Ifsourceis set, OpenVox manages the contents of the source directory to match the target. This disablespurgeand is faster thantrue.true: Manages contents from thesourcedirectory and enables thepurgeattribute.
purgeIf
purge => trueis set, unmanaged files in the directory will be deleted.- If a
filebucketis configured, purged files are uploaded to the bucket. - If no
filebucketis configured, data is destroyed. - Purging will not delete directories unless
force => trueis set.
recurselimitLimits how deep OpenVox descends into subdirectories.
0: Same asrecurse => false.1: Manages files/directories directly inside the target, but not their contents.2: Manages direct contents and the first level of subdirectories.
How namevars and titles work in resource declarations
mainEvery resource type has a namevar, which is the attribute used to uniquely identify that resource on the target system.
If you do not explicitly provide a value for the namevar, it defaults to the resource's title.
Example: Using Title as Default Namevar
In the following example, the
filetype's namevar ispath. Sincepathis not specified, it defaults to the title'/etc/passwd'.file { '/etc/passwd': owner => 'root', group => 'root', mode => '0644', }Example: Explicitly Setting a Namevar
You can provide a namevar explicitly to decouple the resource's identity from its title:
file { 'passwords': path => '/etc/passwd', owner => 'root', group => 'root', mode => '0644', }In this case, the resource is still identified as
File['/etc/passwd']for relationship management.How the 'links' parameter affects metadata results
mainThe
linksparameter changes how symbolic links are represented in the JSON response:When
links=manage(Default)- The
typeislink. - The
destinationfield contains the path the link points to. - The
mode,owner, andgroupfields reflect the values of the link itself.
When
links=follow- The
typeisfile(the type of the target). - The
destinationfield isnull. - The
mode,owner, andgroupfields reflect the values of the target file. - The
checksumreflects the target file.
# Example of 'follow' behavior for a link { "destination": null, "group": 20, "links": "follow", "mode": 420, "owner": 501, "path": "/etc/puppetlabs/code/modules/example/files/link_to_file.txt", "relative_path": null, "type": "file" }- The