Update Servers & Workflows/Linux/Automation/Puppet/Puppet Deployment.md
This commit is contained in:
@ -5,6 +5,7 @@ Puppet is another declarative configuration management tool that excels in syste
|
|||||||
This document assumes you are deploying Puppet server onto Rocky Linux 9.4. Any version of RHEL/CentOS/Alma/Rocky should behave similarily.
|
This document assumes you are deploying Puppet server onto Rocky Linux 9.4. Any version of RHEL/CentOS/Alma/Rocky should behave similarily.
|
||||||
|
|
||||||
## Architectural Overview
|
## Architectural Overview
|
||||||
|
### Detailed
|
||||||
``` mermaid
|
``` mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant Gitea as Gitea Repo (Puppet Environment)
|
participant Gitea as Gitea Repo (Puppet Environment)
|
||||||
@ -42,7 +43,7 @@ sequenceDiagram
|
|||||||
Agent->>PuppetMaster: Report status (catalog applied and neofetch installed)
|
Agent->>PuppetMaster: Report status (catalog applied and neofetch installed)
|
||||||
```
|
```
|
||||||
|
|
||||||
## (Simplified) Architectural Overview
|
### Simplified
|
||||||
``` mermaid
|
``` mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant Gitea as Gitea (Puppet Repository)
|
participant Gitea as Gitea (Puppet Repository)
|
||||||
@ -64,9 +65,27 @@ sequenceDiagram
|
|||||||
|
|
||||||
%% Agent reports back
|
%% Agent reports back
|
||||||
Agent->>PuppetMaster: Report catalog applied (neofetch installed)
|
Agent->>PuppetMaster: Report catalog applied (neofetch installed)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Breakdown
|
||||||
|
#### 1. **PuppetMaster Pulls Updates from Gitea**
|
||||||
|
- PuppetMaster uses `r10k` to fetch the latest environment updates from Gitea. These updates include manifests, hiera data, and modules for the specified Puppet environments.
|
||||||
|
|
||||||
|
#### 2. **PuppetMaster Compiles Catalogs and Modules**
|
||||||
|
- After pulling updates, the PuppetMaster compiles the latest node-specific catalogs based on the manifests and modules. It ensures the configuration is ready for agents to retrieve.
|
||||||
|
|
||||||
|
#### 3. **Agent (fedora.bunny-lab.io) Checks In**
|
||||||
|
- The Puppet agent on `fedora.bunny-lab.io` checks in with the PuppetMaster for its catalog. This request tells the PuppetMaster to compile the node's desired configuration.
|
||||||
|
|
||||||
|
#### 4. **Agent Downloads and Applies the Catalog**
|
||||||
|
- The agent retrieves its compiled catalog from the PuppetMaster. It compares the current system state with the desired state outlined in the catalog.
|
||||||
|
|
||||||
|
#### 5. **Agent Installs `neofetch`**
|
||||||
|
- The agent identifies that `neofetch` is missing and installs it using the system's package manager. The installation follows the directives in the catalog.
|
||||||
|
|
||||||
|
#### 6. **Agent Reports Success**
|
||||||
|
- Once changes are applied, the agent sends a report back to the PuppetMaster. The report includes details of the changes made, confirming `neofetch` was installed.
|
||||||
|
|
||||||
## Deployment Steps:
|
## Deployment Steps:
|
||||||
You will need to perform a few steps outlined in the [official Puppet documentation](https://www.puppet.com/docs/puppet/7/install_puppet.html) to get a Puppet server operational. A summarized workflow is seen below:
|
You will need to perform a few steps outlined in the [official Puppet documentation](https://www.puppet.com/docs/puppet/7/install_puppet.html) to get a Puppet server operational. A summarized workflow is seen below:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user