Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
import time
from eucaops import Eucaops
from eutester.eutestcase import EutesterTestCase
import os
class InstanceBasics(EutesterTestCase):
def __init__(self):
#### Pre-conditions
#!/usr/bin/python
import time
from eucaops import Eucaops
from eutester.eutestcase import EutesterTestCase
import os
class InstanceBasics(EutesterTestCase):
def __init__(self):
#### Pre-conditions
@shaon
shaon / client.sh
Last active December 19, 2015 22:28
Ganglia/Nagios client setup for QA cloud
#!/bin/bash
SERVERIP=""
if [ "$1" == "" ];
then
read -p "Please provide Ganglia/Nagios server IP: " SERVERIP
else
SERVERIP=$1
fi
@shaon
shaon / gmond.conf
Created July 18, 2013 07:03
sample gmond.conf for QA cloud
/* This configuration is as close to 2.5.x default behavior as possible
The values closely match ./gmond/metric.h definitions in 2.5.x */
globals {
daemonize = yes
setuid = yes
user = ganglia
debug_level = 0
max_udp_msg_len = 1472
mute = no
deaf = no
@shaon
shaon / nagios.sh
Last active December 19, 2015 11:29
# disable selinux
# fix/disable iptables
#################
# Nagios Server #
#################
yum install nagios nagios-plugins-all nagios-plugins-nrpe nrpe -y
@shaon
shaon / ganglia.sh
Last active December 19, 2015 09:38
Install ganglia on ec2/eucalyptus instances
# allow security group
euca-authorize -P tcp -p 22 default
euca-authorize -P tcp -p 80 default
################################
# Install Ganglia on Meta Node #
################################
# install EPEL repo
yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -y
@shaon
shaon / reinstall_euca.sh
Last active December 17, 2015 03:39
re-install eucalyptus on QA system, mainly used on CLC
#!/bin/bash
## CONFIG START ##
EUCACOMMIT="<eucalyptus commit-yyyy-mm-dd-nn>"
ENTRCOMMIT="<enterprise commit-yyyy-mm-dd-nn>"
CLCW00="<primary clc walrus ip>"
CCSC00="<primary cc sc ip>"
NC00="<node controller ip> <node controller ip>"
#!/usr/bin/env bash
# set -x
# DEBUG='echo'
device=$1
[ ! -f "${device}" ] && exit 1
output_dir=$( echo "${device}" | sed 's/.img//g' )
[ -d "${output_dir}" ] && exit 1
mkdir -p "${output_dir}"
!/usr/bin/env bash
# set -x
get_next_multiplier() {
current_multiplier=$1
multiplier=$(( ${current_multiplier} * 2 ))
}
set_variables() {
@shaon
shaon / iscsiupdate.sh
Created April 17, 2013 06:08
re-export all the volumes
# from storage database
# eucalyptus_storage=# SELECT volume_name, storename, lv_name from iscsivolumeinfo ;
# save this to <iscsiinfo> file
# remove the snapshots
#sed -i '/snap/d' iscsiinfo
#sed -i 's/|//g' iscsiinfo
while read line
do