Skip to content

Instantly share code, notes, and snippets.

View leifmadsen's full-sized avatar
🏠
Working from home

Leif Madsen leifmadsen

🏠
Working from home
  • Red Hat
  • Caledon, ON, Canada
  • 12:59 (UTC -04:00)
  • LinkedIn in/leifmadsen
View GitHub Profile
apiVersion: infra.watch/v1beta1
kind: ServiceTelemetry
metadata:
name: default
namespace: service-telemetry
spec:
alerting:
alertmanager:
receivers:
snmpTraps:
@leifmadsen
leifmadsen / unifictl-container.md
Last active December 19, 2022 01:59
UniFi Controller with podman

Prerequisites

Installed on Fedora Server 31 after running an update and reboot.

sudo dnf install podman
sudo systemctl enable io.podman.service
sudo systemctl start io.podman.service
sudo firewall-cmd --add-port 8081/tcp --add-port 8080/tcp --add-port 8443/tcp --add-port 8880/tcp --add-port 8843/tcp --zone=FedoraServer --permanent
sudo firewall-cmd --reload
apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
name: saf-demo
namespace: serviceassurance
spec:
logLevel: ''
config:
security:
admin_password: cloudops
@leifmadsen
leifmadsen / partition_example.ks
Created June 4, 2019 16:39
rhhiv-part-example
# clear partitions and write to sda only
clearpart --all --initlabel --drives=sda,sdb,sdc,sdd,sde,sdf,sdg
ignoredisk --only-use=sda
zerombr
part /boot --size 1024 --asprimary --fstype=ext4 --ondrive=sda
part pv.01 --size 200000 --grow --fstype="lvmpv" --ondrive=sda
volgroup vg00 pv.01
logvol swap --name=swap --vgname=vg00 --size=98304 --fstype=swap
logvol none --name=pool --vgname=vg00 --size=1000 --thinpool --grow
# from https://medium.com/@aneeshputtur/export-data-from-prometheus-to-csv-b19689d780aa
import csv
import requests
import sys
def GetMetrixNames(url):
response = requests.get('{0}/api/v1/label/__name__/values'.format(url))
results = response.json()['data']
#Return metrix
@leifmadsen
leifmadsen / rhhi_install.md
Last active October 8, 2021 07:25
Worksheet for 3 node RHHI installation

Overview

Installation notes during setup of 3 node RHHI systems. A lot of manual stuff here that can eventually(?) be automated.

Setup

Install RHVH with default configuration on sda only. Wipe the other disks with:

for i in a b c d e f g; do wipefs -a -f /dev/sd$i; done

@leifmadsen
leifmadsen / realtime_build.md
Created October 23, 2018 20:50
Building Realtime Kernel and Starling-X Patches

Building Realtime Kernel For CentOS

Notes below are steps I followed to build the realtime (RT) kernel for CentOS. Additional notes are included for patching and building the Starling-X changes against the CentOS realtime kernel.

Dependencies

You'll need a physical (or virtual) machine running CentOS 7.5. Others probably work but this is what I used.

@leifmadsen
leifmadsen / infrared_home_network.md
Last active July 10, 2018 19:39
InfraRed Hybrid Cloud Environment Setup

Deployment Commands

VM spinup

ir virsh --host-address localhost --host-key ~/.ssh/id_rsa --topology-nodes "undercloud:1,controller:1" --topology-network bridged_undercloud --disk-pool /home/images/infrared --image-url https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2

Files

undercloud.conf

@leifmadsen
leifmadsen / telemetry-client-install.md
Last active August 13, 2018 14:33
Telemetry Platform Client Side Installation

DEPRECATED

Documentation is now available at https://github.com/redhat-nfvpe/telemetry-framework/tree/master/docs

Installation of the client will result in two containers running, along with two folders installed on the host system which provides the configuration to the Docker containers.

Containers being installed and executing will be barometer and qdr for the Barometer collectd and the local QPID Dispatch Router.