Skip to content

Instantly share code, notes, and snippets.

View bentito's full-sized avatar

Brett Tofel bentito

  • Red Hat
  • Shelburne, VT
View GitHub Profile
@bentito
bentito / graphholder.js
Created April 30, 2021 19:56
Servicemesh Mermaid Graph
This file has been truncated, but you can view the full file.
Servicemeshoperator Graph from 4.7 RH Index
<svg id="mermaid-1619812178224" width="15456" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="11691.75" viewBox="0 0 15456 11691.75"><style>#mermaid-1619812178224{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1619812178224 .error-icon{fill:#552222;}#mermaid-1619812178224 .error-text{fill:#552222;stroke:#552222;}#mermaid-1619812178224 .edge-thickness-normal{stroke-width:2px;}#mermaid-1619812178224 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1619812178224 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1619812178224 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1619812178224 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1619812178224 .marker{fill:#333333;stroke:#333333;}#mermaid-1619812178224 .marker.cross{stroke:#333333;}#mermaid-1619812178224 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-1619812178224 .label{font-family:"trebuchet ms",ve
@bentito
bentito / mysql_metering.md
Last active March 10, 2021 20:37
getting metering 4.6 running on 4.7 cluster with MySQL 5.7 backing store for Hive

where the namespace I will run metering in is btofel:

oc new-app -n btofel -e MYSQL_USER=mysql -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=hive_metastore -e MYSQL_ROOT_PASSWORD=password  mysql:5.7
@bentito
bentito / gist:3c64e21d3d0ad6f121b6de3c4cb81d4e
Last active December 10, 2020 21:50
Hadoop + Hive Build/Runtime issues for Metering Operator -- trying to get the tip of Hadoop 3.3 branch and latest Hive master (Oct 15, 2020) to work to see if will fix a bug related to S3 bucket contents deletion
│ Exception in thread "main" 2020-10-13T17:23:10.464510059Z java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V2020-10-13T17:23:10.464518738Z │
│ at org.apache.hadoop.conf.Configuration.set(Configuration.java:1382)2020-10-13T17:23:10.464616395Z │
│ at org.apache.hadoop.conf.Configuration.set(Configuration.java:1363)2020-10-13T17:23:10.464630106Z │
│ at org.apache.hadoop.mapred.JobConf.setJar(JobConf.java:536)2020-10-13T17:23:10.464669465Z │
│ at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:554)
#!/bin/bash -ex
# This file is required in the cpaas operator build flow
# reference: https://gitlab.sat.engineering.redhat.com/cpaas/documentation/-/blob/building-operators/schema/product/builds/brew_container_operator.adoc#user-content-render-templates
echo "!!! render_templates !!!"
#echo "Printing all envitronment variables:"
#echo "--- BEGIN ---"
#env
@bentito
bentito / product.yml
Last active September 24, 2020 13:19
OpenShift Metering product has brew build error
---
product:
name: 'openshift-metering'
short-name: 'metering-test'
product-page: 'https://pp.engineering.redhat.com/pp/product/openshift-metering/'
release:
type: 'Y-stream'
# version here will be deprecated in favor of release.yml:release-name at some point
version: '4.7.0'
projects:
```bash
ffmpeg -i ~/Desktop/Screen\ Recording\ 2020-07-14\ at\ 13.16.50.mov -vcodec libx265 -crf 30 ~/Documents/k9s_so_cool.mp4
ffmpeg -i /Users/btofel/Documents/k9s_so_cool.mp4 -c:v copy -c:a copy -tag:v hvc1 /Users/btofel/Documents/k9s_so_cool_mac.mp4
```
@bentito
bentito / debug_reporting_locally_with_crc.md
Last active July 14, 2020 16:27
Debugging Reporting Operator Locally with CRC
make reporting-operator-docker-build

docker tag quay.io/openshift/origin-metering-reporting-operator:4.6 default-route-openshift-image-registry.apps-crc.testing/$METERING_NAMESPACE/reporting-opr:debug

oc new-project $METERING_NAMESPACE

docker login -u kubeadmin -p $(oc whoami -t) default-route-openshift-image-registry.apps-crc.testing
docker push default-route-openshift-image-registry.apps-crc.testing/$METERING_NAMESPACE/reporting-opr:debug
@bentito
bentito / crc_1.11_ocp_4.4.5_min_metering
Last active July 28, 2020 10:59
Identify minimal setup for using Metering with CRC (mostly complete)
Identify minimal setup for using Metering completely with CRC
crc version
crc version: 1.11.0+883ca49
OpenShift version: 4.4.5 (embedded in binary)
No-fuss CR file that works with CRC for installing Metering
cat $METERING_CR_FILE
@bentito
bentito / yum_install_problems.md
Last active June 2, 2020 19:13
Yum install problem packages in CI

Related to this PR: kube-reporting/metering-operator#1213

We don't need to worry about: which inotify-tools ansible openssl They're already available from the Anisble base image.

Notes about installing problem packages python-netaddr, python2-openshift, python2-cryptography:

@bentito
bentito / testing_query.yaml
Last active May 28, 2020 18:16
namespace-persistentvolumeclaim-usage report test discrepancy
apiVersion: metering.openshift.io/v1
kind: ReportQuery
metadata:
name: "namespace-persistentvolumeclaim-usage"
labels:
operator-metering: "true"
spec:
columns:
- name: period_start
type: timestamp