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 May 21, 2021 14:35
forklift 99-local.yaml
---
centos8:
box: centos8
cpus: 4
memory: 10000
centos7-katello-devel:
primary: true
box: centos7
cpus: 4
@ianballou
ianballou / gist:342b53e1c3de6dec07a8c430b984f4a1
Created April 29, 2021 17:47
Install or update Pulp 3 from PyPI on a Katello system
sudo pip3 install scikit-build nose
sudo yum install -y gcc make cmake bzip2-devel expat-devel file-devel glib2-devel libcurl-devel libmodulemd2-devel ninja-build libxml2-devel python36-devel python36-gobject rpm-devel openssl-devel sqlite-devel xz-devel zchunk-devel zlib-devel swig3
sudo pip3 install "git+https://github.com/pulp/pulpcore.git" \
"git+https://github.com/pulp/pulp_file.git" \
"git+https://github.com/pulp/pulp_rpm.git" \
"git+https://github.com/pulp/pulp_container.git" \
"git+https://github.com/pulp/pulp-2to3-migration.git"
cd /tmp
@jjeffers
jjeffers / smart_proxy_container_gateway_setup.md
Last active April 16, 2021 11:46
proxy devel pulpcore smart proxy container gateway setup for testing plugin

On the proxy:

  • yum group install "Development Tools"

  • yum install rh-ruby27-ruby-devel

  • scl enable tfm bash

  • yum install sqlite-dev

  • gem install sqlite

  • gem build smart_proxy_container_gateway.gemspec

  • gem install smart_proxy_container_gateway-x.x.x.gem

  • edit /etc/foreman-proxy/settings.d/container_gateway.yml:

@johnpmitsch
johnpmitsch / w.md
Last active June 28, 2021 21:05
Katello dev server hacky wepback workaround

go to node_modules/webpack-dev-server/lib/Server.js in ~/foreman

around line 496 change protocols: ['h2', 'http/1.1'] to protocols: ['http/1.1'] (remove h2 from the array)

start dev server

NOTE: this will be overwritten when you npm install again

@jeremylenz
jeremylenz / hammer-hack.sh
Last active August 7, 2024 16:24
steal partha's hammer settings and get hammer working on devel box
cd ~/hammer-cli-katello
bundle install
bundle exec bash
cd ~
wget https://partha.fedorapeople.org/devel/hammer.tgz
tar zxf hammer.tgz
ll .hammer # verify there's stuff in that dir
cd hammer-cli-katello
hammer ping
@jlsherrill
jlsherrill / importing_older_postgresql_data.sh
Last active September 21, 2020 18:24
importing older postgresql
#mount large filesystem (200GB) onto /mnt/
setenforce 0
cd /mnt/
tar -xzf pgsql_data.tar.gz
#link /var/lib/pgsql from /mnt
Install dynaconf 3 and update /etc/pulp/settings.py
sudo systemctl stop pulpcore*
sudo su - postgres
dropdb pulp -p 7878
createdb pulp -p 7878
exit
cd /usr/local/lib/pulp/src/pulpcore/
sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' /usr/local/lib/pulp/bin/django-admin migrate --no-input
sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' /usr/local/lib/pulp/bin/django-admin reset-admin-password --password password
@jlsherrill
jlsherrill / test_applicability_timing.rb
Created May 20, 2020 20:12
Test katello applicability timing
Setting[:applicability_batch_size] = 50
number_of_calculations = 1000
total_host_count = Katello::Host::ContentFacet.count
RUNNING_TASK_LABEL = "Actions::Katello::Host::GenerateApplicability"
@jackblk
jackblk / squid_proxy_tutorial.md
Last active February 12, 2025 15:36
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger