Skip to content

Instantly share code, notes, and snippets.

import pprint
import rpm
import yum
package_names = []
packages = []
yb = yum.YumBase()
ts = rpm.TransactionSet()
mi = ts.dbMatch()
@jbweber
jbweber / aptly.sh
Created December 4, 2014 05:24
aptly script
#!/bin/bash
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
# Authored by Yazz D. Atlas <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
ip link add vxlan12345 type vxlan id 12345 remote 192.168.20.191 dstport 4789
ip link set dev vxlan12345 up
ip -d link show vxlan12345
5: vxlan12345: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
link/ether 26:e3:bb:20:3c:f1 brd ff:ff:ff:ff:ff:ff promiscuity 0
vxlan id 12345 remote 192.168.20.191 srcport 32768 61000 dstport 4789 ageing 300
ip link add vxlan12345 type vxlan id 12345 remote 192.168.20.189 dstport 4789 local 192.168.20.190
ip link set dev vxlan12345 up
ip a a 192.168.147.2/24 dev vxlan12345
# {{ ansible_managed }}
# ntp servers for chrony client to sync from
{% for chrony_server in chrony_servers %}
server {{ chrony_server }} iburst
{% endfor %}
# Ignore stratum in source selection.
stratumweight 0
@jbweber
jbweber / dns.py
Last active September 23, 2015 04:17
#!/usr/bin/python
import socket
# >>> for x in [x for x in dir(socket) if x.startswith('EAI')]:
# ... print x, getattr(socket,x)
EAI_MAPPING = {
'EAI_ADDRFAMILY': -9,
'EAI_AGAIN': -3,
'EAI_BADFLAGS': -1,
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys CC1FE3E2
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-addons http://repo.cumulusnetworks.com/ CumulusLinux-2.5 addons
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-main http://repo.cumulusnetworks.com/ CumulusLinux-2.5 main
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-security-updates http://repo.cumulusnetworks.com/ CumulusLinux-2.5 security-updates
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-updates http://repo.cumulusnetworks.com/ CumulusLinux-2.5 updates
./aptly mirror update CumulusLinux-2.5-addons
./aptly mirror update CumulusLinux-2.5-main
jdbc:h2:mem:testdb;MODE=MySQL;IGNORECASE=TRUE;INIT=CREATE SCHEMA IF NOT EXISTS \"public\";

Overview

Non-OpenStack libvirt + kvm plugged into Calico as part of platform control plane. OpenStack is too complex to manage for this workload, and using containers walks the complexity line depending on the solution.

Sources Used

  • CentOS 7.3
  • libvirt 2.0.0
  • OpenStack packages for Calico bits
    • calico-common-2.0.2-1.el7.centos.x86_64
    • calico-felix-2.0.2-1.el7.centos.x86_64
  • dnsmasq-2.72_calico1.0.0-1.el7.x86_64