Skip to content

Instantly share code, notes, and snippets.

View liveaverage's full-sized avatar
⚙️

J.R. Morgan liveaverage

⚙️
View GitHub Profile
@liveaverage
liveaverage / nv-ds-htpasswd.yaml
Last active May 4, 2022 13:57
OpenShift GPU Monitoring Configuration
apiVersion: integreatly.org/v1alpha1
kind: GrafanaDataSource
metadata:
name: nv-ds
namespace: nvidia-gpu-operator
spec:
datasources:
- basicAuthUser: nvadmin
access: proxy
editable: true
@liveaverage
liveaverage / TsAndCs.html
Created March 18, 2022 21:42
Terms and Conditions Modal Dialog
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://raw.githack.com/liveaverage/jquery-modal/master/jquery.modal.css" />
<div id="tnc" class="modal" style="display: none;" >
<p>Sign your life away</p>
<div><a href="#" class="btn float-right" onclick="acceptTerms()" rel="modal:close">Accept</a></div>
<div><a href="#" class="btn btn-neutral float-left">Decline</a></div>
</div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
if(localStorage.getItem('tcstate') != 'shown'){
@liveaverage
liveaverage / zyncque-letsencrypt-fix.sh
Created January 27, 2022 12:44
Workaround for zync-que CA/cert validation errors using Let's Encrypt certificates
### POSSIBLE FIX with ZEROSSL – execute as opentlc-mgr
oc new-project z-ngx
oc new-app --docker-image=quay.io/shifti/openshift-nginx-adc:latest --name=ngx -n z-ngx
oc expose service/ngx
## Backup existing routes
oc get route keycloak -n sso -o yaml | kubectl neat > route-keycloak-orig.yaml
oc get route keycloak-metrics-rewrite -n sso -o yaml | kubectl neat > route-keycloak-met-orig.yaml
oc get route ngx -n z-ngx -o yaml | kubectl neat > route-ngx-orig.yaml
@liveaverage
liveaverage / sno-storage-cluster.yaml
Created November 12, 2021 18:41
Single Node Storage Cluster (Unsupported; Testing only)
apiVersion: ocs.openshift.io/v1
kind: StorageCluster
metadata:
name: ocs-storagecluster
namespace: openshift-storage
spec:
encryption: {}
externalStorage: {}
managedResources:
cephBlockPools: {}
@liveaverage
liveaverage / memusage.sh
Created June 24, 2021 19:02
Memory Usage
#!/bin/bash
ps -eo size,pid,user,command --sort -size | \
awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |\
cut -d "" -f2 | cut -d "-" -f1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingressroutes.traefik.containo.us
spec:
group: traefik.containo.us
version: v1alpha1
names:
@liveaverage
liveaverage / README.md
Last active October 8, 2020 19:09
GitLab CI/CD Pipeline

GitLab CI/CD Pipeline Configuration

Save the following contents to .gitlab-ci.yml within your new or existing Ansible role project/repository:

image: python:3-slim

before_script:
  - pip install ansible-lint
 - ansible-lint --version
@liveaverage
liveaverage / create_ocp_project.yaml
Created June 30, 2020 20:10
OCP 4 Project Provisioning and Quota Assignment
- name: Create OpenShift Resources
hosts: localhost
connection: local
vars:
oc_master: lab.gxr.me
requestor: jrmorgan
useremail: [email protected]
project: sample
initjenkins: no
quota: silver
@liveaverage
liveaverage / playbyplay.sh
Last active June 25, 2020 01:15
OCP 4.5 vSphere IPI Install
# Grab your vSphere cert and ensure it's trusted
openssl s_client -connect vcsa.gxr.me:443 -showcerts
# Copy BEGIN/END Certificate contenst to /etc/pki/tls/certs/vsphere.pem
# Prior to OpenShift cluster install, identify base domain and cluster name, reserve (2) IPs and create (2) DNS A records:
# - 192.168.20.99 (api.gnv.int.shifti.us)
# - 192.168.20.98 (*.apps.gnv.int.shifti.us)
@liveaverage
liveaverage / remove_gitlab_artifacts.sh
Created April 28, 2020 19:33 — forked from carceneaux/remove_gitlab_artifacts.sh
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#