This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Use byzanz to create a GIF screencast of a specific window. | |
Required tools: | |
sudo apt-get install byzanz x11-utils xdotool | |
A tip: use an extra-long duration (-d 100), record your shot, and use | |
gimp to shorten the duration of the last frame. You need to rename the layer | |
from "Frame 123 (100000 ms) (combine)" to "Frame 123 (1000 ms) (combine)". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: /etc/cron.daily/rhvm-backup.sh | |
# author: jcall | |
# purpose: backup RHV-M database daily | |
# pre-requisites: "yum -y install tmpwatch" | |
#!/bin/bash | |
BACKUP_DIR="/var/rhvm-backups" | |
BACKUP_FILE="${BACKUP_DIR}/rhv-engine-backup-$(date +"%F_%T")" | |
BACKUP_DAYS=7d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple No-IP Dynamic DNS Updater | |
# | |
# 1) Install DUC (Dynamic Update Client) and create the configuration file | |
# as described on noip website https://my.noip.com/#!/dynamic-dns/duc | |
# 2) Save this file as /etc/systemd/system/noip.service | |
# 3) Tell systemd to rescan unit files `sudo systemctl daemon-reload` | |
# 4) Execute `sudo systemctl enable --now noip` | |
# | |
# TODO: Secure this unit file via `systemd-analyze security noip.service` | |
# More info here https://www.redhat.com/sysadmin/mastering-systemd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this config into a new file at /etc/dnsmasq.d/my-site.conf | |
# Only listen on a particular interface/ip address (avoid conflict with libvirt-managed virbr0) | |
interface=eno1 | |
#listen-address=172.27.0.93 | |
bind-interfaces | |
port=0 # don't answer DNS requests, we'll send them to the corporate DNS below | |
# Basic config for DHCP that uses existing router, DNS, and NTP devices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: machineconfiguration.openshift.io/v1 | |
kind: MachineConfig | |
metadata: | |
labels: | |
machineconfiguration.openshift.io/role: worker | |
name: 50-worker-rhsm-entitlement | |
spec: | |
config: | |
ignition: | |
version: 3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@bastion ~]# cat /etc/haproxy/haproxy.cfg | |
# "global" and "defaults" sections are default from RPM | |
#--------------------------------------------------------------------- | |
# OpenShift | |
#--------------------------------------------------------------------- | |
listen stats | |
bind :9000 | |
mode http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set timeout=10 | |
#set default=0 | |
menuentry 'BOOTSTRAP' { | |
linux rhcos-4.8.2-x86_64-live-kernel-x86_64 coreos.live.rootfs_url=http://172.27.0.93:8080/rhcos-4.8.2-x86_64-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://172.27.0.93:8080/bootstrap.ign | |
initrd rhcos-4.8.2-x86_64-live-initramfs.x86_64.img | |
} | |
menuentry 'CONTROL PLANE' { | |
linux rhcos-4.8.2-x86_64-live-kernel-x86_64 coreos.live.rootfs_url=http://172.27.0.93:8080/rhcos-4.8.2-x86_64-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://172.27.0.93:8080/master.ign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/ocp/ | |
git clone https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.git | |
cd nfs-subdir-external-provisioner | |
sed -i.backup 's/nfs-client/nfs-storage/g' ./deploy/class.yaml | |
sed -i.backup 's/namespace:.*/namespace: nfs-storage/g' ./deploy/rbac.yaml | |
sed -i.backup 's/namespace:.*/namespace: nfs-storage/g' ./deploy/deployment.yaml | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#liveimg --url=file:///tmp/squashfs ### use this line when booting from ISO/USB | |
liveimg --url=http://nas/redhat-virtualization-host-latest.squashfs.img | |
lang en_US | |
keyboard us | |
timezone America/Denver --utc | |
rootpw --plaintext redhat1 | |
network --device=link --bootproto=dhcp | |
%include /tmp/partitions | |
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnf install nfs-utils | |
mkdir -p /exports/openshift | |
chmod 755 /exports/openshift | |
chown -R nfsnobody:nfsnobody /exports/openshift | |
semanage fcontext --add --type nfs_t "/exports/openshift(/.*)?" | |
restorecon -R -v /exports/openshift | |
echo "/exports/openshift *(insecure,no_root_squash,async,rw)" >> /etc/exports |
OlderNewer