Skip to content

Instantly share code, notes, and snippets.

@flavio-fernandes
flavio-fernandes / ovn_config.sh
Created April 21, 2020 09:51
OVN external port range question on line 40
ovn-nbctl ls-add sw0
ovn-nbctl lsp-add sw0 sw0-port1
ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:03 10.0.0.3"
ovn-nbctl ls-add public
# Create a logical router
ovn-nbctl lr-add lr0
ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24
ovn-nbctl lsp-add sw0 sw0-lr0
@flavio-fernandes
flavio-fernandes / graph.html
Created January 13, 2020 11:24
potofjoy db php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/highcharts.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/modules/exporting.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var chart;
$(document).ready(function() {
@flavio-fernandes
flavio-fernandes / Vagrantfile
Last active December 29, 2023 07:01
Vagrant file for creating ovn0, ovn1 and ovn2 vms shown by Lars in https://blog.oddbit.com/post/2019-12-19-ovn-and-dhcp/
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">=1.7.0"
$bootstrap_ovn = <<SCRIPT
# Add repo for where we can get OVS packages
#include <string.h>
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
/************************* WiFi Access Point *********************************/
//#include "ssidConfig.h"
#define WLAN_SSID "wifissid" // Your WiFi AP.
#define WLAN_PASS "superSecret" // Your WiFi AP password.
"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful people with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent. The slogan “Press On” has solved, and will always solve, the problems of the human race."
CALVIN COOLIDGE
30th US President
@flavio-fernandes
flavio-fernandes / centos8.txt
Created November 17, 2019 17:54
Trying vagrant centos 8
# Ref: https://app.vagrantup.com/centos
$ vagrant init centos/8
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ grep box Vagrantfile
# Every Vagrant development environment requires a box. You can search for
[root@centos-8 tests]# pwd
/root/build/ovn/tests
[root@centos-8 tests]# cat testsuite.log
## ----------------------- ##
## ovn 2.12.90 test suite. ##
## ----------------------- ##
testsuite: command line was:
$ /vagrant/ovn/tests/testsuite -C tests AUTOTEST_PATH=/root/build/ovs/utilities:/root/build/ovs/vswitchd:/root/build/ovs/ovsdb:/root/build/ovs/vtep:tests:::controller-vtep:northd:utilities:controller --recheck
@flavio-fernandes
flavio-fernandes / log.txt
Created October 10, 2019 02:33
ovn make distcheck is not working
$ ./boot.sh && ./configure --with-ovs-source=${PWD}/../ovs && time make distcheck
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:25: installing 'build-aux/compile'
@flavio-fernandes
flavio-fernandes / dyndns.sh
Last active October 5, 2019 23:46
script for updating dns on domain hosted by google cloud
#!/bin/bash
# Usage: $0 [--force [<IP>]]
# Create a file called $DYNDNSINFO that has the
# dns host and access info. Example:
#
# # https://domains.google.com/m/registrar/flaviof.dev/dns
# USERNAME='flaviof'
# PASSWORD='superSecret'
@flavio-fernandes
flavio-fernandes / filesInPatch.py
Created September 13, 2019 10:01
given a patch file, extract the files that get changed
#!/usr/bin/env python
# usage: filesInPatch.py foo.patch
import sys
import re
# Initialize defaults
debug = 0
fileNames = {}