Thursday, January 19, 2012

Getting started with Puppet on CentOS 6

This is a how to for setting up Puppet on machines running CentOS 6. Instructions were tested on CentOS 6.2 machines.

Introduction

Instructions below assume you have two machines named master.example.com which will be the Puppet master and client.example.com which will be the Puppet client.
Puppet requires machines to have full qualified domain names (FQDN). Also, the clocks on machines must be in sync. Enable NTP daemon on both machines to sync the machine clock to NTP servers.
# service ntpd start

Prerequisites

Puppet requires "ruby" and "ruby-lib" packages installed.
To view puppet command-line help, you need "ruby-rdoc" package installed.
# yum ruby ruby-lib ruby-rdoc
Puppet is not available in CentOS "base" repository. PuppetLabs provides a Yum repository for puppet. You can install a RPM provided by PuppetLabs to configure the Yum repository.
# wget -c http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm
# yum install puppetlabs-release-6-1.noarch.rpm

Puppet Server

Install Puppet server package on master.example.com
[root@master ~]# yum install puppet-server
Start the Puppet master daemon.
[root@master ~]# service puppetmaster start

Puppet and SSL

Puppet clients uses HTTPS to communicate with the server. In order to communicate with the server Puppet clients require valid SSL certificate. Puppet master daemon acts as CA (certificate authority) for SSL certificates.
During the first run of the puppet client it generates a SSL certificate and sends to puppet master.
[root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug --server=master.example.com
Before the client can successfully connect to the master, master has to sign the client certificate.
[root@master ~]# puppet cert list --all
[root@master ~]# puppet cert --sign client.example.com

Puppet Client

Install Puppet client package on client.example.com
[root@client ~]# yum install puppet
Test Puppet client from the command-line. We will assume that the master has valid signed certificate for client.example.com.
[root@client ~]# puppet agent --help
[root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug --server=master.example.com
See the "puppet agent --help" to understand the command line flags.

In the next post, we will see how to setup a "helloworld" example for Puppet.

Monday, October 10, 2011

Location of userContent.css in Linux and Windows 7

Windows 7

C:\Users\{username}\AppData\Roaming\Mozilla\Firefox\Profiles\{profile-directory}\chrome
E.g.
C:\Users\arun\AppData\Roaming\Mozilla\Firefox\Profiles\4s7v2bl8.default\chrome

Linux

/home/{username}/.mozilla/firefox/{profile-directory}/chrome
E.g.
/home/arun/.mozilla/firefox/4s7v2bl8.default/chrome

Sunday, October 9, 2011

View Gmail conversations in fixed width font using Firefox

Add the following lines to "$HOME/.mozilla/firefox/{profile-directory}/chrome/userContent.css" to view Gmail emails in fixed width font using Firefox.
@-moz-document domain(mail.google.com)
{
    /* GMail messages and textarea should use fixed-width font */
    .gs .ii, textarea.Ak {
        font-family: MonoSpace !important;
        font-size: 10pt !important;
    }
}
That's it. Enjoy.

Friday, November 5, 2010

Google Yum repository configuration on Fedora

To install and update Google programs like Chrome and Picasa using Yum, create a new configuration file named "google.repo" under /etc/yum.repos.d/. The contents of "google.repo" would like below.

[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

With this setup in place, you should be able to install Google Chrome using the following command.

# yum install google-chrome-unstable
or
# yum install google-chrome-stable

For more information, refer to [1].
1. http://www.google.com/linuxrepositories/yum.html

Monday, July 13, 2009

Accessing Microsoft Exchange with Evolution on Fedora

Install Evolution if it not already installed. To make Evolution work with Microsoft Exchange you will need to install "evolution-exchange" package.

$ yum install evolution-exchange

Launch Evolution.
Go to Edit->Preferences->Mail Accounts
To create a new account choose "Add"
"Mail Configuration" window click "Forward"
"Identity" enter your name and email address
"Receiving Email": Choose Server Type: Microsoft Exchange
User Name: domain/username
OWA URL: https://webmail.example.com/exchange/ Click Authenticate. Click Forward.
"Receiving Options": The defaults are fine. If you want to customize them you can do so later. Click Forward
"Account Management": The defaults are fine. If not, choose a name. Click Forward
In the next screen, once you click "Apply" your account will be setup.

Wednesday, July 1, 2009

Fedora 11 yum plugins

Two yum plugins which are not installed by default, but which very useful are "fastestmirror" and "presto".

$ yum install yum-plugin-fastestmirror
$ yum install yum-presto

As the name indicates, the "fastermirror" plugin finds the fastest mirror to download the packages. Combined with the "presto" plugin which only downloads delta rpms instead of the full rpms it significantly speeds up yum updates.

Friday, June 26, 2009

History and page up/down keys in Fedora

In Fedora, the page-up and page-down keys are mapped to beginning of history and end of history which I don't find very useful. These entries are in "/etc/inputrc".

"\e[5~": beginning-of-history
"\e[6~": end-of-history

I prefer to have them mapped to search history forwards and backwards. It allows me to type the beginning of the command and hit page up/down and bash will auto complete the command by recalling the command from history. Here is relevant parts of "/etc/inputrc" which achieves this effect.

"\e[5~": history-search-backward
"\e[6~": history-search-forward