Saturday, August 31, 2013

Puppet: getting started with hiera (hiera example)

Official doc here

I don't like hiera, but it's better than hardcoding configuration in .pp files.
First attempt:
vi hieratest.pp
$pippo = hiera('pippo')
notify { "${pippo}" : }

I run "puppet apply hieratest.pp" and I get:
Hiera config file /etc/puppetlabs/puppet/hiera.yaml not readable at /root/puppettests/hieratest.pp:1
then I do vi /etc/puppetlabs/puppet/hiera.yaml and I enter:
:hierarchy:
    - hosts/%{::fqdn}
    - environments/%{environment}
    - common
    - users

:backends:
    - yaml

:yaml:
    :datadir: '/etc/puppetlabs/puppet/hieradata/'


and rerun "puppet apply hieratest.pp" and I get:
Could not find data item pippo in any Hiera data file and no default supplied at /root/puppettests/hieratest.pp:1
Better than before :o)
so I do
mkdir /etc/puppetlabs/puppet/hieradata/
vi /etc/puppetlabs/puppet/hieradata/common.yaml
(remark: common is a member of the hierarchy in the hiera.yaml' and I enter
pippo : 'hello world!'

Again "puppet apply hieratest.pp":
notice: hello world!
Hurrah! My first hiera-based module!


Friday, August 30, 2013

Gridlink Datasource registering with ONS daemons

When you have Gridlink DS, you will see in the logs this debug message (of course if your log level is debug :o) )

<BEA-001556> <Data Source ACME_ConfigDS for service o01osb_app.acme.com registering with ONS daemons using configuration string nodes=acme535:6200,acme536:6200,acme531:6200,acme532:6200,acme533:6200,acme534:6200

In our case, this would take 30 seconds for each DS, and make the restart of the cluster painfully slow.

Check that each individual node in the list, running ONS agent, is actually reachable (no firewall!). Check also that it's up and running.

Vertical Tabs in Internet Explorer

I am forced to use Internet Exploder lately, and I go literally mad with its non-customizeability of tabs: they are stuck on the top, stealing valuable vertical space.

As very well highlighted in this post:

http://pim.famnit.upr.si/blog/index.php?/archives/301-Web-browsers-on-Windows-OS-comparison-of-vertical-vs.-horizontal-tabs.html

the most ergonomic browser IMHO remains Firefox.

The good news is that you can install Firefox Portable Edition without admin rights.... FAREWELL IE!!!