I had to Google this today and was kind of surprised by how many odd workarounds are used for this one, and most of them seem wrong. What is it? The error will create a traceback and it will look similar to this: Fontconfig error: No writable cache directories time=2024-08-05T17:57:28.924000 level=ERROR location=__init__.py:75:handle_exception msg="Error" request_id="" exception="Traceback (most…
So, here’s a fun problem I ran into at work: We use Github Actions to deploy all our services to Kubernetes. And in order to do a deployment, we have kube configs (as secrets) setup to connect to a Kubernetes cluster when a workflow runs. The Kubernetes config has an expiration date and will become invalid when the Kubernetes certificates are rotated (k0s takes great care of that). When they…
In the spirit of “this took me way too long”, here’s how to boot an instance with a CD-ROM on OpenStack, using Terraform. Why would I need this? In a perfect world, I have templates to bootstrap instances. Means, the instances are ready to go when booted. I customise them with cloud-init and let them do all kinds of cool (or necessary) stuff like configuring the network, setting…
Here’s a few things I learned and did when I encountered the very verbose “Resource not found” error from Terraform. Debug your Infrastructure as Code More logs? This is my obvious choice or go-to. Terraform comes with different log levels though it will say itself that every level but TRACE is not to be trusted? 2021/03/02 09:21:33 [WARN] Log levels other than TRACE are…
When I googled how to install private roles using ansible-galaxy, I found suggestions such as, “use git+https://github.com/…” or even better, “I am not sure what you’re doing, but it works for me (since Ansible 2.2)”. So, since neither of these suggestions helped me and because I am unable to find documentation with obvious examples, here is how you achieve…
Prometheus labels every data point — the most well-known example of a label is (probably) instance. Take a look at this query result (query: up{job="prometheus"}): up{instance="127.0.0.1:9090",job="prometheus"} 1 So what does this tell me? I queried for the “up” metric and filtered it for “prometheus” — yay. The “1” says, my service is alive. So far so gut.…
We use Ansible for all kinds of things. One of it being formatting and mounting a volume to be able to use it. When I introduced the code for that, it worked (flawlessly, of course) — until I hit a bug when I provisioned another cluster. Long story short, I was able to fix the bug. But since we rely on it to work always, and I wanted to make sure I had all situations covered, I decided to extend…
As I am spiralling into Linux server administration, there’s certainly a lot to learn. Certainly a lot leaves me wanting BSD, but since that’s not an option, … here we go. NetworkManager The NetworkManager on Linux (or CentOS specially) manages the network. Whatever content/blog posts/knowledge base I found. It usually suggests that you uninstall it first. Common problems are…
(Hello again. I haven’t blogged in a while. But since I’m growing weary of platforms such as medium. Here we go.) I’ve recently spent too much a lot of time with Ansible. Once I got into the rhythm of playbooks, roles and maybe modules/libraries, I desperately needed a way to test my YAML. And by testing, I didn’t mean the annoying linting that Ansible ships with, but…
I’m a huge advocate of CI and one service in particular called Travis-Ci. Travis-CI runs a continuous integration platform for both open source and commercial products. In a nutshell: Travis-CI listens for a commit to a Github repository and runs your test suite. Simple as that, no Jenkins required. At Imagine Easy we happily take advantage of both. :) So what’s wrong? For some reason,…
At EasyBib, we’re heavy users of composer and AWS OpsWorks. Since we recently moved a lot of our applications to a continuous deployment model, the benefits of speeding up the deployment process (~4-5 minutes) became more obvious. Composer install Whenever we run composer install, there are a lot of rount-trips between the server, our satis and Github (or Amazon S3). One of my first ideas…
While re-writing a couple SQL statements into CouchDB we got stuck when we wanted to do a SELECT MAX(...), id ... GROUP BY id in CouchDB. MySQL Imagine the following SQL table with data: In order to get the latest deploy for each project, I’d issue: Simple. But what do you do in CouchDB? CouchDB My documents look like this: So, after more than a couple hours trying to wrap our heads around…
Last week I blogged some Vagrant tips and pretty much jinxed the run I had in the past months. Here’s how: I decided to upgrade to Vagrant 1.1, which broke bento: the current bento master is incompatible with Vagrant 1.1. But selecting the right rbenv env and installing the latest available Vagrant gem (inside the rbenv environment) fixed it. My base box build, but for some reason, the guest…
At the last meetup of the Berlin PHP Usergroup, Christoph gave a talk about Vagrant. Good enough of a reason to write down or re-cap some things I’ve learned with or about Vagrant over the last two years. Base boxes There are lots of base boxes available, but don’t be tempted to rely on them (e.g. via config.vm.box_url). Vagrantbox.es doesn’t actually mirror images and that is a…
I’ve blogged about converting a Subversion repository to git a couple times. While it was a tedious process at first, I’ve made my peace with it and now cannot count the code repositories I have migrated successfully anymore. The migration usually works, except for when I deal with our old provider unfuddle. For some reason, sometimes it didn’t work right away and I had to re-run…
Testing is important — most people understand that by now. A lot of people write tests for their open source code already, but in-house testing is still hard. For example, many of us had an encounter with Jenkins: it runs well to a point where it becomes harder to maintain the Jenkins than it is to write tests. Another obstacle is test setup and environments: When I write and run tests, there is…
As we migrate away from Subversion, I ran into this little issue today. Since it’s something which popped up time and time again and I never got around to figuring out why this happened in the first place, I decided to put it into a blog post. Problem? What I did was, I setup an svn:ignore in the root of my Subversion repository, in order to ignore modules which are installed in the…
Personally — I feel like I’m really, really late to get on the Doctrine train. I’ve tried Doctrine 1 a few years back and found it mostly too complicated for my needs. For all I know, I still find PEAR::DB and PEAR::MDB2 the perfect database abstraction layers (DBAL). Though of course they may or may not be totally up to date in terms of PHP etc.. The overall concept of an ORM never…
In my last blog entry, I demo’d how to get started with Vagrant and the ShellProvisioner. To further illustrate how amazingly simple it is to get started on some Ruby, I’ll convert the shell script from my last blog post to a little recipe for chef. Same objective, we install a PEAR package — but it could be anything really. Follow me. Shell This is the shell script from before:
Development, testing, staging and production — this is how most people devide up different environments for application development. Maintenance and setup of these environments is often not a trivial goal to achieve. Having worked with a couple different code bases and setups over the last decade, I often noticed things like environment specific hacks (if ($env == 'testing') { ... }) in…
Here are some updates on my chef resource for composer: It started off with a PR where I was asked to include code that would download (and install) a composer.phar if none existed. Not a bad idea in general, but also not something I want to impose on anyone, so I decided to create a new action (or in chef-lingo goal) instead. setup Up until now, my php_composer resource supported :install which…
Update, 2012-05-24: Fixed some typos and added the screenshot (eyecandy!). I think it took me (or us) a couple attempts to get this right — let me introduce you to Zf_Crud, a CRUD controller for the Zend Framework. What’s CRUD? CRUD is an acronym and stands for: Create Read Update Delete A general purpose for CRUD are administrative interfaces — view records, create them, update them or…
Ever since I remember, I have this inability to learn the most basic things, until I actually write down a couple notes or instructions somewhere. This is one of these notes blog posts — so in case it’s too basic, just skip over it. Or bear with me. ssh tunnels — useful and powerful. They can help me with all kinds of trickery — e.g. usually for remoting through a tight firewall setup to…
I guess most of you have probably come across blogs which have one of these disclaimers: This is my personal opinion, and not my employers. Here are my thoughts on these. Perspective I think there is always a certain point of view when you read these things. If you have to put this on your personal blog because your opinion and your employer’s opinion differ so much, it might be time to find…
Among all the different technologies in our stack, we also use MySQL. While we still run MySQL (or Percona-Server) ourselves, we selected a managed solution to power parts of our production infrastructure: a Multi-AZ setup with Amazon’s RDS. AZ is Amazon-speak for “availability zone”, essentially a datacenter. RDS stands for: Relational Database Service. Judging from my…
This is something experimental I have been working on for our chef deployments. So the objective was/is to find a sane way to install PEAR packages and install dependencies with composer. execute in chef recipes In chef recipes, almost everything is a resource. In case you’re just getting started with Chef, a list of current resources is available on the Opscode Wiki. It’s a link I put…
First off — I don’t have too much experience with disqus on Wordpress but when I looked at the code(-quality), disqus is one of the best plugins for Wordpress to date. I looked only very briefly, but I found it to be very clean, well documented and well architected. Good job, disqus! In case you happen to dive into Wordpress plugins in 2012, you will see that this is unfortunately not a…
… is not Damien Katz. TL;DR The blog post Damien Katz wrote earlier today, doesn’t mean much or anything for the Apache CouchDB project (or memcache project for that matter). If anything it’s a public note that Damien Katz acknowledged that he moved (on) from CouchDB to Couchbase. Short story, long I’m not a contributor to CouchDB by means of code, (but) I blog a lot, I maintain…
There is one thing which annoyed me a lot in 2011: the general topic is Women in Tech. I’m not annoyed because I don’t like women or don’t want them to attend conferences. I’m annoyed because nothing happens. Status Quo For the most part it’s guys at conference who discuss what can be done about it. For example, I don’t remember how exactly we got into this…
Here’s a more or less simple way to migrate from Subversion to GIT(hub), this includes mapping commits and tags and what not! Authors If multiple people congtributed to your project, this is probably the toughest part. If you’re not migration from let’s say Google Code but PHP’s Subversion repository, then it’s really pretty simple indeed: the username is the email…
Update, 2011-12-21: Couchbase posted their review of 2011 (the other day) — TL;DR: Couchbase Single Server (their Apache CouchDB distribution) is discontinued and its documentation (and its buildtools) will be contributed to Apache CouchDB. When Ubuntu1 dropped CouchDB two weeks ago, there were a couple things which annoy (present tense) me a lot. Add to that the general echo from various media…
I’m sure most of you noticed that with the recent upgrade of PHPUnit to version 3.6, a lot of breakage was introduced in various projects. And for example Zend Framework 1.x won’t update to the latest version either. When I ranted on twitter someone send me Christer Edvartsen’s blog post on how to setup multiple versions of PHPUnit. It’s really neat since it walks you…
I blogged about setting up redis before, here’s a small update to the situation: If you’re running Ubuntu 9.10 or 10.04.x, the most recent release available through aptitude is 1.x. Version 1.x doesn’t include many things (pubsub, etc.) which are available in 2.x. So this leaves you with two options! Compile! Compiling redis-server is simple (aka, make && sudo make install), a…
One of my older hosting servers runs into space issues constantly. And most of the time it’s a 24 GB log file (error_log) from a really old Joomla-based website. Why it gets so huge? Well, when I tail the logfile, I see messages about functions being deprecated in PHP, warnings, notices and a whole lot more literally racing by. I’m not sure if Joomla changed in recent years, but most…
When I ran our setup on an instance the other day, I noticed how it failed with a “package not found” (or similar) error. After debugging this a bit, we discovered that Karmic moved from “archive.ubuntu.com” to “old-releases.ubuntu.com” (Probably diskspace or something — but who knows? :-)). And because the sources pointed to the former, it broke the bootstrap…
I noticed that archivers/pecl-phar vanished from the ports tree on one of my FreeBSD servers. Problem? Reasons to remove the port were: the port is unmaintained the port was based on the outdated phar extension from pecl phar (in pecl) contains open security issues The simple solution is to create a new port which of course will use the phar which is bundled in PHP’s core. And I will get to…
Digressing from my usual grounds, I moonlighted a bit on a Wordpress project in September. One of the project’s goals was to make the entire website bi-lingual: French and German (or the way around?). And once multi-lingual is an object, WPML is the plugin to use (as far as Wordpress is concerned). WMPL in a nutshell WPML is a commercial plugin — and as far as I am concerned: it’s…
So frequently, I need to run small data migrations or transformations. Especially on the way to Doctrine, there’s a lot to clean-up in a database which has been used and evolved over five years or so. The other day, I wanted to run some transformations on the data located a history column in a pretty simple table — here’s what it looks like: Building a class to interface the table is…
I found myself pondering today when I tried to figure out what I want to say or write about Steve Jobs passing away. Because whatever I wanted to share seemed not appropriate and just not good enough. I watched his Standford speech (again) and while I think this speech did not have the edge and finesse his usual Apple-related appearances did, it contains so much wisdom and enlightenment.…
I dig Twitter’s bootstrap library because as a developer, it helps me produce good looking forms without a lot of effort. Especially when administration interfaces are concerned, you I can only go so far — my first constraint is not being a great designer (to confirm, check out this blog) and two: I don’t like working with ugly interfaces. To cut to the chase……
So after updating 10.04 to 10.10 sound didn’t work — again. I’ve bitched and moaned about sound and Ubuntu countless times on Twitter and after literally wasting away countless hours on sound and Ubuntu in the recent months, here are some pointers so hopefully others won’t waste as much time as I did. Pulseaudio There are countless of threads and blog posts online about how…
In order to connect to firewall and DRACs of our new Rackspace cluster, I had to setup a VPN connection. Rackspace gave us a Cisco ASA device which is firewall and vpn in one. In order to connect to the VPN the client needs to do 2-factor authentication. At first I tried to install the necessary add-ons for Ubuntu’s network-manager, but after I spent an hour or so trying to make it work, I…
Some people have this misconception that there is a plot to kill of the original mysql extension (aka ext/mysql) in PHP. So first off, I know that bloggers are not journalist. So apprently fact-checking is not required for a rant blog post. ;-) But if a blog post is a rant, it should be labeled as such. Improved ext/mysqli (hint: “i” as in improved) has been the goto extension for…
Update, 2011-06-16, 12:15 AM Thanks for the comments. (I swear I had something like that before and it didn’t work!) Here’s the solution: — Original blog entry — I wrote a couple tests for a small CouchDB access wrapper today. But when I wrote the implementation itself, I realized that my class setup depends on an actual CouchDB server being available and here my journey…
So Sourceforge is complaining about people hating on Twitter. First off: haters gonna hate!. Sourceforge should know better and not feed the trolls. Then, people complain for a reason. For years your website has been complicated and actual development (not distribution) has stagnated on Sourceforge. To me it seemed like the primary objective was maximizing income from advertisement. Yes, you guys…
I got into a discussion on Twitter the other day where I mentioned that I don’t like DI. Call it lack of sleep or language barrier (on my part), but I said DI — dependency injection — when I meant the dependency injection container. Having said this, let me explain why I don’t like it. POV Despite not working for any of the larger PHP joints out there, I get to spend my time with…
If you followed my blog, you probably know about chef and vagrant. So the other day I managed to upgrade to VirtualBox 4.0. The upgrade just happened by accident, so to speak. I noticed that Virtualbox 4.0 had moved from nonfree to contrib on Oracle’s repository which is why I had previously missed it. With 4.0, I am now able to run the latest and greatest Vagrant — and with Vagrant being…
Here’s how I literally wasted eight hours of my life. :-) We signed up for Yahoo! Search Boss last week. The process itself was pretty straight: Sign into your Yahoo! account at https://developer.apps.yahoo.com/ Click “New Project”, fill out the form. Then click on the project name, activate “Yahoo! Search Boss” by suppling some billing info. Consumer key rejected?…
Cloud, everybody wants it, some actually use it. So what’s my take away from AWS’ recent outtage? Background So first off, we had two pieces of our infrastructure failing (three if we include our Multi-AV RDS) — both of which involve EBS. Numero uno One of those pieces in my immediate reach was a MySQL server, which we use to keep sessions. And to say the least about AWS and in their…
Last week the usual round of PEAR-bashing on Twitter took place, then this morning Marco Tabini asked if PHP (core) was running out of scratches to itch. He also suggests he got this idea from Cal Evan’s blog post about Drupal forking PHP. http://blog.tabini.ca/2011/04/is-php-running-out-of-itches-to-scratch/ http://blog.calevans.com/2011/04/07/four-reasons-why-drupal-should-fork-php/ [Not…