This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"text/template" | |
) | |
func replace(a, b, c string, n int) string { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
uid= | |
rhuser "$*" rhatPhoneExt telephoneNumber homePhone | | |
while IFS=' ' read -r key value | |
do | |
if [[ "$key" = 'dn:' ]] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for fn | |
do | |
declare -A seen | |
while [[ -h "$fn" ]] | |
do | |
if [[ -n "${seen[$fn]}" ]] | |
then | |
printf 'Cycle detected; terminating.\n' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |