Tuesday, April 14, 2020

How to install Puppet on Ubuntu 16.0.4 - How to configure Puppet Master

Puppet is an Infrastructure provisioning tool, similar to Ansible, Chef. We will see how to create EC2 instances in AWS using Puppet in this article.

install puppet master on new Ubuntu with medium instance
port 8140 needs to be opened.

First let us how to install Puppet on your Ubuntu machine.

Steps for Puppet Master

1. Download puppet installable

curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
sudo dpkg -i puppetlabs-release-pc1-xenial.deb
sudo apt-get update
sudo apt-get install puppetserver -y

sudo ufw allow 8140
sudo systemctl enable puppetserver

(the above command is to start the service during starting the Ubuntu instance)

sudo systemctl start puppetserver          

(The above command is for starting the server and this may take some time)
sudo systemctl status puppetserver 

       you should see a message like
       puppet systemd[1]: Started puppetserver Service.
That's it puppet master is up and running.

Now press q to come out of window.

This confirms that Puppet Master is installed successfully.

2. you need to install the aws-sdk-core and retries gems as root (or superuser):
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk-core retries
Done installing documentation for retries after 0 seconds
6 gems installed
3. Also install AWS SDK

sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk retries

(The above command may take 3 to 5 mins to get gems installed)

4. Now you can install puppet-labs-aws module 
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-aws

That's it. Puppet Master is setup successfully!!!!

No comments:

Post a Comment