Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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-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-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-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-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-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