Files
confdroid_resources/README.md

124 lines
5.4 KiB
Markdown
Raw Normal View History

2025-03-12 15:01:53 +01:00
# Readme
2025-03-12 13:41:42 +00:00
2026-02-10 15:11:32 +01:00
[![Build Status](https://jenkins.confdroid.com/job/confdroid_resources/badge/icon?style=plastic)](https://jenkins.confdroid.com/job/confdroid_resources/)
[![Security Hotspots](https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_resources&metric=security_hotspots&token=sqb_663ea1a864c1e75ee74e7de29138bf2c83bb8f16)](https://sonarqube.confdroid.com/dashboard?id=confdroid_resources)
2025-03-12 13:41:42 +00:00
2026-02-10 15:07:13 +01:00
- [Readme](#readme)
- [Synopsis](#synopsis)
2026-02-10 15:47:14 +01:00
- [Why This Module Exists](#why-this-module-exists)
- [How It Works](#how-it-works)
2026-02-10 15:07:13 +01:00
- [WARNING](#warning)
- [Features](#features)
- [Repo Documentation](#repo-documentation)
- [Dependencies](#dependencies)
- [Deployment](#deployment)
- [SELINUX](#selinux)
- [Known Problems](#known-problems)
- [Support](#support)
- [Tests](#tests)
- [Contact Us](#contact-us)
- [Disclaimer](#disclaimer)
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Synopsis
2025-03-12 13:41:42 +00:00
2026-02-10 15:47:14 +01:00
`confdroid_resources` is a lightweight Puppet module that automates the installation and configuration of common YUM/DNF repositories on Rocky Linux (and other Red Hat-based distributions).
Its primary focus is managing widely used third-party repositories such as EPEL in a clean, idempotent, and conflict-free way.
2025-03-12 13:41:42 +00:00
2026-02-10 15:47:14 +01:00
## Why This Module Exists
Rocky Linux (like other Enterprise Linux distributions) uses **YUM/DNF repositories** to define where packages are downloaded from. Many useful packages — especially development tools, monitoring agents, additional utilities, and more — are not available in the base OS repositories. These packages are commonly found in EPEL (Extra Packages for Enterprise Linux).
However, Puppet follows a **singleton resource model**: a given resource (such as the EPEL repository) can only be declared and managed once in the catalog. Declaring it multiple times causes conflicts and catalog compilation failures.
This creates a common problem:
* Module A needs EPEL to install package X.
* Module B also needs EPEL to install package Y.
* If both modules try to declare the EPEL repo resource → conflict.
To solve this, the best practice is to manage foundational repositories (like EPEL) once, in a central place that is included in every node's catalog — regardless of which specific modules or classes are applied.
That's exactly where `confdroid_resources` comes in.
## How It Works
* The module provides a clean, reusable way to install and enable common repositories (starting with EPEL).
* It is designed to be included early in the catalog — ideally in a base profile or common role that applies to all nodes.
* Once the repository is present, any module or class can safely install packages that depend on it without re-declaring the repo resource.
* Individual repositories can be enabled or disabled via parameters, giving you full control without touching the main resource declarations.
This approach keeps your catalog clean, avoids duplication, and prevents resource conflicts.
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## WARNING
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production***
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Features
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
* installs and configures yum repos
* install commonly required packages, which can be overridden per host, hostgroup etc.
2026-02-10 15:47:14 +01:00
* Automatic installation and enabling of EPEL via `$rs_enable_epel`. since this parameter is directly also used in the yumrepo configuration, it needs to be set to `1`, **not** `true`.
* Parameter-based control (enable/disable specific repos)
* Idempotent and conflict-free design
2025-03-12 13:41:42 +00:00
2026-02-10 15:47:14 +01:00
More repositories (PowerTools/CRB, RPM Fusion, etc.) will be added over time.
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Repo Documentation
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
See the full Puppet documentation including parameters in `docs/index.html`
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Dependencies
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
All dependencies must be included in the catalogue.
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Deployment
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
* native Puppet deployment
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
via site.pp or nodes.pp
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
```bash
node 'example.example.net' {
2026-02-10 14:55:04 +01:00
include confdroid_resources
2025-03-12 15:01:53 +01:00
}
```
2025-03-12 13:41:42 +00:00
2026-02-10 15:47:14 +01:00
* through Foreman (recommended):
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
In order to apply parameters through Foreman, the params.pp must be added to the host or host group in question.
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
2025-03-12 13:41:42 +00:00
2026-02-10 15:47:14 +01:00
* call it from other modules
```bash
require confdroid_resources
```
2025-03-12 15:01:53 +01:00
## SELINUX
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Known Problems
2025-03-12 13:41:42 +00:00
## Support
2025-03-12 15:01:53 +01:00
* OS: Rocky 9
2026-02-10 15:47:14 +01:00
* Puppet 8
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Tests
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
* Puppet Lint
* excluded tests:
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
* Puppet Parser
* ERB Template Parser
* Sonar Quality Gate
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Contact Us
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
[contact Us](https://confdroid.com/contact/)
2026-02-10 15:47:14 +01:00
[Feedback Portal](feedback.confdroid.com)
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
## Disclaimer
2025-03-12 13:41:42 +00:00
2025-03-12 15:01:53 +01:00
ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments.
The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.