Skip to content

Instantly share code, notes, and snippets.

View wgordon17's full-sized avatar

Will Gordon wgordon17

  • Red Hat
  • North Carolina
  • 09:27 (UTC -04:00)
View GitHub Profile

Full field template

field

The name of the variable to output for ansible yaml file

  • string
  • required
  • default: None
form:
- field: g_aws_account_id
label: Cloud account number, e.g. '1234567890'
internal_comments: |
Although this value looks like a number, it is a string.
You *must* put it in quotes if it has a leading zero
otherwise the YAML parser will interpret it as an octal (base 8)
number. For example, put "010" not 010, which would be interpreted
as the number 8.
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$ oc project test-ci-openshift-no-fim
Now using project "test-ci-openshift-no-fim" on server "https://openshift-dev.cern.ch:443".
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$ oc create sa other-admin
serviceaccount "other-admin" created
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$ oc policy add-role-to-user admin system:serviceaccounts:test-ci-openshift-no-fim:other-admin
role "admin" added: "system:serviceaccounts:test-ci-openshift-no-fim:other-admin"
wojtek@pcuds54:~/Desktop/smieci/fsharp/fsharponacci$ oc new-app --token=$(oc sa get-token other-admin) registry.access.redhat.com/dotnet/dotnet-20-rhel7~https://gitlab.cern.ch/wkulma/devforum
--> Found Docker image 9c4630d (2 weeks old) from registry.access.redhat.com for "registry.access.redhat.com/dotnet/dotnet-20-rhel7"
# coding=utf-8
"""
openshift_sre.py - Various helper modules for OpenShift Online SRE team
Copyright © 2017, Will Gordon <wgordon@redhat.com>
Licensed under the MIT license.
"""
from __future__ import unicode_literals, absolute_import, print_function, division
import re
from sopel.module import commands, example, rule, url, interval
from sopel.config.types import (
@wgordon17
wgordon17 / async_oauth.py
Created October 17, 2018 17:35
Async Flask for oauth during testing
import json
import os
from multiprocessing import Process, Queue
from flask import Flask, request
from requests_oauthlib import OAuth2Session
from pytest import fixture
app = Flask(__name__)
@wgordon17
wgordon17 / minimal-dc.yaml
Created November 1, 2018 19:09
An example of minimum required deployment config for OpenShift
kind: DeploymentConfig
apiVersion: v1
metadata:
name: minimal-dc
spec:
replicas: 1
selector:
name: busybox
template:
metadata:
time="2018-12-14T13:05:06-05:00" level=debug msg="Fetching \"Terraform Variables\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg="Loading \"Terraform Variables\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Install Config\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Cluster ID\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"SSH Key\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Base Domain\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Cluster Name\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Pull Secret\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Platform\"..."
time="2018-12-14T13:05:06-05:00" level=debug msg=" Loading \"Bootstrap Ignition Config\"..."
# Console DNS failure
2019-01-03 15:50:40.670231 UTC - [Parent 46910: Main Thread]: D/nsHostResolver Resolving host [console-openshift-console.apps.openshift.willandsteph.com] - bypassing cache type 0. [this=0x118a68310]
2019-01-03 15:50:40.670243 UTC - [Parent 46910: Main Thread]: D/nsHostResolver No usable record in cache for host [console-openshift-console.apps.openshift.willandsteph.com] type 0.
2019-01-03 15:50:40.670257 UTC - [Parent 46910: Main Thread]: D/nsHostResolver DNS thread counters: total=2 any-live=0 idle=2 pending=1
2019-01-03 15:50:40.670267 UTC - [Parent 46910: Main Thread]: D/nsHostResolver DNS lookup for host [console-openshift-console.apps.openshift.willandsteph.com] blocking pending 'getaddrinfo' or trr query: callback [0x141872ee0]
2019-01-03 15:50:40.670285 UTC - [Parent 46910: DNS Resolver #5]: D/nsHostResolver DNS lookup thread - Calling getaddrinfo for host [console-openshift-console.apps.openshift.willandsteph.com].
2019-01-03 15:50:40.671341 UTC - [Parent 46910: DNS Resolve
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "learning-portal-production",
"annotations": {
"openshift.io/display-name": "Learning Portal (Production)"
}
},
"parameters": [
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.