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
  • 06:28 (UTC -04:00)
View GitHub Profile
@leifmadsen
leifmadsen / openshift_storage_servicecatalog.json
Last active January 17, 2023 22:01
OpenShift+Storage+Service Catalogs
# vim: set ft=yaml shiftwidth=2 tabstop=2 expandtab :
openshift-lb ansible_host=openshift-lb.nfvpe.site
openshift-master-1 ansible_host=openshift-master-1.nfvpe.site
openshift-master-2 ansible_host=openshift-master-2.nfvpe.site
openshift-master-3 ansible_host=openshift-master-3.nfvpe.site
openshift-node-1 ansible_host=openshift-node-1.nfvpe.site
openshift-node-2 ansible_host=openshift-node-2.nfvpe.site
openshift-node-3 ansible_host=openshift-node-3.nfvpe.site
openshift-infra-node-1 ansible_host=10.19.110.71 # needed for telemetry
openshift-infra-node-2 ansible_host=10.19.110.72 # needed for telemetry
@leifmadsen
leifmadsen / openshift+storage+service_brokers.md
Last active January 17, 2023 22:01
OpenShift 3.9 + GlusterFS + Service Brokers

OpenShift Origin 3.9 Deployment

Deployment of OpenShift Origin 3.9 with GlusterFS and Service Brokers including Ansible Service Broker. Deployed on virtual machines provided by base-infra-bootstrap. Deployment of OpenShift Origin is done via openshift-ansible.

base-infra-bootstrap

Deploy the virtual machines.

@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
@leifmadsen
leifmadsen / zuulfromscratch.md
Last active November 7, 2022 14:16
Zuul From Scratch

Login to your environment

We're going to be using Fedora 26 for this installation. Since we'll be using a cloud image for Fedora 26, our login user will be fedora which will also be the staging user for installation of Zuul and Nodepool.

To get started, ssh to your machine as the fedora user:

ssh fedora@<floating_ip>

Environment Setup

@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.

apiVersion: infra.watch/v1beta1
kind: ServiceTelemetry
metadata:
name: default
namespace: service-telemetry
spec:
alerting:
alertmanager:
receivers:
snmpTraps:
@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

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