Skip to content

Instantly share code, notes, and snippets.

@markllama
markllama / oo-add-repos.sh
Created March 22, 2013 15:51
Add and tweak Yum repositories for a custom OpenShift Origin broker installation.
#!/bin/sh
#
# Create yum repo files before installation
# Also tune fedora repos to avoid conflicts
#
#
# usage: sh ./oo-add-repos.sh <ORIGIN_SERVER_BASEURL>
#
# SUDO=echo sh.... if you want
@markllama
markllama / oo-broker-fix-requirements.sh
Last active December 15, 2015 07:19
Tweak RPM and gem requirements for OpenShift Origin broker on Fedora 18
#!/bin/sh
#
# After the OpenShift broker is installed on Fedora 18, there are some
# remaining tasks before you can actually start configuring it.
#
# These are primarily due to gems or packages that have not yet made it into the
# Fedora 18 distribution and updates.
#
# This is as of 2013-03-22, expect changes.
#
@markllama
markllama / oo-rake
Last active December 15, 2015 07:49
Define tasks to install requirements, build RPMs and generate Yard docs.
#!/usr/bin/rake -f
#
# Tasks to install build requirement packages, build RPMs and generate documentation pages.
#
# chmod a+x oo-rake
# oo-rake [--tasks]| <task>
#
require 'rake'
# use recursive tasks
@markllama
markllama / oo-build
Last active December 15, 2015 23:20
A Thor script to assist in building OpenShift Origin (and other) packages.
#!/usr/bin/env ruby
#
# A set of tasks to prepare and build the OpenShift Origin source tree
# into packages
#
require 'rubygems'
require 'thor'
# Used to search for spec files and other marker files within the source tree
require 'find'
@markllama
markllama / oo-skel-site.pp
Last active December 20, 2015 17:09
An example site fragment for an OpenShift Origin service description.
#
# OpenShift Origin service definitions
#
$openshift = {
# OpenShift Service Parameters
cloud_domain => 'app.example.org',
broker_hosts => ['broker.infra.example.org'],
datastore => {
plugin => 'mongo',
@markllama
markllama / oo-skel-nodes.pp
Created August 6, 2013 17:34
A set of node definitions using the information from the master service class
#
# Node definitions for an OpenShift Origin service
#
node 'broker.infra.example.org' {
class {'mcollective::client':
}
@markllama
markllama / oo-skel-secrets.pp
Created August 6, 2013 17:39
The sensitive information for an OpenShift Origin service
#
# Instantiate a single class containing all of the passwords for the service
# This must NOT be checked into Git in clear text
#
# All values here must be changed for real use even for demos
class {'openshift::secrets':
datastore => 'dbsecret',
publication => 'dnssecret',
message_bus => 'activemqsecret',
message_end => 'mcollectivesecret',
@markllama
markllama / cartridge_repository_action.rb
Created September 26, 2013 19:00
The portion of openshift.rb which defines the cartridge_repository_action function for managing cartridges on OpenShift nodes.
def cartridge_repository_action
Log.instance.info("action: #{request.action}_action, agent=#{request.agent}, data=#{request.data.pretty_inspect}")
action = request[:action]
path = request[:path]
name = request[:name]
version = request[:version]
cartridge_version = request[:cartridge_version]
reply[:output] = "#{action} succeeded for #{path}"
begin
@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]
@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.