A brief Introduction to Cgroups in Linux
Nov 13, 2024
What is it? cgroups (abbreviated from control groups) is a Linux kernel feature1 that limits, accounts for, and isolates the resource (i.e CPU, memory, disk I/O, and network) usage of a collection of processes. It is essential for managing resource allocation in modern systems, especially in environments that require efficiency and isolation like containers, virtual machines, and multi-user servers. We can create multiple cgroups with parent-child relationships, as it is organized in a hierarchical structure.…
Linux Containers (LXC) vs Docker
Aug 17, 2024
Tools of the trade In the rapidly changing world of software development, containerization technology has become an essential tool for developers seeking to improve efficiency and maintain consistency across different environments. Among the leading container technologies, Linux Containers (LXC) and Docker are particularly popular. It’s important for us to understand the distinctions between these options to choose the best tool that suits our project’s specific requirements. Linux Containers (LXC) Linux Containers (LXC) is a sophisticated virtualization technology that leverages core Linux kernel features to create lightweight, isolated environments, allowing multiple applications to run efficiently on a single host system.…
Homelab Setup on a Laptop
Jul 13, 2024
An “Old” Laptop Ever since I entered the corporate world of work, I’ve been using my PC less and less, which resulted in my “old” laptop from uni days being not used for weeks on end. So, to have a test-bed for my digital shenanigans as well as a to self-host services, I’ve considered turning the unused bare metal into a virtualized data center :) Virtaulization FTW! With Red Hat unilaterally terminating CentOS development in favor of CentOS Stream1, I considered what OS/hypervisor to run for virtualization.…
Saving VPS Costs with Bash and Cloudflare Workers
Dec 14, 2023
What is a VPS? Well, it expands to Virtual Private Server1, which is often a virtual machine sold as a service by an Internet hosting service. In our case, it is a tiny Linux box running a WireGuard2 VPN (Virtual Private Network) service, set up in minutes with Algo3. How did you do it? Before we get into the how, let’s start with the why :) Running virtual machines in the cloud incur costs, also, some of these are running inside datacenters not powered by 100% renewable energy.…
Upgrading Portable Visual Studio Code
Dec 03, 2023
The background I have been using vscode on Ubuntu/Windows1 as my primary text editor for quite a time. When “installing” vscode, I usually download the tar.gz and add a shortcut in gnome dock on my own. This method brings portability to the application. However, for all data to be contained2 within the vscode directory, we need to create a new directory named data in the same location where the binary reside.…
Exclusively Installing Security Updates on Ubuntu
Oct 23, 2023
When new versions of software are released, we happen to need to update the local versions to the latest. This post looks into how we could install only the security updates for packages on a system running Ubuntu 20.04.4 LTS. sudo apt update sudo unattended-upgrade -d Above will install only security updates1 on a machine running Ubuntu. https://askubuntu.com/a/412/953808 ↩︎
Setup Nagios Alerts to Monitor SSL Certificate Expiry in Java Key Store
May 14, 2022
The background Nagios is a monitoring tool1 for systems, networks, and infrastructure. The expected outcome was to add a Nagios alert for SSL Certificates stored in a Java Key Store file. Since the Nagios server was already set up and functioning, we’ll cover only for setting up the alert. The procedure Considering security and efficiency, it was decided to set up a cron triggered script to read the certificate expiry dates, write them to a location accessible by the Nagios Remote Plugin Executer (NRPE)2 agent.…
Updating VirtualBox on Ubuntu
Dec 01, 2021
How was it installed? The official apt repositories are known to have old (read thoroughly tested and stable) versions for some software packages. In that light, VirtualBox was installed through the latest stable .deb installer downloaded from the official website, with the version number at the time being 6.1.28-147628. When the new stable version 6.1.30-148432 became available, following are the steps that were followed to set it up. The Process First, we need to obtain a copy of the .…
Installing Gnome Shell Extensions Manually on Ubuntu
Nov 30, 2021
The Background The usual method to install Gnome extensions on Ubuntu is using a browser with the relevant browser extension installed among other requirements. However, as in almost all things involving Linux, this method is not necessarily the only way toward accomplishing the same. What follows are the steps that may be followed to manually download and install the extensions without browser integration. The Procedure We can get started by navigating to the Gnome Extensions webpage1, finding the extension we need installed, and downloading the extension package matching our Gnome shell version2.…
Setting Up an OpenVPN Server on CentOS
Nov 26, 2021
The Background Recently I’ve set up an OpenVPN (Community Edition 2.4.11) server on a CentOS 7 box. While there were multiple1 resources2 that3 helped4 immensely in getting the task done, below is the process that was actually followed. Configuring EasyRSA and Generating the Server Keys Once we have a CentOS 7 box up and running, we can start by enabling the EPEL repository and optional extras. yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm subscription-manager repos --enable "rhel--optional-rpms" --enable "rhel--extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" Then, we can install openvpn and easy-rsa5 as below.…