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
#!/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.
% 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
package main
import (
"fmt"
"os"
"strings"
"text/template"
)
func replace(a, b, c string, n int) string {
{{/*
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
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
#!/bin/bash
set -euo pipefail
declare -a uids_ary=( ${1//,/ } )
printf -v uids_list '(uid=%s)' "${uids_ary[@]}"
shift
declare -a criteria=( "(|$uids_list)" )
while [[ "${1-}" = *=* ]]
do
@Miciah
Miciah / phone
Created September 7, 2016 18:46
#!/bin/bash
set -euo pipefail
uid=
rhuser "$*" rhatPhoneExt telephoneNumber homePhone |
while IFS=' ' read -r key value
do
if [[ "$key" = 'dn:' ]]
then
package collaboration
const (
// CollaboratorAnnotation is the key for an annotation on Namespace that
// specifies collaborators on the namespace.
CollaboratorAnnotation = "authorization.openshift.io/collaborators"
)
// CollaboratorType is a type of collaborator on a project.
type CollaboratorType string
#!/bin/bash
for fn
do
declare -A seen
while [[ -h "$fn" ]]
do
if [[ -n "${seen[$fn]}" ]]
then
printf 'Cycle detected; terminating.\n'
---
- name: Print the version of the atomic-openshift-master package from Yum
hosts: all
tasks:
- name: Get package information
yum:
list: atomic-openshift-master
register: pkg