Array in Bash

I have written a hand full of Bash scripts, but none of those utilized array. Why? It’s because of two main things: 1. I don’t know how to use array in Bash, and 2. I would normally switch to write the script in Python instead. Today, however, I need to update an existing script written in Bash to make use of array. This was a perfect excuse for me to spend some 30 minutes to learn about array in Bash....

October 18, 2023 · 2 min · 221 words · Kenno

Install Guest Tools on XCP-ng

On AlmaLinux, the guest-tool for XCP-ng is provided by a package named xe-guest-utilities-latest, which in turn is available from the epel-release repository. The following list a few steps to get XCP-ng guest-tool installed on a VM running AlmaLinux 9. Enable epel-release repository if not yet enabled by first installing a package called epel-release. In my case, the repo has been already enabled. [root@xoa1 ~]# rpm -q epel-release epel-release-9-7.el9.noarch Install the guest-tool....

October 16, 2023 · 2 min · 253 words · Kenno

What is in a Longhorn volume?

Do you know? Well, before today, neither did I. I’m pretty late to Kubernetes. I heard about it many hears ago, but unfortunately, I had no need to use it at home or at work. Even today, there is no workload that requires a Kubernetes cluster to run on. However, I think I can’t ignore Kubernetes any longer, and I need to learn about it now, well “better be late than never”, right?...

October 15, 2023 · 2 min · 262 words · kenno

warning: TERM environment variable set to 'tmux-256color'

I use ’tmux’ on anything that runs it, from FreeBSD, macOS and Linux. On some of my Linux servers, noticeably openSUSE ones, when I connect to them via SSH, I would receive the following warning: ... Have a lot of fun... warning: Could not set up terminal. warning: TERM environment variable set to 'tmux-256color'. warning: Check that this terminal type is supported on this system. warning: Using fallback terminal type 'ansi'....

October 12, 2023 · 1 min · 195 words · kenno

Grow partition with growpart

During the upgrade of Fedora 38 to Fedora 39 (beta) on my main desktop, the first attempt failed due to insufficient free disk space on the root volume. After some manual intervention such as vacuuming the journald logs, I was able to perform the successful upgrade. Not that it matters, but I’m writing this blog post on the same desktop running Fedora 39 Beta. This post is to record how I increase the root volume on my desktop with the help of a few tools such as growpart, lsblk, resize2fs,…etc....

October 6, 2023 · 4 min · 852 words · kenno

How to delete Lightsail resources using AWS CLI

In this post, I’ll document how to use AWS CLI to delete a few Lightsail resources. I have never done this before, so this would be a good exercise for me. To make it less boring, I’m writing this post while I’m deleting these resources. First step, I need to look for the instance name [1]. ❯ aws lightsail get-instances --query 'instances[].name' [ "WordPress-1" ] The above output is the name of the instance I’d like to delete....

October 5, 2023 · 3 min · 464 words · kenno

How to delete Memcached cluster using AWS CLI

If you have an ElastiCache Memcached cluster that you no longer need, it’s better to delete it. Dno’t believe me? Even AWS said so too: It is almost always a good idea to delete clusters that you are not actively using. Until a cluster’s status is deleted, you continue to incur charges for it. [1] Well, I have a Memcached cluster that I don’t need anymore. But instead of deleting this cluster using AWS console [1], I’m going to do this via AWS CLI....

September 29, 2023 · 2 min · 326 words · kenno

Deleting VPC Endpoints With AWS CLI

This is a quick note on how to delete VPC endpoints that are no longer needed with AWS CLI. First, we need to find all the vpc-endpoints-ids [1]. ❯ aws ec2 describe-vpc-endpoints --query 'VpcEndpoints[].VpcEndpointId' [ "vpce-097008f8d26caxxxx", "vpce-07aaeabdefd8xxxx", "vpce-0bc6d548ff2e0xxxx" ] Note: I replaced the last 4 digit with ‘xxxx’. It’s a good idea to try out without really deleting the VPC endpoints by supplying --dry-run to the command below: ❯ aws ec2 delete-vpc-endpoints --vpc-endpoint-ids vpce-097008f8d26caxxxx vpce-07aaeabdefd8xxxx vpce-0bc6d548ff2e0xxxx --dry-run An error occurred (DryRunOperation) when calling the DeleteVpcEndpoints operation: Request would have succeeded, but DryRun flag is set....

September 27, 2023 · 1 min · 166 words · kenno

How to extract a zip archive with Python on Windows

Have you ever been asked or wonder how to learning a programming language? If not, then you can skip this blog post. :-) At work, a coworker said to me “I want to learn a programming language. Where do I start or how do I even start it?” I was asked this question because I had explicitly expressed my interest to my teams that I like programming a lot, though programming is not being used my professional career at the moment....

September 26, 2023 · 3 min · 466 words · kenno

Installing Ingress-Nginx Controller with Helm

In my previous post, I showed how to install helm CLI on a server/instance running AlmaLinux 9. Now, I will share how to use helm to install the Ingress-Nginx Controller for a Kubernetes cluster. We install a package known as “chart” from a Helm repository. Initially, there is no repo, and can be seen below: $ helm repo list Error: no repositories to show In order to install Ingress-Nginx Controller, I first need to add a new repository....

September 26, 2023 · 2 min · 374 words · kenno