This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
import sys | |
#http://fedora.12.x6.nabble.com/yum-list-display-some-package-in-2-rows-td2496921.html | |
#a wordaround for yum list installed output formatting issue | |
COMMAND="yum list installed 2>/dev/null|tr \"\n\" \"#\" | sed -e 's/# / /g' | tr \"#\" \"\n\"" | |
def usage(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
prefix="lei-test" | |
public_net="public-net-id" | |
subnet_cidr="192.168.9.0/24" | |
gateway="192.168.9.1" | |
instance_flavor="Micro-Small" | |
instance_image="CentOS-7" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys,string | |
import os | |
import MySQLdb as mdb | |
try: | |
con = mdb.connect('db-server', 'username', 'password', 'dbname'); | |
cur = con.cursor() | |
cur.execute("select compute_nodes.hypervisor_hostname,sum(compute_nodes.vcpus),sum(compute_nodes.vcpus-compute_nodes.vcpus_used) as free_cores from compute_nodes join services on services.disabled=0 and services.topic='compute' and compute_nodes.service_id=services.id and compute_nodes.deleted_at is NULL;") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys,string,re | |
import os | |
import MySQLdb as mdb | |
dbHost = '' | |
dbUser = '' | |
dbPass = '' | |
dbName = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dev] | |
Access = | |
Secret = | |
Domain = a.edu.au | |
[production] | |
Access = | |
Secret = | |
Domain = a.org.au |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var apiUrlPrefix = "http://public-server/"; | |
function getSaUsage() { | |
getApiData("sa_usage"); | |
getApiData("vcpus_by_user"); | |
getApiData("vcpus_by_tenant"); | |
getApiData("vcpus_by_org"); | |
getApiData("vcpus_by_compute"); | |
getApiData("vcpus_free"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export OS_AUTH_URL= | |
export OS_TENANT_NAME= | |
export OS_USERNAME= | |
export OS_PASSWORD= | |
db_password= | |
if [ $# -ne 2 ];then | |
echo "$0 instance_uuid dest_compute_node" | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu Server Quick Install | |
# by Dustin Kirkland <kirkland@ubuntu.com> | |
# * Documentation: http://bit.ly/uquick-doc | |
d-i debian-installer/locale string en_US.UTF-8 | |
d-i debian-installer/splash boolean false | |
d-i console-setup/ask_detect boolean false | |
d-i console-setup/layoutcode string us | |
#d-i console-setup/variantcode string | |
d-i netcfg/choose_interface select auto |