Setup Puppet Certs Autosign Kodekloud

Question: The Puppet server package is already installed on puppet master i.e jump server and the Puppet agent package is already installed on all App Servers. However, you may need to start the required services on all of these servers.

    Configure autosign configuration on the Puppet master i.e jump server (by creating an autosign.conf in the puppet configuration directory) and assign the certificates for master node as well as for the all agent nodes. Use the respective host's FDQN to assign the certificates.

    Use alias puppet (dns_alt_names) for master node and add its entry in /etc/hosts config file on master i.e Jump Server as well as on the all agent nodes i.e App Servers.

Notes: :- Please make sure to run the puppet agent test using sudo on agent nodes, otherwise you can face certificate issues. In that case you will have to clean the certificates first and then you will be able to run the puppet agent test.

:- Before clicking on the Check button please make sure to verify puppet server and puppet agent services are up and running on the respective servers, also please make sure to run puppet agent test to apply/test the changes manually first.

:- Please note that once lab is loaded, the puppet server service should start automatically on puppet master server, however it can take upto 2-3 minutes to start.

Solution: 

In jump server at first edit the hosts file

vi /etc/hosts

Add puppet with the jump server

172.16.238.3    jump_host.stratos.xfusioncorp.com jump_host puppet

Then ping it

ping puppet

Then create an austosign.conf

vi /etc/puppetlabs/puppet/autosign.conf

jump_host.stratos.xfusioncorp.com

stapp01.stratos.xfusioncorp.com

stapp02.stratos.xfusioncorp.com

stapp03.stratos.xfusioncorp.com

Then restart puppet server

systemctl restart puppetserver

systemctl status puppetserver 

Finally sign the certificates

puppetserver ca sign --all

Next, go to all appservers (stapp01,stapp02, stapp03)

Then in all appservers edit the hosts file

vi /etc/hosts

Add puppet with the jump server

172.16.238.3    jump_host.stratos.xfusioncorp.com jump_host puppet

Then ping it

ping puppet

Restart the puppet

systemctl restart puppet

systemctl status puppet

Validateby running puppet agent

puppet agent -tv

Then go to jump servers and run

puppetserver ca list --all

You can see the signed certificates of jump server, stapp01, stapp02, and stapp03

 

 

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

1 comments:

  1. C is a high-level programming language that is widely used for developing system software, embedded systems, and applications. It was developed by Dennis Ritchie at Bell Labs in the early 1970s as an extension of the B programming language. C has become a popular language due to its efficiency, simplicity, and flexibility.
    Some of the key features of C language are:
    Portability: C is a portable language, which means that programs written in C can be compiled and executed on different platforms with little or no modification.
    Low-level programming: C allows direct manipulation of memory, making it suitable for writing system-level software such as operating systems, device drivers, and compilers.
    Flexibility: C provides a wide range of data types, control structures, and functions, which makes it suitable for a variety of applications.
    Efficiency: C is a compiled language, which means that programs written in C can execute much faster than interpreted languages.
    Some of the concepts that you will learn while studying C language include:
    Data types: C provides a variety of data types such as int, float, double, char, and pointers.
    Operators: C provides various operators such as arithmetic, relational, logical, bitwise, and conditional operators.
    Control structures: C provides control structures such as if-else statements, switch statements, while loops, for loops, and do-while loops.
    Arrays and Strings: C provides the ability to declare, initialise, and use arrays and strings.
    Functions: C allows defining and calling functions, which can be used to modularize the code.
    Pointers: C provides the ability to declare, initialise, and use pointers, which are used to manipulate memory directly.
    Structures and Unions: C provides the ability to define and use structures and unions, which can be used to group related data.
    File handling: C provides the ability to read and write data to files, which is useful for handling large amounts of data.

    ReplyDelete