How to Install and Setup Puppet Server-Agent in Debian 10(Buster)
- 3 minsIntroduction?
- In this article, I am going to explain how to install and configure Puppet server and puppet agent in Debian 10(Buster), I have used Puppet 6 for this project so If you use different linux distros or different Puppet version, You may use different installation steps
Steps
- Install and configure Puppet Agent
- Install and configure Puppet Server
- Puppet Agent - Server CA Sign
- Config a basic manifest and configure Nginx server on agent
Install Puppet Agent
- While agent has no need any additional configuration We can install and run puppet agent service.
- You may add hosts name in your /etc/hosts file
- I will use puppet-agent.local hostname for agent node
- I will use puppet-master.local for master node
- Add the puppet repo to agent, install puppet-agent and start puppet service.
- Config the puppet server name for puppet agent
Install Puppet Server
- Add the puppet repo to master node, install puppet server and start puppet server service.
- If puppet server can not run, You may need to change puppet server configuration
-
You may need to decrease -Xms and -Xmx variable , -Xmx option and -Xms option in combination are used to limit the Java heap size.
- Make sure puppet server is up and running
Puppet Agent - Server CA Sign
- Puppet communicates with using CA
- We need request CA from agent and sign CA in master node
- If you run puppet agent command in agent node You will see an error that shows , Puppet server should sign CA
- Run /opt/puppetlabs/bin/puppet agent -t
- This command will output an error, stating that no certificate has been found. This error is because the generated certificate needs to be approved by the Puppet master.
- After you run command , You can go back puppet master and list CA
- And sign CA with node name
- And sign CA with node name
- Return to the Puppet agent nodes and run the Puppet agent again:
- You should see the agent could connected to the server.
Config a basic manifest and configure Nginx server on agent
- Install apt and nginx module on the server:
- Create file site.pp in folder /etc/puppetlabs/code/environments/production/manifests
-
Your manifest should include node name
-
In agent run the puppet agent command to install nginx
- Finally tou can check if ngingx installed succusfully
Guneycan Sanli.