Skip to content

Instantly share code, notes, and snippets.

Tim Bielawa tbielawa

View GitHub Profile
View config:print --help
$ ./tools/src/oit.py config:print --help
{'odcs_mode': False, 'ignore_missing_base': False, 'group': None, 'images': (), 'sources': None, 'rpms': (), 'latest_parent_version': False, 'quiet': False, 'disabled': False, 'source': (), 'working_dir': None, 'no_oit_comment': False, 'user': None, 'branch': None, 'wip': False, 'debug': False, 'exclude': (), 'metadata': None, 'stage': False}
Usage: oit.py config:print [OPTIONS]
View config for given images / rpms
Options:
-i, --images NAME Name of group image member to include in operation (all
by default). Can be comma delimited list.
-n, --name-only Just print name of matched configs. Overrides --key
View magic.md

Edit your network and add your domain (<domain name='example.com' localOnly='yes'/>) to the network definition. All of your hosts using this network must have hostnames (hostnamectl set-hostname) within the domain.

sudo virsh net-edit default
<network>
  <name>default</name>
  <uuid>a4879b25-1c92-49d6-986b-e9e2cde27678</uuid>
View test_proxy_facts.py
# Run from here: roles/openshift_facts/library/test_set_proxy_facts.py
"""
Some basic testing of the openshift_facts 'set_proxy_facts' function
"""
from pprint import pprint as pp
import copy
import openshift_facts
View openshift_hosted_routers.json
[
{
"name": "router2",
"replicas": 1,
"serviceaccount": "router",
"namespace": "default",
"stats_port": 1941,
"ports": [
"8080:8080",
"6443:6443"
View example_output.log
$ python ./parse_docker_info.py
Sizes as parsed using bitmath from 'docker info':
{'memtotal_mb': MB(15470.0), 'TotalMemory': GiB(15.11), 'DataSpaceAvailable': GB(43.01), 'DataSpaceTotal': GB(44.43)}
-----------------------
diskleft percent: 96.8039612874%
-----------------------
Sizes as from to_gigabytes:
memtotal_mb 15.47 GB
View junkformatter.py
$ python ./junkformatter.py
{'failed': True,
'msg': 'All objects are not valid. If you are a supported customer please\ncontact Red Hat Support providing the complete output above. If you\nare not a customer please contact users@lists.openshift.redhat.com for\nassistance.',
'results': 'all_invalid',
'state': 'list'}
{'msg': 'All objects are not valid. If you are a supported customer please\ncontact Red Hat Support providing the complete output above. If you\nare not a customer please contact users@lists.openshift.redhat.com for\nassistance.', 'failed': True, 'state': 'list', 'results': 'all_invalid'}
View fixup_cert_parsing_tests.patch
From 21713422e20dd80e24a758ff4c700da2e4c1c3b8 Mon Sep 17 00:00:00 2001
From: Tim Bielawa <tbielawa@redhat.com>
Date: Tue, 28 Feb 2017 11:19:48 -0800
Subject: [PATCH] Add another cert parsing test
---
.../test/test_fakeopensslclasses.py | 55 +++++++++++++++++++++-
1 file changed, 53 insertions(+), 2 deletions(-)
diff --git a/roles/openshift_certificate_expiry/test/test_fakeopensslclasses.py b/roles/openshift_certificate_expiry/test/test_fakeopensslclasses.py
View NamedCertificates.md

OpenShift Named Certificates

This is a short guide explaining how to deploy and manage custom certificates via openshift-ansible. These custom certificates will be served for public facing UI/API.

1. Set up

NOTE: I'm running ansible from the first master so I'm creating the certificates in /root/ on my first master. The certificates will be copied to the masters (within /etc/origin/master/named_certificates/) by ansible. I could create them on my local system and run ansible from my local system instead.

1.1 Create CA Certificate

View NamedCertificates.md

OpenShift Named Certificates

This is a short guide explaining how to deploy and manage custom certificates via openshift-ansible. These custom certificates will be served for public facing UI/API.

1. Set up

NOTE: I'm running ansible from the first master so I'm creating the certificates in /root/ on my first master. The certificates will be copied to the masters (within /etc/origin/master/named_certificates/) by ansible. I could create them on my local system and run ansible from my local system instead.

1.1 Create CA Certificate

View NamedCertificates.md

OpenShift Named Certificates

This is a short guide explaining how to deploy and manage custom certificates via openshift-ansible. These custom certificates will be served for public facing UI/API.

1. Set up

NOTE: I'm running ansible from the first master so I'm creating the certificates in /root/ on my first master. The certificates will be copied to the masters (within /etc/origin/master/named_certificates/) by ansible. I could create them on my local system and run ansible from my local system instead.

1.1 Create CA Certificate

You can’t perform that action at this time.