Update Servers & Workflows/Linux/Automation/Puppet/Puppet Deployment.md

This commit is contained in:
2024-10-03 21:13:55 -06:00
parent b88bddeb3b
commit ff87a59438

View File

@ -56,34 +56,34 @@ At this point, you want to ensure that the device being managed by the agent is
``` sh ``` sh
puppet agent --test puppet agent --test
``` ```
??? Legacy PuppetDB Deployment (Not Recommended)
### Install PuppetDB
At this point, we will install PuppetDB, which will add extra reporting and management functionality for Puppet to the Puppet server.
``` sh
# Install PuppetDB
yum install -y puppetdb
### Install PuppetDB # Install PuppetDB Module
At this point, we will install PuppetDB, which will add extra reporting and management functionality for Puppet to the Puppet server. puppet module install puppetlabs-puppetdb
``` sh ```
# Install PuppetDB
yum install -y puppetdb
# Install PuppetDB Module Now we need to configure a manifest file on the Puppet Server running PuppetDB, in this case, the same exact server that runs the Puppet Server itself. Create the following file if it does not already exist:
puppet module install puppetlabs-puppetdb ```json title="/etc/puppetlabs/code/environments/production/manifests/site.pp"
``` node 'lab-puppet-01.bunny-lab.io' {
# Include the puppetdb class with custom parameters
class { 'puppetdb':
listen_address => '0.0.0.0', # Allows access from all network interfaces
}
Now we need to configure a manifest file on the Puppet Server running PuppetDB, in this case, the same exact server that runs the Puppet Server itself. Create the following file if it does not already exist: # Configure the Puppet Server to use PuppetDB
```json title="/etc/puppetlabs/code/environments/production/manifests/site.pp" include puppetdb::master::config
node 'lab-puppet-01.bunny-lab.io' { }
# Include the puppetdb class with custom parameters ```
class { 'puppetdb':
listen_address => '0.0.0.0', # Allows access from all network interfaces
}
# Configure the Puppet Server to use PuppetDB Finally, we want to apply the configuration changes we made:
include puppetdb::master::config ``` sh
} sudo puppet agent -t
``` ```
Finally, we want to apply the configuration changes we made:
``` sh
sudo puppet agent -t
```
## Install r10k ## Install r10k
At this point, we need to configure Gitea as the storage repository for the Puppet "Environments" (e.g. `Production` and `Development`). We can do this by leveraging a tool called "r10k" which pulls a Git repository and configures it as the environment in Puppet. At this point, we need to configure Gitea as the storage repository for the Puppet "Environments" (e.g. `Production` and `Development`). We can do this by leveraging a tool called "r10k" which pulls a Git repository and configures it as the environment in Puppet.