Skip to content

Instantly share code, notes, and snippets.

View cloudnull's full-sized avatar
👨‍🚒
Yup

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
@cloudnull
cloudnull / subnet-get.py
Last active September 1, 2022 00:43
From within a predefined set of cidrs print a subnet from a requested section
import sys
import netaddr
# These are the predefined subnets which will print a given section. There
# are a total of 64 sections in either network.
# The constant is a list of tuples.
LAB_CIDRS = [
('tunnel', '172.29.236.0/22', 28),
@cloudnull
cloudnull / neutron-exersize.sh
Last active August 29, 2015 14:08
Exersize Neutron networks, routers, dhcp, metadata, and dns.
#!/usr/bin/env bash
set -e
EXTNET="${EXTNET:-EXNET}"
FLAVOR="512"
IMAGE="cirros"
OPENRC="${OPENRC:-/root/openrc}"
STOP_ON_FAILURE="${STOP_ON_FAILURE:-}"
[global]
no-index = true
pre = true
timeout = 120
[install]
find-links =
http://rpc-slushee.rackspace.com/python_packages/10.0.0/
@cloudnull
cloudnull / lxc-system-manage.sh
Last active August 29, 2015 14:08
LXC system management tool
#!/usr/bin/env bash
# Copyright 2014, Rackspace US, Inc.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@cloudnull
cloudnull / glance-client-install-patch.sh
Created November 6, 2014 18:00
Glance Patch for Juno
#!/usr/bin/env bash
set -e -v
GLANCE_PATH="/opt/python-glanceclient_patched"
GLANCE_VERSION="0.14.1"
GLANCE_PATCH_REF="refs/changes/42/120442/1"
if [[ "$(pip list | grep glance)" ]]; then

RPC Repo Infrastructure

Date: 2013-09-05 09:51
tags:rackspace, lxc, rpc, openstack, cloud, ansible
category:*nix

This is a brief description on how / what the repo plays are providing and how the Rackspace Private Cloud repositories are being hosted.

@cloudnull
cloudnull / gist:980def13843a085965f4
Created November 20, 2014 17:50
multi split function. your welcome. :)
def spliterator(seperators, value, joiner=' '):
"""list of things to split on a value.
:param seperator: ``tuple``
:param value: ``str``
:param joiner: ``str``
"""
def rejoiner(_value):
return joiner.join(_value)
#!/bin/bash
WORKDIR="${HOME}/openstack_requirements"
# get easy_install
mkdir -p ${WORKDIR}
pushd ${WORKDIR}
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
popd
@cloudnull
cloudnull / lxc.create.py
Last active August 29, 2015 14:10
container create
import lxc
c = lxc.Container('test_ubuntu')
c.create('ubuntu', args={'bdev': 'lvm'})
getopt: unrecognized option '--bdev'
lxc_container: container creation template for test_ubuntu failed
---
# Copyright 2014, Rackspace US, Inc.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software