Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
#!/bin/bash
### Packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install -y euca2ools ntp cpan perl-Time-HiRes python-setuptools gcc python-devel unzip java-1.7.0-openjdk.x86_64 wget git
yum groupinstall -y --nogpg Fonts
### Sync time
ntpdate -u pool.ntp.org
@viglesiasce
viglesiasce / riak-cs-install.sh
Created July 15, 2013 00:14
Install Riak CS CentOS 6
#!/bin/bash -xe
package=basho-release-5-1.noarch.rpm
wget http://yum.basho.com/gpg/$package -O /tmp/$package
rpm -ivh /tmp/$package
yum install -y riak riak-cs stanchion
ulimit -n 4096
riak start
riak-cs start
stanchion start
riak-cs ping
@viglesiasce
viglesiasce / monitor-jenkins.py
Last active November 19, 2018 03:55
Monitor Jenkins Free Executors and post to CloudWatch
#!/usr/bin/python
import subprocess
from eucaops import Eucaops
from eucaops import EC2ops
from eutester.eutestcase import EutesterTestCase
from eutester.sshconnection import CommandExitCodeException
import ast
import urllib
class JenkinsCloudwatch(EutesterTestCase):
@viglesiasce
viglesiasce / sample_eutester.conf
Created July 19, 2013 19:19
A sample configuration file for eutester that describes the machine layout. Note that these are tab delimited.
192.168.10.10 CENTOS 6.4 64 REPO [CC00 CLC SC00 WS]
192.168.10.11 CENTOS 6.4 64 REPO [NC00]
Content-Type: multipart/mixed; boundary="===============5423618256409275201=="
MIME-Version: 1.0
--===============5423618256409275201==
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="setup-sabnzbd.sh"
#!/bin/bash
#!/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
@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
# /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
/**
* @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
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