Skip to content

Instantly share code, notes, and snippets.

View Miciah's full-sized avatar

Miciah Dashiel Butler Masters Miciah

  • Red Hat, Inc.
  • North Carolina
View GitHub Profile
CA="$HOME/openshift.local.config/master"
oadm ca create-server-cert \
--signer-cert="$CA/ca.crt" \
--signer-key="$CA/ca.key" \
--signer-serial="$CA/ca.serial.txt" \
--hostnames='accountant-frontend.54.84.142.164.xip.io' \
--cert=accountant-route.crt \
--key=accountant-route.key
{{/*
haproxy-config.cfg: contains the main config with helper backends that are used to terminate
encryption before finally sending to a host_be which is the backend that is the final
backend for a route and contains all the endpoints for the service
*/}}
{{ define "/var/lib/haproxy/conf/haproxy.config" }}
{{ $workingDir := .WorkingDir }}
global
# maxconn 4096
daemon
package main
import (
"fmt"
"os"
"strings"
"text/template"
)
func replace(a, b, c string, n int) string {
% dig worldgreenpower.com
; <<>> DiG 9.9.4-RedHat-9.9.4-18.el7_1.5 <<>> worldgreenpower.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25360
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
#!/bin/bash
# This script boots a nameserver; an
# arbitrary number of hosts that it configures as OpenShift brokers; an
# arbitrary number of hosts that it configures as OpenShift nodes; an
# arbitrary number of hosts that it configures as ActiveMQ brokers; and
# an arbitrary number of hosts that it configures as MongoDB replicants.
set -uo pipefail
# Don't use set -e because that interferes with the trap command.
@Miciah
Miciah / oc-run
Last active April 15, 2016 20:00
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --port=80 --expose --dry-run -o json > ,one-port
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --overrides='{"apiVersion":"v1","spec":{"template":{"spec":{"containers":[{"name":"jenkins-master","image":"docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos","ports":[{"containerPort":80},{"containerPort":41000}]}]}}}}' --expose --dry-run -o json > ,two-ports
error: --port must be a positive integer when exposing a service
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --port=80 --overrides='{"apiVersion":"v1","spec":{"template":{"spec":{"containers":[{"name":"jenkins-master","image":"docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos","ports":[{"containerPort":80},{"containerPort":41000}]}]}}}}' --expose --dry-run -o json > ,two-ports
$ diff -u ,one-port ,two-ports
--- ,one-port 201
#!/usr/bin/ruby
require 'aws-sdk'
require 'getoptlong'
require 'net/ssh'
require 'parseconfig'
REGIONS = {
'us-east-1' => 'N. Virginia',
'us-west-2' => 'Oregon',
QE, we want to test a configuration that is a variation on the standard HA
(multi-broker) configuration with F5 BIG-IP plus routing-daemon. In particular,
we want to set up clustered F5 BIG-IP, we want to colocate an instance of the
routing-daemon on *each* broker host, and we want to ensure that ActiveMQ is
configured with redelivery enabled.
Our goal is to verify that this configuration works as expected and that we can
support it for customers.
The standard openshift.sh installation script can perform most of the
% g merge dinhxuanvu/enterprise-rhc/enterprise-2.2
Auto-merging rel-eng/packages/rhc
CONFLICT (content): Merge conflict in rel-eng/packages/rhc
Auto-merging client.spec
CONFLICT (content): Merge conflict in client.spec
Automatic merge failed; fix conflicts and then commit the result.
zsh: exit 1 git merge dinhxuanvu/enterprise-rhc/enterprise-2.2
# Based on <https://github.com/openshift/openshift-ansible/tree/master/playbooks/adhoc/s3_registry>.
# Deploy the image registry:
oadm registry --config=/openshift.local.config/master/admin.kubeconfig --credentials=/openshift.local.config/master/openshift-registry.kubeconfig
# Scale the image registry down:
oc scale --replicas=0 dc/docker-registry
# Write out configuration:
cat > /root/config.yml <<EOF