Stan's blog Thanks for stopping by.
Posts with the tag Linux:

Host your own CI/CD server with Drone

Continuous Integration and Continuous Delivery are very trendy topics in the DevOps world right now.

There are quite a lot of services and software to build, test and deploy your code, but actually, a few are free and open-source and self-hostable.

The most well-know softwares corresponding to these characteristics are Jenkins and GitLab CI. However, Jenkins has a huge memory footprint since it runs on Tomcat (Java).

As for GitLab CI, it’s very good but requires you to run your own GitLab (which is huge) or to be on gitlab.com. You can run your own runner independently though.

How I back up my servers using restic and Wasabi object storage

Warning

Enable DNSSEC support in systemd-resolved

I’m currently running Ubuntu 18.04 and I noticed that by default I was using systemd-resolved for DNS:

stanislas@xps ~> cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53

Most of the recent systemd distributions use it, Ubuntu does since 16.10. It has the same role as dnsmasq.

Moving Mastodon's media files to Wasabi Object Storage

Warning

Install Docker on a ZFS pool

Why? Why would you run Docker on ZFS?

I discovered ZFS when I was playing with LXD, because it’s the recommended storage driver for it.

While ZFS has a lot of great features, the ones I like the most are the RAM cache, compression, and snapshots.

After moving from LXD to Docker (so leaving ZFS), I felt the difference in speed the cache gave me, and I saw some files like databases being 3 times bigger.

Setup a ZFS pool on a Hetzner VM running Debian 9

ZFS is great file system that comes with a lot of benefits, and I’ve come to use on my servers with LXC or Docker.

Even if RAIDZ or self-healing are useless on a VM, we can still benefit from compression, snapshots, cache, etc.

The proper way to create a ZFS pool is to dedicate a device or partition to the zpool.

I’m using the new Hetzner cloud offer a lot recently and that’s also where I use ZFS. They provide ready to go images to get a working VM in 10 seconds, but you can’t repartition them. This tutorials aims to explain how to use the rescue mode to partition the VM and create a zpool.

Monitoring with Telegraf, InfluxDB and Grafana

I’ve been using Munin for the past years as my monitoring tool. It works well, it’s light, and super easy to set up.

It’s a bit old and limited though, so it’s time to look at what kind of monitoring software we have in 2018.

Instead of having one software that does everything nowadays we like to separate the roles this way:

  • The collector, which you will install on the machines you want to monitor
  • The database that will store all the measurements
  • The visualization system, e.g. a web dashboard

The 3 most popular stacks seems, for me, to be:

Diaspora* in Docker

I’ve been moving my services to Docker lately because it suits my needs an ease my life a lot, but I was kind of stuck when wanting to move my Diaspora pod into containers.

Indeed, the Diaspora project doesn’t have any official Docker image, including a Dockerfile, docker-compose.yml or any kind of instructions or guide, because none of the core developers actually use Docker so they’re still searching for someone to maintain one.

Add comments to your blog with Isso

If you’re not using a CMS like WordPress, chances are your CMS or blog engine doesn’t support comments.

That makes sense if it’s a static blog built with a tool like Hugo, Jekyll or Zola, but does less when your blog is powered by a database, like Ghost is.

I think comments are part of a blog and it’s important to enable them. Readers can thank you for your work, report a mistake, discuss the article, etc.

Setup a ZFS pool for your LXC containers with LXD

There are different storage types for LXC containers, from a basic storage directory to LVM volumes and more complex file systems like Ceph, Btrfs, or ZFS.

In this post, we’re gonna setup a ZFS pool for our LXC containers, via LXD.

Why ZFS?

ZFS is an awesome file system. It’s a 128 bits file system meaning that we can store a nearly unlimited amount of data (no one will never attain its limit). It replaces RAID arrays by much simpler, safer and faster “pools”, and had very good performance by using compression, copy-on-write, dynamic block size, dynamic stripping, and an extensive use of RAM cache. The latter means it uses quite an amount of RAM, so I don’t recommend to use it on small devices.