LAMP automation with puppet

Updated 13 April 2017

Today’s system engineers and still stuck with managing configurations using bash scripts??

Well, it does not sound good. Go and get everything puppetized !!

So first of all, why a configuration automation system and how does puppet play an important role in this context?

One of our web developers came to me and asked, “How can I quickly model a PHP application without having to bother you for a development environment?”

I thought it for a while and came to the conclusion that from developer’s point of view it is not feasible to ask for a new environment every time to do the work and being a system engineer i could think that the whole process of managing configurations manually is quite cumbersome task. Luckily, it does not have to be !! Here comes the existence of puppet with which i could get everything solved.

Puppet is a configuration management tool that is extremely powerful in deploying, configuring, managing, maintaining, a server machine.

So here you are : LAMP automation with puppet !!

Using this puppet module, any system engineer, or anyone for that matter, can quickly launch a LAMP environment in minutes to get them going on with applications at developer’s end.

BEFORE YOU BEGIN :

Before you go ahead with this module, make sure that you have puppet master and agent installed on your host machines and agent contains a certificate signed by the puppet master. All you need to do is to get this module installed either from github or puppetforge.

Puppet version >=3.4.0 & Ubuntu 14.04/12.04 is recommended for the following configurations.

PUPPET MASTER :

MANIFEST FILE : (The location where your puppet code is written.They are standard text files saved with .pp extensions )

Path => [/etc/puppet/modules/lamp/manifests/init.pp]

Now, you just need to include this file into your main manifests.

Path => /etc/puppet/manifests/site.pp

The above code signifies that lamp module containing the puppet code should be included for all the requesting puppet-clients. If you want to include your lamp module only for some specific nodes, you need to replace ‘default’ with the hostname of the requesting nodes.

To install the entire module from puppetforge :-

https://forge.puppetlabs.com/webkul/lamp

For reference :-

https://github.com/nainajohari/puppet-lamp

Now, you have to restart the service using the following command :-

PUPPET AGENT :

First of all, you must ensure that puppet client is aware of its respective puppet master.To introduce a client machine to the puppet server,make an entry in client’s main configuration file as mentioned below :-

Path -> /etc/puppet/puppet.conf

where, puppetm is the hostname of the respective puppet master.

Now, puppet agent can send a request to puppet master using the following command :-

Note

Here, we have assumed that puppet agent contains a certificate signed by the puppet master.

By simply running this single command, the entire puppet code of master’s main manifests will be executed on puppet client.

Repeat the same for multiple puppet clients.

 

FOR ANY TYPE OF QUERY OR HELP, KINDLY CONTACT US

Category(s) Uncategorized
author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project






    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home