Skip to content

Instantly share code, notes, and snippets.

@markllama
markllama / kubernetes_pulp_beat_pod
Created September 26, 2014 13:53
The JSON description of a Pulp Beat container for Kubernetes
{
"id": "pulp-beat",
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "pulp-beat",
"containers": [{
"name": "pulp-beat",
"image": "markllama/pulp-beat",
"env": [{
#!/bin/sh
set -x
#
# Use the test_db_available.py script to poll for the DB server
#
wait_for_database() {
DB_TEST_TRIES=12
DB_TEST_POLLRATE=5
@markllama
markllama / docker_pulp_beat_Dockerfile
Created September 23, 2014 21:02
A Dockerfile which composes a Pulp beat server from the base image
FROM markllama/pulp-base
MAINTAINER Mark Lamourine <[email protected]>
#
# Pulp Celerybeat service - coordinate activities
#
# Environment Variables:
# DB_SERVER_HOST: name or IP address of the MongoDB server
# DB_SERVER_PORT: TCP port for MongoDB (default: 27017)
# MSG_SERVER_HOST: name or IP address of the qpid server
@markllama
markllama / augeas_pulpini_lens
Created September 12, 2014 20:14
An Augeas lens for Pulp INI configuration files
(* PulpIni module for Augeas *)
(* Author: Mark Lamourine <[email protected]> *)
(* Stolen whole cloth from MySQL by Tim Stoop <[email protected]> *)
(* Heavily based on php.aug by Raphael Pinson *)
(* <[email protected]> *)
(* *)
module PulpIni =
autoload xfm
@markllama
markllama / docker_pulp_base_Dockerfile
Last active August 29, 2015 14:06
A Dockerfile for a base image to create Pulp service components
FROM fedora:20
MAINTAINER Mark Lamourine <[email protected]>
# Pulp uses syslog. All derivative containers must mount /dev/log
ADD https://repos.fedorapeople.org/repos/pulp/pulp/fedora-pulp.repo \
/etc/yum.repos.d/fedora-pulp.repo
RUN yum groupinstall -y pulp-server && \
yum install -y python-qpid-qmf python-qpid python-pulp-rpm-common && \
@markllama
markllama / kube_mongodb_service_struct
Last active August 29, 2015 14:06
A simple Kubernetes service description for MongoDB
{
"kind": "Service",
"apiversion": "v1beta1",
"id": "db",
"port": 27017,
"publicIPs": ["10.245.1.3"],
"selector": {
"name": "db"
},
}
@markllama
markllama / kube_pod_get_reply
Last active August 29, 2015 14:06
A reply to a query for the status of a Kubernetes Pod
{
"kind": "Pod",
"id": "pulpdb",
"uid": "4bac8381-8537-11e4-a18b-0800279696e1",
"creationTimestamp": "2014-12-16T15:22:06Z",
"selfLink": "/api/v1beta1/pods/pulpdb?namespace=default",
"resourceVersion": 22,
"apiVersion": "v1beta1",
"namespace": "default",
"labels": {
@markllama
markllama / kube_pod_struct
Created September 3, 2014 18:15
Kubernetes Pod Structure Definition
// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
type Pod struct {
JSONBase `json:",inline" yaml:",inline"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
DesiredState PodState `json:"desiredState,omitempty" yaml:"desiredState,omitempty"`
CurrentState PodState `json:"currentState,omitempty" yaml:"currentState,omitempty"`
}
@markllama
markllama / kube_pulp_db_container
Last active August 29, 2015 14:06
MongoDB pod description for Pulp database in Kubernetes
{
"id": "pulpdb",
"kind": "Pod",
"apiVersion": "v1beta1",
"labels": {
"name": "db"
},
"desiredState": {
"manifest": {
"version": "v1beta1",
{
"id": "pulpdb",
"kind": "Pod",
"apiVersion": "v1beta1",
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "pulp_db",
"containers": [{
"name": "pulp-db",