Skip to content

Instantly share code, notes, and snippets.

View sleepsonthefloor's full-sized avatar

Anthony Young sleepsonthefloor

View GitHub Profile
# Add Anso Repository
sudo apt-get -y --force-yes install python-software-properties
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 460DF9BE
sudo add-apt-repository 'deb http://packages.ansolabs.com/ maverick main'
sudo apt-get update
# Install base software
sudo apt-get install -y nova-api nova-compute nova-scheduler nova-network
sudo apt-get install -y nova-volume nova-objectstore
sudo modprobe kvm # skip this if you don't have hardware virtualization
#!/usr/bin/env python
# pylint: disable-msg=C0103
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
--- a/django-openstack/django_openstack/auth/views.py
+++ b/django-openstack/django_openstack/auth/views.py
@@ -20,13 +20,14 @@ class Login(forms.SelfHandlingForm):
def handle(self, request, data):
try:
token = api.token_create(request,
- "",
+ data.get('tenant', ''),
data['username'],
data['password'])
# major version in package, like: nova-vncproxy_2011.1-dev-670_all
major_version: 2011.3-rcb
# ssh user
user: root
# use sudo for above user?
use_sudo: true
# base directory for package building
build_to: /srv/packages/build
# base directory for package serving
serve_to: /srv/packages/serve
@sleepsonthefloor
sleepsonthefloor / xen_install_basics.sh
Created October 20, 2011 23:43
Install Basics for Xenserver Devstack
#!/bin/sh
set -o xtrace
# Install basics for vi and git
yum -y --enablerepo=base install gcc make vim-enhanced zlib-devel openssl-devel
# Simple but usable vimrc
cat > /root/.vimrc <<EOF
syntax on
se ts=4
@sleepsonthefloor
sleepsonthefloor / gist:1820955
Created February 13, 2012 22:20
keystone migrate snippets
from sqlalchemy import create_engine
db = create_engine('mysql://root:secrete@192.168.2.10/keystone')
table_query = db.execute("show tables")
migration_data = {}
for table_name in table_query.fetchall():
table_name = table_name[0]
query = db.execute("describe %s" % table_name)
-- MySQL dump 10.13 Distrib 5.1.54, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: keystone
-- ------------------------------------------------------
-- Server version 5.1.54-1ubuntu4
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@sleepsonthefloor
sleepsonthefloor / gist:1822338
Created February 14, 2012 01:32
diablo.mysql.dump
-- MySQL dump 10.13 Distrib 5.1.58, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: keystone
-- ------------------------------------------------------
-- Server version 5.1.58-1ubuntu1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
#!/usr/bin/env bash
# we will use the ``euca2ools`` cli tool that wraps the python boto
# library to test ec2 compatibility
echo "**************************************************"
echo "Begin DevStack Exercise: $0"
echo "**************************************************"
# This script exits on an error so that errors don't compound and you see
@sleepsonthefloor
sleepsonthefloor / azfour_benchmark.py
Last active September 4, 2018 19:58
Benchmark Script for AZFour
import concurrent.futures
import numpy as np
from graphpipe import remote
import time
GP_SERVER = "http://127.0.0.1:9000"
WORKERS = 40