Skip to content

Instantly share code, notes, and snippets.

@mccun934
mccun934 / gencerts.sh
Created November 14, 2017 20:10 — forked from JacobCallahan/gencerts.sh
Satellite certificate generator script
#! /bin/bash
git clone https://github.com/iNecas/ownca.git
cd ownca
yes "" | ./generate-ca.sh
yes | ./generate-crt.sh $(hostname)
certdir="$(pwd)/$(hostname)/"
cp cacert.crt $(hostname)/
cd $(hostname)
katello-certs-check -c "$(hostname).crt" -k "$(hostname).key" -r "$(hostname).crt.req" -b cacert.crt
@mccun934
mccun934 / debugging_errata.md
Created November 8, 2017 14:38 — forked from jlsherrill/debugging_errata.md
debugging errata issues

Run all of these in 'foreman-rake console'

Check the event queue:

Katello::Event.count

Check 'bound repositories' known to katello

@mccun934
mccun934 / file_repogen.rb
Created May 17, 2017 15:33 — forked from jlsherrill/file_repogen.rb
Generate pulp file repos
#!/usr/bin/env ruby
def collect_files(files)
lines = []
files.collect do |file|
if File.lstat(file).symlink? && File.directory?(file)
sub_files = collect_files(Dir.glob("#{file}/**/*"))
lines.concat(sub_files)
next
elsif File.directory?(file)
@mccun934
mccun934 / dynflow_increase_workers.sh
Created May 10, 2017 16:50 — forked from iNecas/dynflow_increase_workers.sh
Increase number of workers for dynflow in Foreman
cat <<EOF > /usr/share/foreman/config/initializers/foreman_tasks_workers_bump.rb
workers_count = 10
Rails.logger.info("Bumping the number of dynflow worksers to #{workers_count}")
ForemanTasks.dynflow.config.pool_size = workers_count
EOF
service foreman-tasks restart
yum install -y libvirt
service libvirtd start
puppet module install -i /tmp domcleal/katellovirt
echo "Full NAT Forwarding"
cd /tmp/katellovirt/
grep -v virbr manifests/libvirt.pp > tempfile
cp tempfile manifests/libvirt.pp