Skip to content

Instantly share code, notes, and snippets.

View sjha4's full-sized avatar

Samir Jha sjha4

View GitHub Profile

Developing smart_proxy_container_gateway in the containerized environment

This documents how to do live development on the smart_proxy_container_gateway plugin against a foremanctl-deployed foreman-proxy container.

How it works

A systemd drop-in config volume-mounts your local git checkout of the plugin's lib/ directory over the RPM-installed gem inside the container. Edits to local files take effect on the next container restart — no image rebuild needed.

@sjha4
sjha4 / restore_proxy.patch
Created June 25, 2026 18:27
Restore changes to support proxy flavor
[root@ip-10-0-168-10 backup]# cat /tmp/backup/foreman-proxy-restore.patch
From: Claude Code
Date: Thu, 25 Jun 2026
Subject: [PATCH] Fix restore for foreman-proxy installations
Make foreman database restoration and deployment conditional based on
installation flavor to support foreman-proxy systems that don't have
the foreman database or full foreman services.
Changes:
@sjha4
sjha4 / test-restore-final.sh
Last active June 2, 2026 14:44
Foremanctl Backup Restore Script - Complete with all fixes from May 2026 testing
#!/bin/bash
#
# test-restore-final.sh - Same-box restore testing for foremanctl backup
#
# Usage: ./test-restore-final.sh /path/to/backup/foreman-backup-TIMESTAMP
#
# This script performs a DESTRUCTIVE restore on the same box:
# - Drops and recreates all databases
# - Restores database dumps
# - Fixes database ownership and permissions
@sjha4
sjha4 / foremanctl-backup-restore-testing.md
Last active May 13, 2026 02:32
Foremanctl Backup & Restore Testing Guide - Complete Procedure with Restore Script

Foremanctl Backup & Restore Testing Guide

Purpose: Complete testing procedure for foremanctl offline backup and restore functionality
Target: Same-box restore testing (hostname must match)
Duration: 30-60 minutes
Date: 2026-05-12


Overview

@sjha4
sjha4 / foremanctl-backup-summary.md
Created May 12, 2026 17:47
foremanctl Offline Backup - Implementation Summary for foreman-maintain Team

foremanctl Offline Backup - Implementation Summary

Date: 2026-05-12
Branch: backup-offline-implementation
Repository: https://github.com/sjha4/foremanctl
Target Audience: foreman-maintain team for evaluation


Executive Summary

@sjha4
sjha4 / katello-repository-setup.md
Created May 12, 2026 15:35
Foreman/Katello Repository Setup Guide

Katello Repository Setup Script

This document contains executable hammer commands to create and sync repositories in Foreman/Katello.

Prerequisites

  • Foreman/Katello server installed and running
  • Hammer CLI configured with admin credentials
  • Internet connectivity for repository synchronization
@sjha4
sjha4 / PULP_FILESYSTEM_BACKUP_ANALYSIS.md
Created May 12, 2026 15:11
Pulp Filesystem Backup Analysis - foreman-maintain vs foremanctl containerized approach

Pulp Filesystem Data Backup Analysis

What foreman-maintain Does

Location: /root/foreman_maintain/definitions/procedures/backup/pulp.rb

Backs Up: /var/lib/pulp

Includes:

  • /var/lib/pulp/media - Repository content (RPMs, errata, container images, etc.)
@sjha4
sjha4 / RESTORE_IMPLEMENTATION_GUIDE.md
Created May 11, 2026 20:10
foremanctl Offline Backup - Restore Implementation Guide

foremanctl Restore Implementation Guide

Executive Summary

This guide provides a complete step-by-step process to restore a Foreman/Katello deployment from a foremanctl backup. The backup includes all critical components needed for a full restoration.

Estimated Restore Time: 30-60 minutes (depending on volume data size) Complexity Level: MEDIUM Risk Level: Requires service downtime

@sjha4
sjha4 / foremanctl-backup-testing.md
Created May 11, 2026 19:21
foremanctl Offline Backup Testing Guide

Testing foremanctl Offline Backup

Complete steps to test the offline backup feature for foremanctl in a QE/production environment.

Prerequisites

  • Deployed foremanctl installation with Foreman/Katello
  • Root or sudo access
  • At least 50MB free disk space for backups
@sjha4
sjha4 / foremanctl-restore-evaluation.md
Created May 11, 2026 18:21
Foremanctl Restore Implementation Evaluation - Database Restore Design for Containerized Foreman

Foremanctl Restore Implementation Evaluation

Date: 2026-05-11
Context: Evaluating restore functionality for foremanctl based on backup implementation and foreman-maintain restore behavior
Related: Backup Evaluation


Executive Summary