SEM tips: how to get started easily
Introduction
The purpose of this post is to show that search engine marketing (SEM) can be started rather easily. Small businesses, like our company, may not have resources (money, knowledge, time etc) to spend on marketing and consultancy so I’m hoping that sharing this experience will help and encourage other SEM newbies!
This blog post is in no means a complete SEM tutorial. There are plenty online, paid and free (I’ll list some in the next chapter). My idea instead is to focus on the main points for getting started with SEM and also to enlighten some of they key concepts and terms. I’m trying to write down things that I hope I had heard of before starting with SEM!
Making per-link DNS servers pushed from OpenVPN to systemd-resolved survive NetworkManager connection changes
Update: the problem described in this article seems to be resolved in Fedora 36 (NetworkManager 1.38.0-2.fc36). It is still present in Fedora 35 (NetworkManager 1.32.12-2.fc35).
Update: there a companion article about solving this problem for Wireguard in here.
In an the Manage Linux client DNS settings in OpenVPN and Wireguard article we described how to use the update-systemd-resolved script to update systemd-resolved per-link DNS servers automatically based on DNS servers pushed from an OpenVPN server. This is very convenient if you have to be connected to multiple remote locations each with their own DNS servers and zones.
Terraform 0.11->0.12 migration: stabs at the state file
We maintain a rather complex AWS environment built with Terraform that uses nested modules and lots of per-resource provider configurations. Recently the pain of staying with Terraform 0.11 became too much, so we had to start the migration to Terraform 0.12, with 0.13 going to follow soon after. In general the official upgrade instructions were pretty good. Of course there was a lot of manual fixing that had to be done, and as I did not keep detailed notes I can’t recall all the steps I went through. But I think all or most of those can be found from other sources.
Using Puppet Bolt to apply roles to nodes, part 1
NOTE: this article is somewhat outdated. Please refer to Serverless Puppet with control repo, Hiera, roles and profiles and Puppet Bolt instead.
Puppet Bolt is a designed to be an orchestration tool, but it can be used for configuration management as well. For example you may have a small environment of handful of nodes where having a dedicated Puppet server would be an overkill, or you have some nodes in the infrastructure where you can’t or don’t want to install a Puppet Agent.
Improving Vim's Puppet integration
A recent package upgrade seemed to break Puppet syntax highlighting horribly on my Fedora 32 laptop. Not only did syntax highlighting not work, it was actually completely wrong and confusing. It seemed as if the Puppet file type detection was missing, so vim was probably using some a syntax highlighter for a wrong type. To see which file types are enabled I used :set filetype followed by a couple of tabs (more details on StackExchange).
LibreNMS image 1.65-20 released

LibreNMS image version 1.65-20 is now available in the AWS Marketplace. It is a a Cloud image that runs a pre-configured LibreNMS network monitoring system. It is the easiest and fastest way to get started with LibreNMS.
Pricing is based on usage: there are no up-front license fees or other costs. This means you can test it with zero risk. Also, there is currently a free trial!
I search
The keys on your laptop are the kind of item you don’t pay any attention until you lose them. The “O” key came off from my Carbon X1 keyboard a few days ago. I was able to postpone the ultimate solution by a couple of days by just pushing the “O” back. But doing that five times a day got old soon. So, I took of another key - “I” - to figure out the correct alignment for the metal hooks that hold the plastic hinges in place. That was a good idea on paper except that I was able to break the hinge when installing the “I” back. After a failed attempt of gluing the hinge together with a generous amount of epoxy I gave up and decided to order replacement keys.
Restrict access to a location in Apache reverse proxy with TLS
Ever had a case where you needed to use a name based Apache reverse proxy in front of some application server, while restring access to some proxied location at the same time? Here’s how to do it.
First define a virtual host:
<VirtualHost *:443>
ServerName myserver.example.com
Set the request headers (you are of course using TLS, aren’t you):
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
Proxy to some internal address, here to localhost port 8080:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
Restrict access to the host or networks you need to:
<Location "/my/location/">
Require ip 10.0.0.0/8
</Location>
Note: this will work with Apache 2.4 and up. With older versions you can use the same idea.
Debugging Packer provisioning
Packer is an excellent tool for automating creation of machine images such as AWS AMIs or Docker container images. This is particularly useful when you need to scale up by spinning up instances on-demand or if you want to package software that is challenging to manage with a configuration management system. It is also extremely useful when creating actual packaged product for AWS Marketplace, for example.
In Packer you take a “base box” such as Ubuntu 18.04 base image and modify its contents with provisioning, for example to install and configure software on the image. Several different types of provisioners are supported, including but not limited to shell scripts, Puppet manifests and Ansible playbooks. The concept of provisioners is the same as in Vagrant and Terraform.
Taming apt timers in Ubuntu 18.04
Ubuntu 18.04 AWS images - and probably other Cloud images as well - have automated upgrades turned on. This is done via two systemd timers, apt-daily.timer and apt-daily-upgrade.timer. The timers kick of periodically as well as when an instance is rebooted. This sounds reasonable until you are provisioning something: you’re unable to install or configure any packages while apt and/or dpkg are running. With a really fresh cloud base image this may not be an issue, but when the base image gets sufficiently old then apt-get upgrade starts taking enough time to cause issues.