Skip to content

Instantly share code, notes, and snippets.

View dgoodwin's full-sized avatar

Devan Goodwin dgoodwin

  • Red Hat
  • Halifax, Canada
View GitHub Profile
- apiVersion: hive.openshift.io/v1
kind: SyncResource
metadata:
name: SRE-operators
namespace: openshift-hive-global
spec:
labelSelector:
managed: true
objects:
- apiVersion: v1
@dgoodwin
dgoodwin / gist:6c305c4cdae7e8fedf85900847764a88
Created October 1, 2016 19:49
kubeadm with output from pre-pulling docker images
(root@centos1 ~) $ systemctl stop docker
(root@centos1 ~) $ kubeadm init master
<master/tokens> generated token: "c577ff.b591499b65f33385"
I1001 15:25:37.644317 12621 docker.go:324] Connecting to docker on unix:///var/run/docker.sock
I1001 15:25:37.644383 12621 docker.go:344] Start docker client with request timeout=10s
E1001 15:25:37.644557 12621 kube_docker_client.go:98] failed to retrieve docker version: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
W1001 15:25:37.644564 12621 kube_docker_client.go:99] Using empty version for docker client, this may sometimes cause compatibility issue.
error: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
(root@centos1 ~) $ systemctl start docker
(root@centos1 ~) $
- hosts: oo_first_master
tasks:
- debug: var=openshift.common.client_binary
- debug: var=openshift_upgrade_nodes_label
- name: Retrieve list of openshift nodes matching upgrade label
command: >
{{ openshift.common.client_binary }}
get nodes
@dgoodwin
dgoodwin / ansible-log-analyzer.py
Created July 19, 2016 14:21
Ansible Log Scraper
#!/usr/bin/env python
#
# Usage: ansible-log-analyzer.py [LOGFILE]
import re
import sys
from datetime import datetime, timedelta
TASK_RE = re.compile(r'(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}) p=\d+ u=[\w-]* \|\s*TASK: \[(.*)\]')
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
COMMAND="${1:-}"
NAME="${2:-}"
shift
shift
### Keybase proof
I hereby claim:
* I am dgoodwin on github.
* I am dgoodwin (https://keybase.io/dgoodwin) on keybase.
* I have a public key whose fingerprint is ACD6 B560 A1EA 3224 29C9 F9EB 0A2D 1EA7 59F9 6745
To claim this, I am signing this object:
@dgoodwin
dgoodwin / gist:4075220
Created November 14, 2012 22:12
content ID changing
#!/usr/bin/python
#
# For a brief window, content IDs were changed in the product service,
# resulting in the inability to import a new manifest because the content
# label being imported already exists in the db with a different ID.
#
# This script opens a manifest, looks for all the content in it, checks
# the Candlepin database for that content label but with a different ID,
# and if found attempts to update all references to that content to the
# new value so the import can proceed.
bin/rho profile list
Config Encryption Password:
name: this is a really long name
auths:
foo
this is a long ass name
ports:
22
ranges: