Ansibe: Create Sub Inventory

Consider a large inventory file full of hosts. The goal is to create a smaller list, a ‘sub-inventory’, containing only hosts with a specific service - Docker, in this case. The process involves running a playbook to examine every host. If Docker exists on a host, this host gets added to the smaller list. What’s the significance of this action? During the initial creation of the large inventory, hosts with Docker weren’t categorized separately....

April 6, 2023 · 2 min

Ansible: Combining one variable from multiple sources

Case study: Imagine that firewalld needs to be configured on multiple servers with Ansible. Different servers might have different ports and services are allowed through the firewall. But at the same time some settings are same across all servers, for example the default zone. This article will attempt to provide the best way to configure host_vars and group_vars for firewalld configuration. Since the main focus of this article is on variables, only localhost will be used in examples below....

April 5, 2023 · 3 min

Gentoo Package Sets

Gentoo’s package manager Portage has an organizational feature called sets. A set is essentially a named list of packages that you can use to install or update multiple packages at once. There are predefined system sets like @world that contain all packages installed in the system, and it’s also possible to create custom ones, for example for a specific application. This is a very useful feature, because it allows users to easily install uninstall and upgrade packages....

March 19, 2023 · 2 min

Gentoo USE Flags

USE flags that allow users to customize the way packages are built and installed on a system. They are essentially a set of optional features that can be enabled or disabled for each package, depending on the specific needs and preferences. For example, some packages may offer optional support for certain file formats or network protocols. By enabling the appropriate USE flags for these features the package will be built with support for those features....

March 19, 2023 · 1 min

Gentoo: Upgrading the System

Gentoo Linux, being a true meta-distribution, give users maximum flexibility and control over the system. A stark example of this is the OS upgrade process. Users have a large choice of different command utilities and a bunch of configuration option to choose from to tailor the upgrade process to their needs. This guide will attempt to combine and distill the best practices and recommendations from the Gentoo Wiki/Forums and other sources into a single guide....

March 18, 2023 · 4 min

Gentoo: Set up GURU as a local repository

This article is a summary of couple Gentoo Wiki articles that teaches how to get access to Gentoo’s GURU overlay and start creating your own ebuilds or maintain existing ones. Disclaimer: I am not a Gentoo developer, and I just started interacting with Gentoo community and this is what I’ve learned so far. There are probably (definitely) better ways to do this, and I’ll be glad to hear suggestions. Step 1: Request Access This step is not mandatory if the goal is to create ebuilds locally without pushing them to the repository....

March 8, 2023 · 4 min

Awesome Article List

Articles I thought to be extremely entertaining and from which I have learned alot. Infrastructure [Link] - Building Infrastructure for AI company [Link] - Scaling Google Sheets as a backend [Link] - We have left the cloud [Link] - Lessons Learned from Twenty Years of Site Reliability Engineering [Link] - Scaling pull-based monitoring system [Link] - Platform engineering [Link] - Kubernetes infra that can be managed by 1 person Git [Link] - Git Branching Model Tools [Link] - NGINXConfig [Link] - Advanced managing of pre-commit hooks [Link] - Distroless containers which are ridiculously small Tech [Link] - Systemd76 workstation [Link] - Framework laptops [Link] - Teenage engineering audio tech [Link] - Knob mechanical keyboard Misc [Link] - How to be successful by Sam Altman [Link] - Feedback at Netflix [Link] - Booting Linux from Google Drive Resources [Link] - Git book on Linux Kernel [Link] - Book on Linux kernel drivers

March 3, 2023 · 1 min

Migrating Nginx to Docker

There are many ways to install a Nginx web server on Linux. It can be installed using OS’s packager manager, either from distro’s repositories on from Nginx’s official repos. It can be compiled from source. But my favorite way is definitely in a Docker container. Main benefits are: Nothing is installed on the system Many different versions are available (without adding external repositories) It’s easy to transition from a normal install to Docker Step 1: Preparing Nginx configuration file I already wrote about creating a basic Nginx configuration file here, so I will just briefly point out what was changed to be used in Docker....

March 1, 2023 · 2 min

Using IRC in 2023

I really didn’t think that it will ever be a necessary to use IRC in modern world. First of all, there are better alternatives like Discord and Matrix. Secondly, IRC is a technology from 1988. For a bit of context, in 1988 Soviet Union was still a thing, and Guns and Roses just started making good music. Privileged Gen-Z rhetoric aside, it’s actually not all that bad. Yes, if you are old school you can still use IRC in the terminal, and constantly remind everyone how old days were much better than now, but that’s not very productive....

February 28, 2023 · 3 min

Hosting a Hugo website with Nginx on RHEL

For me the toughest and most time consuming part of web development was always front end. All the centering divs, box models and CSS inheritance stuff. And even if I get all the code to work, website still looks like highschool student’s project from the 90s. Well, no more. Hugo framework allows users to create websites using Markdown language, and takes care of rendering Markdown files into HTML and CSS code....

February 18, 2023 · 6 min