Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]>
#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 && \
@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 / 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 / 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 / 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 / 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 / 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 / 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 / fedora19-acer-s17-191.adoc
Last active December 26, 2015 17:29
Installing Fedora 19 on an Acer S7 191-6400

This document describes installing Fedora 19 Linux on an Acer S7-191-6400 ultrabook.

This is a lightweight laptop with an 11.6" display with 1920x1080 CineCrystal display, 4GB memory and two 64GB SSDs striped.

The laptop also uses UEFI boot rather than traditional BIOS.

Preparation

The S7 comes with Windows 8 pre-loaded. Be sure to create restore media on an 8gb+ USB stick.

You must enable boot media selection in BIOS (EFI). Power on and hold the FN-F2 keys at the Acer splash screen. Enable the FN-F12 boot selection.

@markllama
markllama / update-ec2-principals.py
Created October 11, 2013 21:41
A small script, meant to be run from cloud-init, to update the dynamic hostname principals for a registered host within a Kerberos realm inside AWS EC2
#!/usr/bin/python
#
# A small script to update FreeIPA host entry with EC2 dynamic host principals
#
#
import sys, os
import ldap, ldap.sasl
kerberos_server_ldap_url = sys.argv[1]
admin_principal_string = sys.argv[2]