How To Install Puppet 6 On Ubuntu 18?

Discover ways to set up and arrange a Puppet server and agent to allow them to discuss to one another.

Puppet is likely one of the most generally used enterprise configuration administration instruments within the DevOps world. As a DevOps engineer, you should know find out how to arrange a pop in your system.

However earlier than we begin, I wish to inform you that putting in doll shouldn’t be a simple job in any respect. In the event you miss a single step or when you change the sequence of steps on this tutorial, even in a single place, chances are you’ll be caught with many errors in your thoughts all day, however your configuration will probably be incomplete. So comply with every step very fastidiously.

Puppet has a client-server structure, which consists of a puppeteer (server) and puppet brokers (shopper). Puppet Grasp has all of the configurations, compiles and delivers the configurations to puppet brokers. Puppet brokers intermittently ship the information to the puppeteer and ask for catalogs. Puppet Grasp returns the requested catalog to the Puppet Agent. Puppet Agent then applies that catalog to the node and reviews again to the grasp.

Now that you’ve the fundamentals of Puppet, let’s get began and arrange a Puppet Grasp and Puppet Agent.

If you’re an absolute newbie, chances are you’ll wish to take this on-line video course.

Atmosphere particulars

I’m utilizing 2 Ubuntu 18.04 machines. One acts as a puppeteer and the opposite as a puppet agent. Under are the main points of the machines:

Puppeteer (server)

  • Hostname: puppet, puppet.geekflate.com
  • IP handle: 192.168.0.108

Puppet agent (buyer)

  • Hostname: dollagent
  • IP handle: 192.168.0.107

Set up puppet server

Earlier than I begin the set up, I’ve to /and so forth/hosts file on each grasp and agent to allow them to resolve one another.

On the grasp node

geekflare@puppet-master:~$ sudo gedit /and so forth/hosts

[sudo] password for bestnich:

127.0.0.1 localhost
127.0.1.1 geekflare
192.168.0.108 puppet puppet.geekflare.com

On Agent Node

geekflare@puppet-agent:~$ sudo gedit /and so forth/hosts

127.0.0.1 localhost
127.0.1.1 geekflare
192.168.0.107 puppetagent
192.168.0.108 puppet puppet.geekflare.com

­Now I must get a puppet repository on my grasp node and replace it.

Obtain the doll repository.

geekflare@puppet-master:~$ wget https://apt.puppetlabs.com/puppet6-release-bionic.deb

--2019-10-15 15:41:34-- https://apt.puppetlabs.com/puppet6-release-bionic.deb

Resolving apt.puppetlabs.com (apt.puppetlabs.com)... 99.86.19.107, 99.86.19.59, 99.86.19.2, ...

Connecting to apt.puppetlabs.com (apt.puppetlabs.com)|99.86.19.107|:443... related.

HTTP request despatched, awaiting response... 200 OK

Size: 11736 (11K) [application/x-debian-package]

Saving to: ‘puppet6-release-bionic.deb’

puppet6-release-bio 100%[===================>] 11.46K --.-KB/s in 0s     

2019-10-15 15:41:34 (236 MB/s) - ‘puppet6-release-bionic.deb’ saved [11736/11736]

Add and configure Puppet 6 repository.

geekflare@puppet-master:~$ sudo dpkg -i puppet6-release-bionic.deb

Choosing beforehand unselected package deal puppet6-release.

(Studying database ... 187041 information and directories at present put in.)

Getting ready to unpack puppet6-release-bionic.deb ...

Unpacking puppet6-release (6.0.0-5bionic) ...

Establishing puppet6-release (6.0.0-5bionic) ...

Replace the repository record.

geekflare@puppet-master:~$ sudo apt replace

Hit:1 https://obtain.docker.com/linux/ubuntu bionic InRelease

Hit:2 http://safety.ubuntu.com/ubuntu cosmic-security InRelease             

Hit:3 http://ppa.launchpad.web/ansible/ansible/ubuntu cosmic InRelease        

Get:4 http://obtain.virtualbox.org/virtualbox/debian cosmic InRelease [4,429 B]

Get:5 http://apt.puppetlabs.com bionic InRelease [85.3 kB]                    

Hit:6 http://us.archive.ubuntu.com/ubuntu cosmic InRelease                    

Hit:7 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease            

Get:8 http://obtain.virtualbox.org/virtualbox/debian cosmic/contrib amd64 Packages [1,466 B]

Get:9 http://apt.puppetlabs.com bionic/puppet6 all Packages [13.5 kB]

Hit:10 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease

Get:11 http://apt.puppetlabs.com bionic/puppet6 i386 Packages [13.5 kB]

Get:12 http://apt.puppetlabs.com bionic/puppet6 amd64 Packages [32.3 kB]

Fetched 151 kB in 2s (61.9 kB/s) 

Studying package deal lists... Achieved

Constructing dependency tree      

Studying state info... Achieved

234 packages may be upgraded. Run 'apt record --upgradable' to see them.

Set up puppet server

Let’s run the command beneath on the grasp node to put in the puppet server on it.

geekflare@puppet-master:~$ sudo apt set up -y puppetserver

Studying package deal lists... Achieved

Constructing dependency tree      

Studying state info... Achieved

The next extra packages will probably be put in:

 ca-certificates-java java-common openjdk-8-jre-headless puppet-agent

Instructed packages:

 default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho

 fonts-wqy-microhei fonts-wqy-zenhei

The next NEW packages will probably be put in:

 ca-certificates-java java-common openjdk-8-jre-headless puppet-agent

 puppetserver

0 upgraded, 5 newly put in, 0 to take away and 234 not upgraded.

Must get 109 MB of archives.

After this operation, 287 MB of extra disk area will probably be used.

Get:1 http://us.archive.ubuntu.com/ubuntu cosmic/foremost amd64 java-common all 0.68ubuntu1 [6,988 B]

Get:2 http://apt.puppetlabs.com bionic/puppet6 amd64 puppet-agent amd64 6.10.1-1bionic [19.9 MB]

Get:3 http://us.archive.ubuntu.com/ubuntu cosmic-updates/universe amd64 openjdk-8-jre-headless amd64 8u212-b03-0ubuntu1.18.10.1 [27.2 MB]

Get:4 http://apt.puppetlabs.com bionic/puppet6 amd64 puppetserver all 6.7.1-1bionic [61.5 MB]

Get:5 http://us.archive.ubuntu.com/ubuntu cosmic/foremost amd64 ca-certificates-java all 20180516ubuntu1 [12.3 kB]

Fetched 109 MB in 1min 41s (1,072 kB/s)                                       

Unpacking puppetserver (6.7.1-1bionic) ...

Establishing puppet-agent (6.10.1-1bionic) ...

Created symlink /and so forth/systemd/system/multi-user.goal.desires/puppet.service → /lib/systemd/system/puppet.service.

Created symlink /and so forth/systemd/system/multi-user.goal.desires/pxp-agent.service → /lib/systemd/system/pxp-agent.service.

Eliminated /and so forth/systemd/system/multi-user.goal.desires/pxp-agent.service.

Establishing java-common (0.68ubuntu1) ...

Processing triggers for libc-bin (2.28-0ubuntu1) ...

Processing triggers for systemd (239-7ubuntu10.12) ...

Processing triggers for man-db (2.8.4-2) ...

Processing triggers for ca-certificates (20180409) ...

Updating certificates in /and so forth/ssl/certs...

0 added, 0 eliminated; performed.

Operating hooks in /and so forth/ca-certificates/replace.d...

performed.

Establishing ca-certificates-java (20180516ubuntu1) ...

head: can't open '/and so forth/ssl/certs/java/cacerts' for studying: No such file or listing

Including debian:SSL.com_EV_Root_Certification_Authority_ECC.pem

Including debian:ssl-cert-snakeoil.pem

Including debian:SwissSign_Gold_CA_-_G2.pem

Including debian:SZAFIR_ROOT_CA2.pem

Including debian:OpenTrust_Root_CA_G3.pem

Including debian:TWCA_Root_Certification_Authority.pem

Including debian:QuoVadis_Root_CA_2_G3.pem

Including debian:DST_Root_CA_X3.pem

Including debian:SecureSign_RootCA11.pem

Including debian:QuoVadis_Root_CA_1_G3.pem

Including debian:T-TeleSec_GlobalRoot_Class_3.pem

Including debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem

Including debian:Actalis_Authentication_Root_CA.pem

Including debian:Chambers_of_Commerce_Root_-_2008.pem

performed.

Processing triggers for ca-certificates (20180409) ...

Updating certificates in /and so forth/ssl/certs...

0 added, 0 eliminated; performed.

Operating hooks in /and so forth/ca-certificates/replace.d...

performed.

performed.

Establishing openjdk-8-jre-headless:amd64 (8u212-b03-0ubuntu1.18.10.1) ...

Establishing puppetserver (6.7.1-1bionic) ...

usermod: no modifications

Processing triggers for systemd (239-7ubuntu10.12) ...

Configure puppet server

Edit the puppetserver file as proven beneath. This to configure doll server JVM.

geekflare@puppet-master:~$ sudo gedit /and so forth/default/puppetserver

 
# Modify this if you would like to vary the reminiscence allocation, allow JMX, and so forth

JAVA_ARGS="-Xms512m -Xmx512m -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

Edit the puppet configuration file to vary the puppet server settings.

geekflare@puppet-master:~$ sudo gedit /and so forth/puppetlabs/puppet/puppet.conf


# This file can be utilized to override the default puppet settings.

# See the next hyperlinks for extra particulars on what settings can be found:

# - https://puppet.com/docs/puppet/newest/config_important_settings.html

# - https://puppet.com/docs/puppet/newest/config_about_settings.html

# - https://puppet.com/docs/puppet/newest/config_file_main.html

# - https://puppet.com/docs/puppet/newest/configuration.html

[master]

vardir = /decide/puppetlabs/server/knowledge/puppetserver

logdir = /var/log/puppetlabs/puppetserver

rundir = /var/run/puppetlabs/puppetserver

pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid

codedir = /and so forth/puppetlabs/code

dns_alt_names = puppet,puppet.geekflare.com

[main]

certname = puppet.geekflare.com

server = puppet.geekflare.com

setting = manufacturing

runinterval = 15m

Puppet Server should generate a root and intermediate signature, CA.

geekflare@puppet-master:~$ sudo /decide/puppetlabs/bin/puppetserver ca setup

Technology succeeded. Discover your information in /and so forth/puppetlabs/puppet/ssl/ca

Begin and allow the puppet server service.

geekflare@puppet-master:~$ sudo systemctl begin puppetserver

geekflare@puppet-master:~$ sudo systemctl allow puppetserver

Synchronizing state of puppetserver.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install allow puppetserver

Set up puppet agent

Observe the steps beneath on the agent node as you probably did for the primary system. The puppet repository have to be current on all agent nodes.

geekflare@puppet-agent:~$ wget https://apt.puppetlabs.com/puppet6-release-bionic.deb

geekflare@puppet-agent:~$ sudo dpkg -i puppet6-release-bionic.deb

geekflare@puppet-agent:~$ sudo apt replace

Run the command beneath on the agent node to put in the puppet agent.

geekflare@puppet-agent:~$ sudo apt set up -y puppet-agent

Studying package deal lists... Achieved

Constructing dependency tree      

Studying state info... Achieved

The next NEW packages will probably be put in:

 puppet-agent

0 upgraded, 1 newly put in, 0 to take away and 233 not upgraded.

Must get 19.9 MB of archives.

After this operation, 115 MB of extra disk area will probably be used.

Get:1 http://apt.puppetlabs.com bionic/puppet6 amd64 puppet-agent amd64 6.10.1-1bionic [19.9 MB]

Fetched 19.9 MB in 2s (8,488 kB/s)      

Choosing beforehand unselected package deal puppet-agent.

(Studying database ... 185786 information and directories at present put in.)

Getting ready to unpack .../puppet-agent_6.10.1-1bionic_amd64.deb ...

Unpacking puppet-agent (6.10.1-1bionic) ...

Establishing puppet-agent (6.10.1-1bionic) ...

Created symlink /and so forth/systemd/system/multi-user.goal.desires/puppet.service → /lib/systemd/system/puppet.service.

Created symlink /and so forth/systemd/system/multi-user.goal.desires/pxp-agent.service → /lib/systemd/system/pxp-agent.service.

Eliminated /and so forth/systemd/system/multi-user.goal.desires/pxp-agent.service.

Processing triggers for libc-bin (2.28-0ubuntu1) ...

Configure Puppet agent

Edit the pop configuration file on the agent node.

geekflare@puppet-agent:~$ sudo gedit /and so forth/puppetlabs/puppet/puppet.conf

[main]

certname = puppetagent

server = puppet.geekflare.com

setting = manufacturing

runinterval = 15m

Run the command beneath to start out the puppet service. This command additionally begins routinely after it’s launched.

geekflare@puppet-agent:~$ sudo /decide/puppetlabs/bin/puppet useful resource service puppet guarantee=operating allow=true

service { 'puppet':

 guarantee => 'operating',

 allow => 'true',

} 

Generate and signal certificates

When the agent begins for the primary time, it sends a certificates signing request to the puppeteer. The captain should verify and signal this certificates. After that, the agent retrieves catalogs from the grasp and applies them to agent nodes regularly.

Now that the puppet agent is up and operating, run the command beneath on the grasp node to verify if it has acquired a certificates signing request.

On the primary node

geekflare@puppet-master:~$ sudo /decide/puppetlabs/bin/puppetserver ca record

[sudo] password for bestnich:

Requested Certificates:

   puppetagent (SHA256) EA:68:23:B5:C3:71:2C:E6:4A:6A:3B:2F:24:F5:B8:5B:50:F7:3F:12:89:DE:B1:EB:D1:0A:74:3E:48:C3:D7:35

Signal the certificates despatched by the agent.

geekflare@puppet-master:~$ sudo /decide/puppetlabs/bin/puppetserver ca record

[sudo] password for bestnich:

Requested Certificates:

   puppetagent (SHA256) EA:68:23:B5:C3:71:2C:E6:4A:6A:3B:2F:24:F5:B8:5B:50:F7:3F:12:89:DE:B1:EB:D1:0A:74:3E:48:C3:D7:35

Run the command beneath to verify your complete certificates record. One certificates is already there, is a grasp node by default, and the opposite comes from the agent node.

geekflare@puppet-master:~$ sudo /decide/puppetlabs/bin/puppetserver ca record --all

Signed Certificates:

   puppetagent (SHA256) EA:68:23:B5:C3:71:2C:E6:4A:6A:3B:2F:24:F5:B8:5B:50:F7:3F:12:89:DE:B1:EB:D1:0A:74:3E:48:C3:D7:35

   puppet.geekflare.com (SHA256) 71:30:5B:C8:C5:CE:28:A0:60:5C:4F:39:26:D0:FC:DA:DF:0A:0F:4D:ED:D4:B1:9C:05:1A:38:2F:D6:5F:9C:06 alt names: ["DNS:puppet.geekflare.com", "DNS:puppet", "DNS:puppet.geekflare.com"]

On Agent Node

Now run this command to check if the connection between grasp and agent nodes is established and every part is working tremendous.

geekflare@puppet-agent:~$ sudo /decide/puppetlabs/bin/puppet agent --test

Information: Utilizing configured setting 'manufacturing'

Information: Retrieving pluginfacts

Information: Retrieving plugin

Information: Retrieving locales

Information: Caching catalog for puppet-agent

Information: Making use of configuration model '1571171191'

Discover: Utilized catalog in 0.02 seconds

Instance of a puppet present instance

Let’s run a easy puppet instance. I will create a easy puppet manifest, which can create a folder with a sure permission.

On the basis node:

geekflare@puppet-master:~$ sudo gedit /and so forth/puppetlabs/code/environments/manufacturing/manifests/web site.pp

Put up the content material beneath.

node 'puppetagent' { # Applies solely to talked about node. If nothing talked about, applies to all.

    file { '/house/check': # Useful resource kind file

            guarantee => 'listing', # Create a listing

            proprietor => 'root', # Possession

            group => 'root', # Group Title

            mode => '0755', # Listing permissions

         }

}

Now run the command beneath in order that an agent can get in contact to grasp and get the configurations. After operating this command it ought to create that listing on the agent node.

On Agent Node

geekflare@puppet-agent:~$ sudo /decide/puppetlabs/bin/puppet agent --test

[sudo] password for bestnich:

Information: Utilizing configured setting 'manufacturing'

Information: Retrieving pluginfacts

Information: Retrieving plugin

Information: Retrieving locales

Information: Caching catalog for puppetagent

Information: Making use of configuration model '1571333010'

Discover: /Stage[main]/Essential/Node[puppetagent]/File[/home/test]/guarantee: created

Discover: Utilized catalog in 0.05 seconds

Carried out ls command to verify if the director has been created efficiently.

geekflare@puppet-agent:~$ ls -l /house/

complete 32

drwxr-xr-x 13 geekflare geekflare 4096 Jul 19 08:06 geekflare

drwx------ 2 root root 16384 Oct 23 2018 misplaced+discovered

drwxr-xr-x 23 geekflare geekflare 4096 Oct 17 11:02 geekflare

drwxr-xr-x 2 root root 4096 Oct 17 13:23 check

drwxr-xr-x 2 username username 4096 Jun 29 09:38 username

There you go!

Conclusion

This was a easy instance to reveal its operation. However think about a much bigger state of affairs, the place you could set up or apply a sure configuration on tons of of servers. Puppet may also help you obtain this in minutes.

In the event you’re concerned in automation and desirous about studying extra, take a look at this Udemy course, which talks about Ansible, Puppet, and Salt.

Leave a Comment

porno izle altyazılı porno porno