Difference between revisions of "Extracts from Digitalocean tutorial"

From MyWiki
Jump to: navigation, search
Line 38: Line 38:
 
On the Puppet master, run the following command to list all unsigned certificate requests:
 
On the Puppet master, run the following command to list all unsigned certificate requests:
 
     sudo /opt/puppetlabs/bin/puppet cert list
 
     sudo /opt/puppetlabs/bin/puppet cert list
 +
 +
'''Sign A Request'''
 +
 +
To sign a certificate request, use the puppet cert sign command, with the hostname of the certificate you want to sign. For example, to sign host1.nyc3.example.com's certificate, you would use the following command:
 +
 +
    sudo /opt/puppetlabs/bin/puppet cert sign host1.nyc3.example.com

Revision as of 17:14, 5 May 2016

Ubuntu 14.04
timedatectl list-timezones
sudo timedatectl set-timezone America/New_York
sudo apt-get update
sudo apt-get -y install ntp
Configure ntp.conf
sudo service ntp restart
Install puppet

   cd ~ && wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
   sudo dpkg -i puppetlabs-release-pc1-trusty.deb
   sudo apt-get update
   sudo apt-get -y install puppetserver

Configure memory:
sudo vi /etc/default/puppetserver

Start puppetserver
Start Puppet Server Now we're ready to start Puppet Server with this command:
sudo service puppetserver restart
Next, enable Puppet Server so that it starts when your master server boots: sudo /opt/puppetlabs/bin/puppet resource service puppetserver ensure=running enable=true

Install Puppet Agent
Perform these steps on all of your agent servers.
Enable the official Puppet Labs collection repository with these commands:

   cd ~ && wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
   sudo dpkg -i puppetlabs-release-pc1-trusty.deb

Then install the puppet-agent package:

   sudo apt-get update
   sudo apt-get install puppet-agent

Now that the Puppet agent is installed, start it with this command:
sudo /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true

The first time you run the Puppet agent, it generates an SSL certificate and sends a signing request to the Puppet master. After the Puppet master signs the agent's certificate, it will be able to communicate with and control the agent node.

Sign Certificates on Puppet Master
On the Puppet master, run the following command to list all unsigned certificate requests:

   sudo /opt/puppetlabs/bin/puppet cert list

Sign A Request

To sign a certificate request, use the puppet cert sign command, with the hostname of the certificate you want to sign. For example, to sign host1.nyc3.example.com's certificate, you would use the following command:

   sudo /opt/puppetlabs/bin/puppet cert sign host1.nyc3.example.com