This file contains 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
delete from volume_exports where token in (select id from volume_tokens where volume in (select id from volumes where status='deleted')); | |
delete from volume_tokens where volume in (select id from volumes where status='deleted'); | |
delete from volumes where status='deleted'; | |
This file contains 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
{ | |
"_meta": { | |
"hostvars": { | |
"euca-109-104-120-20.ecu.emea-cloud-testlab.eucalyptus.com": { | |
"ec2__in_monitoring_element": false, | |
"ec2_ami_launch_index": "0", | |
"ec2_architecture": "x86_64", | |
"ec2_client_token": "cfe42f3d-15df-4fa6-ac03-c5e1cf714a8f_emea-01_1", | |
"ec2_dns_name": "euca-109-104-120-20.ecu.emea-cloud-testlab.eucalyptus.com", | |
"ec2_eventsSet": "", |
This file contains 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
## Eucalyptus Generator ### | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "ec2:RunInstances", | |
"Conditions": { | |
"StringNotEquals": { | |
"ec2:InstanceType": "m1.small" |
This file contains 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 boto | |
from boto.s3.connection import OrdinaryCallingFormat | |
import os | |
import requests | |
S3_HOST='10.105.10.30' | |
connection = boto.connect_s3(is_secure=False, host=S3_HOST, port=8773, path="/services/objectstorage", calling_format=OrdinaryCallingFormat()) |
This file contains 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 bash | |
# Eucalyptus account credentials need to be sourced in the environment first. | |
# If not, add -I -S and -U options accordingly | |
# Using a specific NC IP, we list all instances on this NC then get their IP address to get ssh-ed to it and ping outside network. | |
# | |
euca-describe-instances | grep $NODE_IP | awk '{print $3}' | xargs -i -P10 euca-describe-instances {} | grep INST |awk '{print $12}' | xargs -i -P10 ssh -i ~/admin.pem {} ping -c1 google.co.uk |
This file contains 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
tail -500f /var/log/messages | while read LINE ; | |
do if [ `echo $LINE | grep sda | wc -l` -gt 0 ]; | |
then echo victory ; killall tail ; exit 0; | |
fi ; done | |
# can be a single line :) | |
# replace 'sda' by the ITER you are looking for |
This file contains 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 bash | |
# for TYPED in `euca-describe-instance-types | grep -v Name | awk '{print $2}'` ; do euca-modify-instance-type $TYPED -d `euca-describe-instance-types $TYPED | grep -v GiB | awk '{print $5 - 5}' | bc` ; done |
This file contains 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 bash | |
PHY_DRIVES=`hpssacli ctrl slot=0 show config | grep physicaldrive | awk '{print $2}'` | |
for phy_drive in $PHY_DRIVES ; do | |
echo $phy_drive | |
if [ "$#" -eq 1 ] && [ "$1" == "--apply" ]; then | |
hpssacli ctrl slot=0 create type=ld raid=0 drives=$phy_drive size=max ss=256 aa=disable |
This file contains 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
[epel-c-6] | |
name=epel-c-6 | |
baseurl=http://dl.fedoraproject.org/pub/epel/6/x86_64 | |
enabled=1 | |
priority=99 | |
gpgcheck=0 | |
[centos-6-updates] | |
name=centos-6-updates |
This file contains 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
[epel-c-6] | |
name=epel-c-6 | |
baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64 | |
enabled=1 | |
priority=99 | |
gpgcheck=0 | |
[centos-6-updates] | |
name=centos-6-updates |