Skip to content

Instantly share code, notes, and snippets.

View johnpmitsch's full-sized avatar

John Mitsch johnpmitsch

View GitHub Profile
@johnpmitsch
johnpmitsch / foremantests.md
Last active May 12, 2020 14:21
Katello tests with Foreman, running independently

Goals:

  • Match setup to dev and production environment
  • Not duplicate packages in Katello, use them from Foreman, same as we do in production

Steps to set up on a plain centos7 box:

@johnpmitsch
johnpmitsch / spa.md
Last active March 13, 2020 04:54
Multiple SPAs with Foreman research

Goal:

Have Foreman, Katello, and plugins manage their own React SPAs that look and feel like one application. This would be done using single-spa which can send routes to different SPAs and even load different SPAs on the same page.

Challenges:

  • Sharing authentication between SPAs
  • Sharing components
  • Managing "global" state like organization selection
  • Having the same menu
@johnpmitsch
johnpmitsch / box.md
Last active February 20, 2020 14:44
Katello stable box demo

Katello stable development environment

First things first

Spin up the box time vagrant up centos7-katello-devel-stable

What is it?

The katello devel stable box is a forklift box that is guaranteed to spin up successfully with the most recently working Katello development environment.

Why create it?

@johnpmitsch
johnpmitsch / f-maintain.md
Last active February 6, 2020 15:02
Run foreman-maintain on a dev box
  • cd ~ on dev box as vagrant user
  • git clone https://github.com/theforeman/foreman_maintain.git
  • sudo scl enable rh-ruby25 -- gem install bundler
  • sudo scl enable rh-ruby25 -- bundle install
  • Add to .bashrc and run source ~/.bashrc or open up a new terminal
alias foreman_maintain_scl="sudo scl enable rh-ruby25 -- ./bin/foreman-maintain "
  • Run foreman_maintain_scl with foreman maintain arguments in ~/foreman_maintain
@johnpmitsch
johnpmitsch / focaccia.diff
Created January 29, 2020 18:49
run focaccia locally with `RACK_ENV=production bundle exec rackup config.ru`
diff --git a/focaccia/bot.rb b/focaccia/bot.rb
index 7ccdf4d..f279cdd 100755
--- a/focaccia/bot.rb
+++ b/focaccia/bot.rb
@@ -3,7 +3,7 @@
require 'cinch'
# load enviroment variables from .env in development
-require 'dotenv/load' if ENV['RACK_ENV'] == 'development'
+require 'dotenv/load'
@johnpmitsch
johnpmitsch / test.md
Last active January 27, 2020 17:21
hammer testing probs
reset password: sudo PULP_SETTINGS=/etc/pulp/settings.py DJANGO_SETTINGS_MODULE=pulpcore.app.settings python3-django-admin reset-admin-password --password admin
httpie example: http GET http://admin:admin@localhost:24817/pulp/api/v3/repositories/file/file/
(its admin/password on dev box)

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1784165

I publish a Content View (pulp 2 repository) and use conservative dependency solving. The content view has this repo synced https://inecas.fedorapeople.org/fakerepos/zoo3 and we are trying to filter out specific walrus versions

The metadata from https://inecas.fedorapeople.org/fakerepos/zoo/repodata/be20ece13e6c21b132667ddcaa4d7ad0b32e470b9917aba51979e0707116280d-primary.xml.gz shows that chimpanzee requires walrus (see under rpm:requires) and it doesn't have a specific version requirement.

In satellite 6.6:

@johnpmitsch
johnpmitsch / arch.md
Last active February 8, 2020 00:29
Computer Architecture class Winter 2020 - Bradfield School of Computer science

Computer Architecture

Lesson 1

Prework

Fetch-decode-execute cycle:

A CPU is controlled by a clock. On each cycle of the clock it fetches data, decodes it, and executes it.

@johnpmitsch
johnpmitsch / gist:a246fd038dbc38eaf95a5c39ab679b0b
Created December 18, 2019 18:46
search foreman-installer puppet modules
cd foreman-installer, rake pkg:generate_source, grep -r <thing> _build/