In my old blog with octopress I used the tag cloud plugin with logarithmic distribution for calculation of tag sizes. The rendered tag cloud was pretty nice from the optic side. All existing approaches I saw for hugo(1, 2) were not so nice, the main reason is the usage of logarithmic distribution in the calculation of tag size.

Read more →

GitHub Pages are quite popular for hosting static sites built by site generators. However, GitHub Pages have some limitations:

  • no SSL/TLS for custom domains
  • proper support of Jekyll sites only

One possible alternative is to use GitLab Pages, which does not have this limitations. Another possible alternative is to use Travis CI and deploy the site to some shared www hosting. Hetzner offers some good plans, they also include a free-of-charge SSL certificate.

This blogpost describes how to deploy a static site hosted on GitHub, built with Hugo and Travis CI and deployed via FTPS to Hetzner www space.

Read more →

Test Kitchen is a common tool for integration testing of Chef cookbooks. Usually a combination of Vagrant&VirtualBox is used to bring up the VMs. This works well for local development setups, but what about Continuous Integration environments? You can find several approaches how cookbooks can be tested in the CI:

Well, but what about the case you want to use Vagrant&VirtualBox in the CI too? There are some reasons for this approach:

  • Maybe you can not use public cloud providers for some reasons and do not have your own on-premise cloud like OpenStack
  • Maybe you want to use the same setup/technologies in the CI and locally as you want be able to easy reproduce errors and problems

GitLab is quite often used in the enterprise environments, where restrictions on the public cloud usage may apply. GitLab has its own GitLab CI, which can be easily used for cookbook testing.

This post covers a basic GitLab CI setup with Test Kitchen and Vagrant&VirtualBox as backend.

Read more →

Maybe you are also playing aroung with IPv6 and want to setup IPv6 only network and asking yourself how to reach the IPv4 Internet? Right, with DNS64 and NAT64. This blog post gives an overview about a such setup on CentOS/RHEL 7 with bind and tayga.

Read more →

I have a non-flat network with subnetworks at home and I wanted to enable IPv6 in dual stack mode for the desktop systems. This blog post describes this setup and configuration for:

  • MikroTik CRS125-24G-1S-IN layer 3 switch as switch/router for internal networks (RouterOS 6.36.4)
  • AVM FritzBox 7390 as internet router (FRITZ!OS 06.51)
  • DT as ISP with native IPv6 in dual stack mode and dynamic IPv6 prefixes

Read more →

Chef has different execution phases. Especially the compile and converge phase are important when writing cookbooks: the resources are collected in the compile phase and are executed in the converge phase.

In some special cases you might want to have dynamic resources, which are created and executed in the converge phase. The main background is that you want to react on something you known in the execution phase only.

Given a situation where you want to cleanup configuration files, which get installed by some package during a chef run (real examples might be apache on debian or freeradius on RHEL). You can try to solve this situation like this:

package 'freeradius'

# Our module configuration
template '/etc/raddb/mods-available/eap-tls' do

Dir.glob('/etc/raddb/mods-available/*').each do |mod_path|
  file_name = File.basename(mod_path)
  next if file_name == 'eap-tls'

  file mod_path do
    action :delete

However this will not work: you try to glob over /etc/raddb/mods-available in the compile phase, but this path doesn’t exist as freeradius gets installed in the converge phase.

Read more →

Inspec is a modern framework for infrastructure testing. It can be used as replacement for Serverspec.

Usually the inspec tests are describing a particial resource:

describe file('/etc/passwd') do
  its('mode') { should cmp '0644' }

However in some case it might be useful to use the common RSpec style with nested describe-context-it statements.

Read more →

Sometimes you might need some generic functions, which are used in several cookbooks in your environment. In this case it makes sense to create a cookbook, which contains this functions.

Read more →

Configuring chefdk


Chef Development Kit contains a chef-dk gem with chef executable. chef generate is a pretty usefull command for generation of skelettons. Per default the information like author, license or email looks like this:

$ cat testcookbook/metadata.rb
name 'testcookbook'
maintainer 'The Authors'
maintainer_email ''
license 'all_rights'

How to get your own data instead of this defaults?

Read more →

Hybrid suspend is a suspend mode, where suspend-to-disk and suspend-to-ram are executed together in the same time. Its a quite usefull mode for notebooks:

  • fast wake up because of suspend-to-ram
  • no data loss in case of empty battery during the suspend

Read more →