Skip to content

Instantly share code, notes, and snippets.

@markllama
markllama / pr_request.py
Last active December 31, 2015 20:59
Pull and report some information on a specific PR from the openshift origin-server repository
#!/usr/bin/python
#
# Protocol defined in:
# http://developer.github.com/v3/
#
import sys, os
import requests
github_url_root = "https://api.github.com/"
username = '<yourgitusername>'
@markllama
markllama / schema2ldif.sh
Last active April 12, 2023 14:47
Convert LDAP Schema to LDIF
#!/bin/bash
#
# Stolen from https://stuckinadoloop.wordpress.com/2011/04/14/script-to-convert-openldap-schema-files-to-ldif-format/
SCHEMAD=/etc/openldap/schema
SCHEMAS='dhcp.schema'
tmpd=`mktemp -d`
pushd ${tmpd} >>/dev/null
@markllama
markllama / Katello Installer Help and Options
Created July 16, 2014 20:22
Katello Installer Help and Options
Usage:
katello-installer [OPTIONS]
Options:
= Generic:
--reset This option will drop the Katello database and clear all subsequent backend data stores.You will lose all data! Unfortunately we
can't detect a failure at the moment so you should verify the success
manually. e.g. dropping can fail when DB is currently in use. (default: false)
--[no-]colors Use color output on STDOUT (default: true)
@markllama
markllama / Pulp installed by Puppet
Last active August 29, 2015 14:04
A rudimenatry puppet script to install Pulp on Fedora 19 or RHEL6
if $::operatingsystem == 'Fedora' or $::operatingsystemmajrelease > 6 {
exec {'open firewall ports':
command => '/usr/bin/firewall-cmd --zone public --add-service http --add-service https ; /usr/bin/firewall-cmd --zone public --add-port 5671/tcp --add-port 5672/tcp'
}
} else {
exec {'open firewall ports':
command => '/usr/sbin/lokkit --service http --service https --port 5671:tcp --port 5672:tcp'
}
}
@markllama
markllama / gist:ba4c87602c36a988b5ac
Last active August 29, 2015 14:05
Hacking Golang on Fedora 20 (for Kubernetes build/test)
#golang on Fedora 20 as of today has some problems which get in the way of working with Kubernetes.
# A number of people have suggested just building go from source but a couple of ugly hacks have gotten me past it for now.
#
# 1) install a patched go from koji (possibly not needed, see 2)
# from maxamillion's paste:
# http://fpaste.org/123906/74249921
yum localinstall https://kojipkgs.fedoraproject.org//work/tasks/1170/7251170/golang-1.3-5.fc20.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/1170/7251170/golang-src-1.3-5.fc20.noarch.rpm https://kojipkgs.fedoraproject.org//work/tasks/1170/7251170/golang-vim-1.3-5.fc20.noarch.rpm https://kojipkgs.fedoraproject.org//work/tasks/1170/7251170/golang-pkg-bin-linux-amd64-1.3-5.fc20.x86_64.rpm https://kojipkgs.fedoraproject.org//work/tasks/1170/7251170/golang-pkg-linux-amd64-1.3-5.fc20.noarch.rpm
# 2 install dang, I have to try it again to remember to install a part before running hack/build-go.sh
@markllama
markllama / test_qpid.py
Last active August 29, 2015 14:05
Test QPID echo
#!/usr/bin/python
import sys
from qpid.messaging import *
broker = sys.argv[1] + ":5672"
address = "amq.topic"
connection = Connection(broker)
@markllama
markllama / install_kubernetes.sh
Created August 14, 2014 16:35
Enable COPR repo for Atomic and install Kubernetes
#!/bin/sh
sudo yum -y install dnf dnf-plugins-core
sudo dnf copr enable walters/atomic-next
sudo yum install -y etcd kubernetes
@markllama
markllama / docker_mongodb_Dockerfile
Last active October 10, 2019 23:10
A Dockerfile for a MongoDB container based on Fedora 20
FROM fedora:20
MAINTAINER Mark Lamourine <markllama@gmail.com>
#COMMENT { "description": "mongodb service container", \
# "usage": "docker run -d -p 27017:27017 --name mongodb mlamouri/mongodb --volume=/mydbdatadir:/var/lib/mongodb" }
RUN yum install -y mongodb-server && yum clean all
RUN mkdir -p /var/lib/mongodb && \
touch /var/lib/mongodb/.keep && \
##
### Basic Defaults
##
dbpath = /var/lib/mongodb
smallfiles = true
nohttpinterface = true
noprealloc = true
FROM fedora:20
MAINTAINER Mark Lamourine <markllama@gmail.com>
#COMMENT { "description": "Qpid server image", \
# "usage": "docker run -d -p 5672:5672 --name pulp-qpid fedora/qpid" }
RUN yum install -y qpid-cpp-server qpid-cpp-server-store python-qpid-qmf python-qpid && \
yum clean all
ADD . /.qpidd