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 firefox
[Read More]
Ansible @ Loadays
Posted on April 5, 2014
| 1 minutes
| 132 words
| Ton Kersten
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.
[Read More]
rsync on a not standard port
Posted on January 21, 2013
| 1 minutes
| 106 words
| Ton Kersten
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 syncuser
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
[Read More]
Resize a partition
Posted on October 19, 2012
| 3 minutes
| 551 words
| Ton Kersten
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.
[Read More]
git status in the prompt
Posted on July 23, 2012
| 2 minutes
| 289 words
| Ton Kersten
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:
[Read More]
No network on CentOS 6
Posted on July 17, 2012
| 1 minutes
| 171 words
| Ton Kersten
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=no
The 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!
[Read More]
Finding key codes on Linux
Posted on July 4, 2012
| 2 minutes
| 319 words
| Ton Kersten
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.
[Read More]
sed tips and tricks
Posted on June 22, 2012
| 3 minutes
| 599 words
| Ton Kersten
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 ~ sed
`/./,$!d' filename ~ which, I think, is genius in it’s simplicity.
After you find something, do not remove. Life in UNIX and Linux is nice!
[Read More]
Puppet updates
Posted on June 18, 2012
| 1 minutes
| 155 words
| Ton Kersten
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' ~
[Read More]
Updated Pygments
Posted on May 16, 2012
| 1 minutes
| 185 words
| Ton Kersten
I’m using Pygments for quite some time now and I just noticed there was
a new version available (1.5). I installed that and I was wondering if
there would be a lexer included for Puppet. Well, it wasn’t, but a short
Google action directed me to the
Pygments lexer for the
Puppet DSL.
Of course my old CentOS 5 system with Python 2.6 doesn’t want to install
this, so I hacked the Puppet lexer into Pygments.
[Read More]
FreeBSD PXE boot Part 2
Posted on June 9, 2011
| 6 minutes
| 1150 words
| Ton Kersten
Some posts ago I wrote that I was busy to find out how a FreeBSD machine
can be PXE-ed from a Linux server. Well, I found that some time ago, but
I didn’t have the time to type it here, yet. Well, as always, once you
know how it’s done, it’s quite simple. But because a lot of the FreeBSD
documentation is very old (talking about FreeBSD 4, 5 and 6) it takes
some time to find it all.
[Read More]
Why does Puppet keep breaking?????
Posted on May 3, 2011
| 2 minutes
| 334 words
| Ton Kersten
In my previous post I stipulated that I was PXE booting FreeBSD. Well
this works and I will come back on that. But for the configuration I
want to run Puppet. Nice and easy config management.
On my server I run Puppet from source. This because the server is a
CentOS box with a very old Ruby and Puppet. So I decided to run the
Puppet client from source as well. Getting the git repo is easy enough
and installing Puppet should not be to hard.
[Read More]