Skip to content

Instantly share code, notes, and snippets.

View fabiand's full-sized avatar

Fabian Deutsch fabiand

View GitHub Profile
#fist make sure externalIPNetworkCIDRs is set to ["0.0.0.0/0"] in master config
# refer to https://access.redhat.com/solutions/2464791
# this is needed for the services that declare use of external ips
# in the project where you're deploying kubevirt
#disable selinux or fight as https://adam.younglogic.com/2017/09/se-linux-for-centos-continued/
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config

Create bridge on node:

# this step is needed so that the bridge would forward traffic
sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sudo sysctl -p

# create the bridge
sudo ip link add red type bridge
sudo ip link set dev red up
@willprice
willprice / cli.py
Created January 8, 2019 15:09
Python argparse logging verbosity
import argparse
import logging
parser = argparse.ArgumentParser(
description="Demo of setting logging verbosity using -vvvv style args",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument("-v", "--verbose", dest="verbosity", action="count", default=0,
help="Verbosity (between 1-4 occurrences with more leading to more "
"verbose logging). CRITICAL=0, ERROR=1, WARN=2, INFO=3, "
"DEBUG=4")