RSSAmplifier

Blog

Gonéri's blog

goneri.lebouder.netRSS feed ↗87 posts

Latest posts

Delete all the files older than a specific date

This is the first time I read about -newermt and it's pretty cool, the following command will remove all the files older than Jan 1st, 2026: find . ! -newermt "jan 01, 2026" -type f -delete

Quickly-validate-a-kubernetes-pull-secret

This two commands are handy to quickly valide that a PullSecret secret is correct: kubectl get secret my-secret -o jsonpath='{.data.\.dockerconfigjson}' | base64 --decode > ~/tmp/auth.json podman pull --authfile ~/tmp/auth.json quay.io/some/image

Run VSCode-Ansible tests locally

This is about development of the Ansible extension for VSCode . The Git repository is hosted on Github ansible/vscode-ansible and I always have a hard time to run the CI tests locally. I took some notes. First, I use FishShell and you will need to adjust some commands if you use Bash or Zsh. First you need lsof , uv and go-task . A task symlink is also needed to keep the original upstream…

Claude and Github MCP tools

You already use Github with the gh command and want to enable the MCP service in Claude Code . In this case, you don't need to prepare a new Github Personal Access Token, but you can just reuse the gh 's token that gh auth token returns: With Fishshell , this looks like this: claude mcp add-json github -- (printf…

Virt-Lightning 2.5.0

I just published Virt-Lightning 2.5.0 . The tool aims to give Linux users a way to quickly spawn cloud images locally. The user interface is a CLI and its philosophy is inspired by similar tools like the OpenStack CLI, ec2 command, Podman or Docker. For instance, if you want to run the latest snapshot of Fedora 43, you can just install uv and run: uvx virt-lightning start fedora-43 --memory 2048…

FreeBSD 15 comes with an official Cloud image

I've been maintaining bsd-cloud-image.org since 2019. The website gives access to cloud images for BSD operating systems. The images are in QCOW2 format and include cloud-init. You can for instance use them with OpenStack or Virt-Lightning , my second pet-project. I maintain these images because these projects don't provide anything like this and I want to provide a way to quickly try…

Run Virt-Lightning on CoreOS

Virt-Lightning is my pet-project to quickly start Cloud VMs on a Libvirt Hypervisor and these are some notes I took to run it on Fedora CoreOS . First, you need to install libvirt and uv : sudo bootc usr-overlay sudo dnf install -y uv libvirt-devel gcc python3-devel qemu-kvm qemu-img libvirt mkisofs sudo systemctl restart polkit.service sudo systemctl enable --now libvirtd sudo usermod --append…

Migration to Zola

My BlueHost subscription was about to expire, and one of my new year resolutions is to reduce the number of subscriptions I'm paying for. So I've decided to move to a static website, and I've picked Zola a bit randomly. Mainly because it's written in Rust and I didn't want to bother with Python or Ruby for a project like this. I've used Claude Code to quickly clean up…

Installing CRC on CoreOS

My local home server runs on CoreOS and today I went through the installation of Red Hat Code Ready Container, aka CRC. Download Go on https://console.redhat.com/openshift/create/local and download both: the crc binary, which they call OpenShift Local and the Pull secret Preparation The first thing to do is to allow the installation of local packages and install libvirt:…

Btrfs disk upgrade done wrong

I'm in the process to upgrade an existing Btrfs multi-disk filesystem ( /var/mnt/datapool ) and I made a mistake...

Llama.cpp with Vulkan

Running Llama.cpp with the Vulkan backends of my AMD and Intel graphic GPUs ends up being straightfoward and surprisingly fast. Build you container with: podman build -t llama-cpp-vulkan --target server -f .devops/vulkan.Dockerfile . and run it with: podman run -it --rm --security-opt seccomp=unconfined --device /dev/dri:/dev/dri --volume…

numpy: AssertionError: CUDA_HOME is not set

To get Numpy to build on RHEL9, you need to install nvcc and export CUDA_HOME, e.g: $ sudo dnf install -y rpm -ql cuda-nvcc-13-0 $ sudo ln -s /usr/local/cuda-13.0 /usr/local/cuda $ pip install numpy

Pushing a container image over SSH

I recently faced the situation where my registry was down and after a bit of digging, I ended up with this solution. In this example my image is called quay.io/goneri/my-image:latest : podman image scp quay.io/goneri/my-image:latest ec2-user@your-host::quay.io/goneri/my-image:latest

Allow broken certificate for a specific host with Python's requests

After a bit of trial error, this is how you can allow requests to connect to a specific host, despite a broken certificate: import requests import requests.adapters import ssl import urllib3 from urllib3.util import create_urllib3_context class AllowBrokenSSLContextHTTPAdapter(requests.adapters.HTTPAdapter): def __init__(self, **kwargs): ssl_context = create_urllib3_context()…

List all pods by age that are not from OpenShift

Get a flat list of all the pods, except those coming from openshift namespaces $ oc -o json get pods -A --sort-by=.status.startTime |jq '.items[].metadata|select(.namespace | startswith("openshift") | not)|pick(.name, .namespace, .creationTimestamp)' and to find the largest pods by memory $oc adm top pods -A --sort-by=memory

Ollama: apply a Lora on a model

First, I've prepared a Lora with Axolotl : axolotl train examples/llama-3/lora-1b.yml At the end of the process, I've a new directory called outputs/lora-out . I now need to prepare a new model that will be a mix of an Original Llama3 model and this new file called llama3.1-modelfile : FROM llama3.2:1b ADAPTER…

VSCode container and OAuth2 Web callback

I use Fedora Silverblue and my VSCode runs inside a container. I manage the container with the "toolbox" CLI tool. I also, to get the last version of Firefox, I use it's upstream Flatpak To be able to get VSCode's OAuth2 callback to work properly, I had to do a bit of extra configuration. You need a .desktop file to overload VSCode's default way to open web URL. We don't want…

bsd-cloud-image.org 2nd^w3rd rewrite

bsd-cloud-image.org aims to simplify the use of BSD operating systems in a cloud environment. It provides a series of cloud-ready images that can quickly be deployed and tested. The original target was OpenStack and Virt-Lightning . But the images should work with any Cloud-Init compatible environment. Yesterday I released a new version of the website based on TypeScript + Vite + VueJS and…

firewalld: add a new service

Create a new service entry: firewall-cmd --permanent --new-service=ollama Associate the right port with new service: firewall-cmd --permanent --service=ollama --add-port=11434/tcp Restart the firewalld, so it's aware of the new service: firewall-cmd --reload Finally, associate the service with the Zone. I don't use --permanent here on purpose. This way the association will be lost…

Sharing Internet connection on Fedora 40

It's surprisingly easy to build a router from a Fedora 40 box. Here eno1 is connected to my cable modem and enp8s0 is connected to my local network. To NAT the Internet connection: nmcli c add type ethernet con-name internet ifname eno1 connection.zone external ipv4.method auto And set up the DHCP on the local network, the machine will use the IP 10.42.0.1 IP by default: nmcli c add type…

Vidéotron Helix Fi 2

Quick rant. Vidéotron Helix Fi 2 is the worst modem I have ever seen and the fact the ISP forces customers to use it is embarrassing: There is no IPv6 despite the fact that it's supposed to sort of work on their website. That was the main reason why I switched to Vidéotron. There is no way to do something as basic as bridge mode. Their definition of a "bridge mode" is actually a bloody ugly…

AWS: How to retrieve a KeyPair private key

Note for myself, this is how you can download a copy of a KeyPair private key: aws --region ca-central-1 ssm get-parameter --name /ec2/keypair/key-015b012fb114efc83 --with-decryption --query Parameter.Value --output text

Nextcloud photo backups

I've been doing backups for my family for years now. In the past, I used several different systems including rsync and burp . Recently, I decided to stop hosting my own backup server and move to Nextcloud. I use the Nextcloud offer from Hetzner and I'm pretty happy with the result. I appreciate having a solution that just works without having to think about it. Regarding the client…

My GNOME configuration and its extensions

I've been using a slightly tweaked GNOME 3 for a while now. Before that, I was using the Awesome Window Manager and I was quite fond of the key bindings. In order to facilitate the transition, I tried to recreate them. The result is pretty good. I can navigate between my 9 different virtual desktops using the Windows (a.k.a. SUPER) key + a number. Windows + F also works; it will turn on…

BSD-Cloud-Image.org new images

I just pushed 2 new images on BSD-Cloud-Image.org : OpenBSD 7.2 DragonFlyBSD 6.2.2

Elixir: xmerl/include/xmerl.hrl could not be found

I recently faced this error when trying to build an Elixir project. == Compilation error in file lib/swoosh/adapters/xml/helpers.ex == ** (ArgumentError) lib file xmerl/include/xmerl.hrl could not be found (elixir 1.13.4) lib/record/extractor.ex:41: Record.Extractor.from_lib_file/1 (elixir 1.13.4) lib/record/extractor.ex:18:…

Virt-Lightning 2.2.0

Release 2.2.0 of Virt-Lightning , a lightweight CLI for libvirt which can serve as an alternative to Vagrant. It's also a stable API that you can use in Python to quickly spawn new VM, like you would do with a Cloud provider. Most of the new features come from contributors and I'm pretty happy with this. Changelog Cosmetic documentation changes Don't try to fetch an image that…

Ansible's vmware.vmware_rest collection, Execution Environment and ansible-navigator

Ansible-Navigator is a new terminal base UI for Ansible. It aims to provide an alternative to the different ansible commands that you probably already familiar with. To learn more about Ansible-Navigator, a couple of recent blog posts on Ansible Blog cover this new tool. The Execution Environment, or just EE, is also a rather recent concept. With a EE Ansible and all its dependencies are shipped…

Connect to ZooKeeper over TLS/SSL

It's surprisingly tricky to connect to a ZooKeeper cluster over TLS/SSL using the zkCli.sh command. You've got to wrap the command and pass some extra incantations. Here is the script I use. My certificates are in /etc/zookeeper/ca, so you may need to adjust that to match your local installation. #!/bin/bash ZK_CLIENT_HEAP="${ZK_CLIENT_HEAP:-256}" export…

Zuul cheat sheet

My team at Ansible uses Zuul CI to develop and release our collections. From time to time, I need to do some basic operations and I've started a cheat sheet. I'm sharing it since it may be helpful for someone else. Abort a job: $ zuul dequeue --tenant=ansible --pipeline=release --project=ansible-collections/ansible.utils --ref=refs/tags/2.4.2 Recreate a job. In this case,…

Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!

TASK [helm : Copy test chart] ************************************************** fatal: [localhost]: FAILED! => {"changed": false, "checksum": "8b41aa269bd850134cd95bd27343edf6d4ed2e30", "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"} Ah, this is one of the most irritating message that you can get when you use Ansible in a venv and SELinux. The…

Ansible Molecule, how to use the local copy of the dependencies

The community.okd collection depends on kubernetes.core. It uses Molecule to run the tests. We can call it using either the Makefile and the make molecule command. We can also install molecule manually with pip and run it with molecule test . When I work on community.okd, I often need to also adjust the kubernetes.core collection. By default Molecule fetches the dependencies silently from…

Extract data from an Android phone

So, I've got an old phone with 35GB of pictures that I want to save. So far, I tried NextCloud sync, scp copy, GIO/MTP file. For all of those, it's a 12+ hour operation. And the real solution is to enable the developer mode on the phone and go straight to adb : $ adb pull /sdcard/DCIM /sdcard/DCIM/: 5825 files pulled. 31.9 MB/s (37517869453 bytes in…

Performance: expanduser with pathlib or os.path

Python 3 provides a new fancy library to manage pretty much all the path-related operations. This is a really welcome improvement since before that we had to use a long list of unrelated modules. I recently had to choose between Pathlib and os.path to expand a string in the ~/path format to the absolute path. Since performance was important, I took the time to benchmark the two options:…

Ansible collections and venv

I work on a large number of collections and in order to test them properly, I have to switch between the Python versions and the associated PyPI dependencies. Nothing special here, this is pretty much the life of all of us who work on the Ansible collections. Initially, I was maintaining a set of clean Python virtual environments. Basically, one per version of Python. And I was juggling between…

Update on BSD Cloud Image

I've pushed some new images on https://bsd-cloud-image.org/ : OpenBSD 6.9, bsd.rd is now a compressed file FreeBSD 13.0: boot1.efifat does not exist anymore DragonFly BSD 6.0.0, I've refreshed my Cloud-Init PR . Hopefully this time I will manage to get it merged. These images also include a recent fix for non-standard MTU values .

0ad, Firewall and Fedora33

By default, the firewall will prevent connection to your 0ad server. To adjust that, you need to open up the port 20595 (UDP). This three lines create a Firewalld service called 0ad, attach it to the default zone and reload the firewall: $ sudo firewall-cmd --permanent --new-service=0ad --set-description="0ad, A free, open-source game of ancient warfare" --add-port=20595/udp $ sudo…

eGPU, Wayland, Gnome3 and Fedora

I've just got a Razer Core X that I use with a Radeon graphics card. By default Wayland, well Mutter actually, continues to use the Intel card of my T580. To force it to use the second card, I had to add a udev rule and reboot. And that's all! $ cat /etc/udev/rules.d/61-mutter-primary-gpu.rules ENV{DEVNAME}=="/dev/dri/card1",…

How to waste a Friday...

Yesterday morning I got frustrated by a really slow download speed of some files. What should have taken seconds with my 400 Mb/s connection actually took more than 16 minutes. In addition, I was able to reproduce the problem on my router. Here, the curl statistics show a 26:52 minute download at 415kb/s: $ curl -o /dev/null…

My Github workflow

The Ansible community uses Github to develop ansible-core and most of the Ansible Collections. The only exception I know is the Openstack's ansible-collection-openstack which uses a Gerrit ( ansible-collections-openstack ). So, as an Ansible developer, my normal day-to-day activities involve a lot of GitHub interactions. I review Pull Requests (PRs) and prepare new PRs all the time. Before…

Ansible: How we prepare the vSphere instances of the VMware CI

As briefly explained in CI of the Ansible modules for VMware: a retrospective , the Ansible CI uses OpenStack to spawn ephemeral vSphere labs. Our CI tests are run against them. A full vSphere deployment is a long process that requires quite a lot of resources. In addition to that, vSphere is rather picky regarding its execution environment. The CI of the VMware modules for Ansible runs on…

Ansible and k8s: How to get the K8S_AUTH_API_KEY value?

The community.kubernetes collection accepts an api_key parameter that may sounds a bit confusing. It's actually the value of the token of a serviceaccount. It's actually an OAuth 2.0 (Bearer) token, it's associated with a user and a secret key. It's rather similar to what we can do with a login and a password. In this example, we want to run our playbook as the k8sadmin user.…

Ansible: Performance Impact of the Python version

Until recently, I was not really paying attention to the version of Python I was using with Ansible, as long as it was Python 3. The default version was always good enough for Ansible. During the last few weeks, I spent the majority of my time working on the performance of the community.kubernetes collection. The modules of this collection depend on a large library (OpenShift SDK) and Python needs…

How to start minishift on Fedora-33

update: minishift is basically dead and won't support OpenShift 4. You probably want to use crc instead. I just spent too much time trying to start minishift with my user account. After 3 hours fighting with permission issues between libvirt and the ~/.minishift directory, I've finally decided to stay sane and use sudo ... This is how I start minishift on my Fedora 33. Install and…

How to speed up your (API client) modules

https://www.slideshare.net/goneri/how-to-speed-up-your-api-client-modules The slide deck of my presentation for AnsibleFest 2020. It focuses on the modules designed to interact with a remote service (REST, SOAP, etc). In general these modules just wrap an SDK library; the presentation explains how to improve the performance. I actually use this strategy ( ansible_turbo.module )…

How we use auto-generated content in the documentation of our Ansible collection

Introduction Most of the content of the vmware.vmware_rest collection is auto-generated. This article focuses on the documentation and explains how we build it. Auto-generated example blocks This collection comes with an exhaustive series of functional tests. Technically speaking, these tests are simply Ansible playbooks that we run with ansible-playbook. They should run all the modules and…

vmware_rest: why a new Ansible Collection?

vmware.vmware_rest ( https://galaxy.ansible.com/vmware/vmware_rest ) is a new Ansible Collection for VMware. You can use it to manage the guests of your vCenter. If you're familiar with Ansible and VMware, you will notice this collection overlaps with some features of community.vmware. You may think the two collections are competing and that it's a waste of resources.…

CI of the Ansible modules for VMware: a retrospective

Since January 2020, every new Ansible VMware pull request is tested by the CI against a real VMware lab. Creating the CI environment against a real VMware lab has been a long journey, which I'll share in this blog post. Ansible VMware provides more than 170 modules, each of them dedicated to a specific area. You can use them to manage your ESXi hosts, the vCenter instances, the vSAN, perform…

Cloud images, which one is the fastest?

Introduction This post compares the start-up duration of the most popular cloud images. By start-up, I mean the time until we've got an operational SSH server. For this test, I use a pet project called Virt-Lightning ( https://virt-lightning.org/ ). This tool allows any Linux user to start standard cloud images locally. It will prepare the meta-data and start a VM in your local…

How to clean Docker up when used on Btrfs

Docker often leaves behind files when I remove images with rmi . systemctl stop docker.service systemctl stop docker.socket rm -rf /var/lib/docker/ btrfs subvolume list /var/lib/docker|awk '/ID/ {print "/"$9}'|xargs btrfs sub delete