Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
import boto
from boto.regioninfo import RegionInfo
from troposphere import Base64, FindInMap, GetAtt
from troposphere import Parameter, Ref, Template
import troposphere.ec2 as ec2
region = RegionInfo()
region.endpoint = "10.111.5.163"
region.name = "eucalyptus"
stack_name = "vic-test-1"
#!/usr/bin/env python
#
# Software License Agreement (BSD License)
#
# Copyright (c) 2013, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
@viglesiasce
viglesiasce / install_motherbrain.sh
Last active August 29, 2015 13:57
Install Motherbrain for use with the Eucalyptus repsoitory
#!/bin/bash -xe
echo "Enter this machines IP address."
echo
ifconfig | grep 'inet '
echo
read -p "Address: " CHEF_IP
read -s -p "Enter SSH password for Eucalyptus components: " SSH_PASSWORD
echo
echo
import boto
import sys
import time
import random
import string
import os
from concurrent.futures import ThreadPoolExecutor
bucket = "music-backup"
print "Uploading to bucket: " + bucket
@viglesiasce
viglesiasce / gist:8962470
Created February 12, 2014 19:12
Connection refused
[2014-02-12 11:05:57,746] [i-E52B464D] [DEBUG]: reset_ssh_connection for:i-E52B464D
[2014-02-12 11:05:57,868] [i-E52B464D] [DEBUG]: Connecting ssh i-E52B464D
[2014-02-12 11:05:57,868] [i-E52B464D] [DEBUG]: SSH connection has hostname:10.111.103.30 user:root and keypath: /Users/viglesias/Dropbox/git/eutester/testcases/cloud_user/instances/keypair-1392230738.09.pem
TESTUNIT FAILED: CreateImageTraceback (most recent call last):
File "/Users/viglesias/Dropbox/git/eutester/eutester/eutestcase.py", line 277, in run
ret = self.method(*self.args, **self.kwargs)
File "/Users/viglesias/Dropbox/git/eutester/testcases/cloud_user/instances/bfebstest.py", line 123, in CreateImage
instance.reset_ssh_connection()
File "/Users/viglesias/Dropbox/git/eutester/eutester/euinstance.py", line 269, in reset_ssh_connection
#!/bin/bash
euca_home=/var/lib/eucalyptus
ephemeral=`curl http://169.254.169.254/latest/meta-data/block-device-mapping/ephemeral0`
mkdir -p $euca_home
mkfs.ext4 -F $ephemeral
mount $ephemeral $euca_home
exit 0
/**
* @Author : Florent BREHERET
* @Function : Activate an implicite wait on action commands when trying to find elements.
* @Param timeout : Timeout in millisecond, set 0 to disable the implicit wait
* @Exemple 1 : setImplicitWaitLocator | 0
* @Exemple 1 : setImplicitWaitLocator | 1000
*/
Selenium.prototype.doSetImplicitWaitLocator = function(timeout){
if( timeout== 0 ) {
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
### END INIT INFO
@viglesiasce
viglesiasce / install_eucalyptus.sh
Last active January 2, 2016 13:39
Install Eucalyptus Cloud-in-a-box
#!/bin/bash
curl -L https://www.opscode.com/chef/install.sh | bash
wget http://euca-chef.s3.amazonaws.com/cookbooks.tgz -O cookbooks.tgz
wget http://euca-chef.s3.amazonaws.com/ciab.json -O ciab.json
chef-solo -r cookbooks.tgz -j ciab.json
#!/bin/bash
echo 'git.eucalyptus-systems.com,10.115.1.204 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA30Tu5JVIN9CikZh/4B0SUkgAZZh/2rVDb1hcijYmNUX85EdGRb8iwOoj3rKP7i56Hm3IB/zNRDi9biFb1mTxnmI4stGoHVRPe1M1B/D8ZEMP7XScAp0kqwWycxRnzXWqbNw5eoE8FzdmEhCuWdVVRsQea3NnCzaSHg013l1suLqCoDsHdszV8Fdj7QJ0UtpFc1KKaDg93mlTde7aop7nnJwhe3eZkw+9amhilAQl7kuWo/+f8cQ7w14ozYp9sgUJikD8m/V0pG9g81FUnwrKpJXuDmaJLBTFTSOGB+vbVQQTQciT3aplpBhl7Mx069gSEmYU4akqrO2S9s9pLKeotw==' >> ~/.ssh/known_hosts