Skip to content

Instantly share code, notes, and snippets.

View ianballou's full-sized avatar

Ian Ballou ianballou

View GitHub Profile
@ianballou
ianballou / 99.local.yaml
Created December 5, 2025 14:18
Ian's vagrant boxes
centos9-katello-devel:
primary: true
box: centos9-stream
cpus: 4
memory: 18000
ansible:
playbook: 'playbooks/katello_devel.yml'
group: 'devel'
variables:
ssh_forward_agent: true
@ianballou
ianballou / persistence.md
Last active November 21, 2025 14:59
Claude generated solution for bootc package persistence in RHSM

Note: generated by Claude Code.

Package Persistence Field Implementation for bootc Systems

Overview

This document explains the implementation of a new persistence field in subscription-manager's package profile functionality. This field helps distinguish between different types of package installations on ostree-based systems like image mode machines.

Background: Why This Feature Was Needed

@ianballou
ianballou / kickstart_default_bootc.erb
Created November 11, 2025 18:35
Default Foreman kickstart provisioning template for image mode machines
<%#
kind: provision
name: Kickstart Default bootc
model: ProvisioningTemplate
oses:
- AlmaLinux
- CentOS
- CentOS_Stream
- Fedora
- RedHat
@ianballou
ianballou / gist:695bc37237673a522a6a0477bffbfa93
Created July 31, 2025 19:30
Connect Claude Code to Katello dev database via MCP
As the vagrant user:
$ npm install -g @modelcontextprotocol/server-postgres
$ claude mcp add postgres-server npx @modelcontextprotocol/server-postgres "postgresql://katello:@localhost:5432/katello"
Example use:
$ claude
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code! │
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: File "/usr/lib/python3.11/site-packages/pulp_container/app/registry_api.py", line 680, in get
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: response = super().get(request)
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: ^^^^^^^^^^^^^^^^^^^^
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: File "/usr/lib/python3.11/site-packages/pulp_container/app/registry_api.py", line 639, in get
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: with storage.open(manifest.config_blob._artifacts.get().file.name) as file:
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: File "/usr/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
Jan 8 21:30:26 centos9-katello-devel-stable pulpcore-api[3002]: retur
{
"bootc.booted.image": " quay.io/centos-bootc/centos-bootc:stream10",
"bootc.booted.version": "stream10.20241202.0",
"bootc.booted.digest": "sha256:54256a998f0c62e16f3927c82b570f90bd8449a52e03daabd5fd16d6419fd572",
"bootc.staged.image": null,
"bootc.staged.version": null,
"bootc.staged.digest": null,
"bootc.rollback.image": "quay.io/centos-bootc/centos-bootc:stream10",
"bootc.rollback.version": "stream10.20241107.0",
"bootc.rollback.digest": "sha256:9ed49e9b189f5dae5a01ea9abdcef0884616300b565d32061aea619f2e916be3",
@ianballou
ianballou / gist:c888991038fa2d941abcd9ac9ff4e86f
Created October 30, 2024 15:31
"Clone" a Foreman host for testing
uuid=$(uuidgen)
short=$(hostname -s)
domain=YOUR.DOMAIN
echo "{\"dmi.system.uuid\": \"${uuid}\"}" > /etc/rhsm/facts/uuid.facts
hostnamectl set-hostname ${short}.${uuid%%-*}.${domain}
subscription-manager clean
subscription-manager register --activationkey YOUR_AK --org YOUR_ORG
@ianballou
ianballou / gist:3f96731a5280bbddb7033a47ab4ffea9
Last active May 16, 2024 16:50
Run acceptance test in puppet-foreman_proxy
BEAKER_SETFILE=centos8-64 BEAKER_HYPERVISOR=vagrant_libvirt BEAKER_PROVISION=yes BEAKER_DESTROY=no bundle exec rspec spec/acceptance/my_test_spec.rb
#BEAKER_DESTROY=no leaves the VM running
#BEAKER_PROVISION=no allows for VM reuse
@ianballou
ianballou / gist:c893e479842bd38f8cbeacd904a3d8c1
Created May 15, 2024 18:00
Container repo with schema v1 manifests
https://gcr.io
google-containers/busybox
@ianballou
ianballou / start_foreman_puma_server.txt
Created February 15, 2024 21:06
Start Foreman Puma server
cd /home/vagrant/foreman && source .env && BIND=0.0.0.0 bundle exec puma -w 3 -p $PORT --preload