This morning I was messing around with Docker and I wanted to build me a nice, clean container with Ubuntu in it, to test Ansible thingies. I’ve done that before and everything worked as a charm. Until today.
I have this Dockerfile (I’ve stripped it to the bare bones that still
fail):
FROM ubuntu:latest
MAINTAINER Ton_Kersten
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install git git-flow
RUN apt-add-repository -y ppa:mozillateam/firefox-next
RUN apt-get install -y firefoxAnsible @ Loadays
Last Saturday I attended Loadays in Antwerp, Belgium.
After listening to Jan Piet Mens’s talk about Ansible, I was up for it.
At 11:30 sharp, I started my own presentation for an almost packed room. It’s called Ansible, why and how I use it and you can find it on SpeackerDeck.
It was a lovely talk, with a very knowledgeable crowd.
Please, have a look at it and if you have any questions, let me know.
Ansible @ CfgMgmtCamp
Last couple of days I attended Configuration Managememt Camp in Ghent, Belgium. On Monday morning we started of with presentations of Mark Burgess (CFEngine), Luke Kanies (Puppet) and Adam Jacob (Chef). Good talks about the future of things.
After lunch it got nerdy ans I joined the Ansible room, to see how things went and at 17:00 I started my own presentation for a completely packed room. It’s called `Ansible, why and how I use it' and you can find it on SpeackerDeck.
LPI Certification
It’s been a while since the last post, but I’ve been very, very busy.
And in the meantime I also found some time to take the LPI-102 exam. This resulted in a Pass and now I’m officially LPI1 certified.
Well, let’s see what’s next. Puppet exam, Ansible training, LPI2, Python ………
So much to learn, so little time.
Puppet Facter Fact
Look at me, I made a Puppet Facter Fact!!!
With a lot of thanks to Andrew Beresford who started the initial code. I just tweaked it.
What it does is rather simple, it finds the expiration date of the SSL
certificate of this host and returns the expiration date and time when
there are less than 30 days left. Otherwise it just returns a --sign.
In the Puppet manifest I check if it’s this --sign and if not I
generate a warning.
Ansible Day in Antwerp
Today I’m attending the first full day Ansible configuration meeting. This meeting is in Antwerp, Belgium, a drive of almost 2 hours. Thanks to Multi Mho (Maurice Verheesen) I didn’t need to drive, he wanted to try out his nice, new car. It drives perfectly and we arrived about 30 minutes early.
For a first meeting of a new tool there where a lot of attendants, amongst others (and I don’t want to forget anybody, so I won’t even try to give a complete list), but below are the people I think that where there.
Puppet User Group
Yesterday I attended the first meet up of the Dutch Puppet User Group and I gave a talk about how to start with Puppet.
It was called: Puppet deployment, an introduction and the PDF slideshow can be viewed or downloaded from speakerdeck.
If you have any comment, please send me an email.
We-Blog with clouds
Today I received an email from Chris Hackenschmidt with a patch for a category cloud for my We-Blog program.
Of course I have implemented that and you can see it in action on the right.
So, a new version of We-Blog is out, currently still 0.9, with a big Thank You to Chris.
Download it and enjoy.
Installing Pandoc
John Macfarlane released a new version of Pandoc that has a lot of new enhancements. A lot of things have changed in the Markdown input types and it’s now compatible with PHP Markdown. This is very nice, because a lot of implementations use the extensions defined by PHP Markdown.
I downloaded the dmg file to install it on my MacBook Pro and it works like a charm.
So, I decided to install it on my new CentOS 6 server to build documents there. Well, I was in for a nice surprise.
rsync on a not standard port
Today a colleague asked me to sync some files to a server that is not
listening on SSH port 22.
I normally create a configuration entry in my ~/.ssh/config file, like
Host tosync
Hostname syncer.example.com
Port 1234
User syncuserand then command
rsync -va --progress --inplace . tosync:But this time I didn’t want to create the entry in my SSH configuration,
because I need this trick in a script. So I started to read the rsync
manpage and after some experimenting I found
Ansible issue playbook
Playing with Ansible I did get the idea to make a
nice welcome message when you log in to a server. This message needs to
be placed in a file, which is configured in /etc/ssh/sshd_config with
the banner option. I call this file /etc/issue.
Of course I want to deploy this file with Ansible, so I first defined
an entry in the hosts file. This looks like this:
# Settings for master
[master]
master
# Variables for master
[master:vars]
location=cow shed
room=ESX5i
issueremarks=This is the master Ansible server. Please be carefull!!Ode to the Haggis
Hendrik Jan Thomassen not only sent me the tail of Haggis hunting but also a nice ancient poem as an ode to Haggis.
Here it is:
[Read More]The haggis season has begun
and all over Scotland every gun
Is taken down with loving care
Though some prefer the haggis snare
The haggis are a wiley lot
That’s why they are so seldom shot
Then hidden in the highland heather
Great hairy Clansmen crouch together
And having laid the haggis bait,
a life-like haggis on a plate,
One cries out loudly:’There’s the noo'
Which means the haggis are in view
It’s flying upside down and low
The guns all fore but they’re too slow
For thought it’s rather old and fat
They’re awful hard to hit like that
And as it flies off into the mist
Great hairy clansmen shake their fists
Scream their curseds to the crags
Stamp on empty haggis bags
And so the haggis get away
to live until next Christmas day
'`Come back haggis'’
And that’s the reason it is so rare
This strange traditional Scottish fare
We’re that haggis hi hooray
It’s hog’manay not Christmas day
How to hunt the Haggis
Most people are familiar with my love of Scotland, single malt and (of course) haggis. But most people do not have a clue what haggis is and when you tell them, they walk out in disgust.
But a colleague of mine found out that haggis is just an animal that can be hunted in the Scottish Highlands.
This is how it’s done:
[Read More]…..asked me how the haggis were hunted so I explained that there were two types of haggis, who, because they lived on the steep slopes of the Scottish Highlands, developed legs of different lengths on their left and right sides depending upon which way they travelled round the mountain to graze. With the knowledge of which type of haggis one was hunting, the procedure was quite simple.
Resize a partition
I often have to increase the size of a virtual disk on a virtual machine. But I always seem to forget how to do it. I guess I have done it over a 100 times and I cannot remember exactly how I did it. So this blog entry is to help people on how to do this and as a reminder to myself.
This example is done on a virtual machine with CentOS 6, but it can be
done on every Linux. And in the fdisk examples I have left out some of
the not to interesting lines.
MySQL backup error
After upgrading my MySQL database server from version 5.0.95 to 5.1.61 I suddenly got these errors in the backup logging.
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `EVENTS`': Cannot
proceed because system tables used by Event Scheduler were found damaged at server start
(1577)
dbdump gave errorcode 2 for database 'information_schema'
2012-08-09 09:07:53 -> Finished MySQL backup on host 'xxx.tonkersten.com'Hmm, no idea what has happened. I hope I didn’t do something stupid.
CDE is Open Source
Today the classic, and old, Common Desktop Environment (a.k.a. CDE) was released into the Open Source world.
You can get the very alpha version at SourceForge.
I haven’t been able to get a running version by now, but I keep trying.
Good job, guys.
git status in the prompt
Working with git a lot I decided I needed some git status in my
prompt.
I searched the web and some solutions where almost what I wanted and this one by Sebastian Celis came very close.
But it didn’t work with my version of zsh, because that didn’t seem to
understand the =~ operator.
I also think Sebastian makes things over complicated and so I changed some things aroud.
This is what I came up with:
No network on CentOS 6
When installing a minimal CentOS 6 system, minimal really, really means minimal. After a reboot the network interfaces do not start, so network connectivity is non existing.
Looking into that I noticed that the file
/etc/sysconfig/network-scripts/ifcfg-eth0 contained
DEVICE=eth0
HWADDR=11:22:33:44:55:66
NM_CONTROLLED=yes
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=noThe lines that mess things up are NM_CONTROLLED=yes meaning the
interfaces are managed with NetworkManager, which isn’t actually
installed as part of a minimal install. You want a minimal install, you
get a minimal install. And ONBOOT=no, meaning do not start the interface on boot.
How stupid is that!
New version of We-Blog
Today I released version 0.8 of We-Blog.
I created a Google project and a Google discussion group.
Version 0.8 is now the stable branch and 0.9 the development branch.
What’s new?
Well, to be really honest, not that much. I fixed some minor bugs and
did a lot of code cleanup. Although the original code of Jaromir was
very nice, there was some room for improvement. I removed a lot of
double functions and variables and put them all together in a We.pm
Perl module. Saves a lot of work with an update.
Finding key codes on Linux
It often happens that I get into a situation where I need to know key
codes of pressed keys. On my Mac that’s simple. Just use the Key Codes
by Many Tricks.
But on Linux I constantly was trying to find out which key produced what.
So I ended up writing a program for that. I started of in the shell, but that ended up being rather tricky and unnecessary complicated. So I redid the whole thing in C.
Burning VIDEO_TS on OSX
I was trying to burn a folder with a VIDEO_TS directory onto a DVD.
But in a way that it will start in a normal DVD player as well as
starting automagically. And this all had to be done on Apple’s OSX.
I googled a little and tried some things and this is what I can up with:
hdiutil makehybrid -udf \
-udf-volume-name DVD_NAME \
-o MY_DVD.iso \
/path/to/VIDEO_TS/parent/folderWhat the *F*
I’m registered as a Computable expert and as required I do have a profile page on their website.
And now I get this (partially in Dutch):
Beste Ton Kersten,
Via je profielpagina op Computable.nl stuurt gift d evals je onderstaand bericht.
Met vriendelijke groet, Redactie Computable
Contact me with this email giftevals@yahoo.com
[Read More]Hello am Gift i am 23 years old single. After seen your profile i became interested in you,so i decide to write you for us to build a good relationship if you don’t mind,you can email me but (giftevals@yahoo.com)
New header
Today I’ve posted a new version of the header program.
Nothing really fancy happened, just added support for zonefiles, in
this case the Bind ones.
It’s available at the usual places.
sed tips and tricks
I’m creating a Puppet Starter Kit with some standard manifests
included and a complete set of documentation. All documentation should
be written in Markdown
and will be served by Markdoc. But I want to
generate all Markdown files from the Puppet manifests, so I only need to
document the manifest file. Generating the Markdown is not that
difficult, except that I kept ending up with empty lines at the top of
the manifest code and I wanted to get rid of those. Of course this
should be done with sed, because the whole generation process is
written in bash. When playing around with sed I found
Puppet updates
When working with Puppet and a VCS (like git and SVN) it’s nice to
have a simple way of updating the Puppet tree.
My tree is always in /etc/puppet and owned by user and group
puppet. User puppet is allowed to checkout the complete tree from
git or subversion.
I have created two one-liners to update the complete tree and make sure all rights are still correct.
update_svn ~ \{.bash} #!/bin/bash # update_svn su - puppet -c `cd
/etc/puppet; svn up; cd doc; ../bin/gendoc' ~