Posts

Showing posts from 2018

Docker compose demonization with systemd

Easy way to (auto)start your infrastructure with docker-compose . Very useful for development, review servers, pre-prod, or test environments. Also includes tips on protecting iptables when using docker-compose .

AWS + StrongSwan

Sometimes you need to connect two AWS networks without using AWS managed VPN services. Most tutorials show a simple tunnel between two instances, but they ignore high availability. That usually leads to asymmetric routing or a single point of failure.

CloudFlare API - list zone records

Easy and fast way get all domains or records via CloudFlare API

Moving WordPress redirects to nginx

We have pretty cool json from WordPress redirect table and we need move this action to nginx.

Merging and Deploying Let’s Encrypt Certificates with Salt

Easy way to merge two files on the fly. The storage backend can be any supported by SaltStack.

Latest Ruby on Debian 8 with Multi‑Site

Setting up a Middleman client API container with Ruby and systemd, plus Nginx configuration for proxying requests.

Salt (SaltStack) dynamic inventory

Salt (SaltStack Inc.) is a powerful automation tool that I’ve been using for many years. This post shows an example of agent‑less usage with salt-ssh , using a dynamic inventory via a roster and an Ansible inventory plugin.

HAProxy in Front of InfluxDB

We have Telegraf sending stats to two InfluxDB servers, but our dashboard should point to only one. Additionally, Nagios monitors InfluxDB health. Here’s how we can combine a script, xinetd, and HAProxy to manage this.

Routing Part of an Application to a New Version with HAProxy

Sometimes you need to roll out only part of an application to production. This often happens after refactoring or when introducing a new version of specific endpoints. With HAProxy you can route only selected requests to the new backend while keeping the rest of the traffic on the existing servers.

Mass redirect using Haproxy map file

During application upgrades or migrations it’s common to keep old URLs working for backward compatibility. One simple way to handle large numbers of redirects in HAProxy is to use a map file. If you are using Nginx, you can find a similar approach here: Nginx .

Mass redirect using Nginx map file

Sometimes after upgrading or migrating an application you still need to keep old links working. A simple way to handle this in Nginx is to use a map file and redirect the requests to their new locations. If you are using HAProxy, you can find a similar example here: Haproxy . This approach is useful when you have many URLs to redirect and don’t want to clutter the main configuration with dozens (or hundreds) of rewrite rules.