Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Leif Madsen leifmadsen

🏠
Working from home
View GitHub Profile
View stf.yaml
apiVersion: infra.watch/v1beta1
kind: ServiceTelemetry
metadata:
name: default
namespace: service-telemetry
spec:
alerting:
alertmanager:
receivers:
snmpTraps:
@leifmadsen
leifmadsen / unifictl-container.md
Last active Oct 8, 2022
UniFi Controller with podman
View unifictl-container.md

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
View grafop-manifest.yml
apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
name: saf-demo
namespace: serviceassurance
spec:
logLevel: ''
config:
security:
admin_password: cloudops
View partition_example.ks
# 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
View prom_to_csv.py
# 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 Oct 8, 2021
Worksheet for 3 node RHHI installation
View rhhi_install.md

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 Oct 23, 2018
Building Realtime Kernel and Starling-X Patches
View realtime_build.md

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 Jul 10, 2018
InfraRed Hybrid Cloud Environment Setup
View infrared_home_network.md

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 Aug 13, 2018
Telemetry Platform Client Side Installation
View telemetry-client-install.md

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.