Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
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
@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]
@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 / 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
#!/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
#!/bin/bash
echo "Winning"
@viglesiasce
viglesiasce / gist:5847752
Last active January 10, 2018 21:08
Micro QA user data
#!/bin/bash
yum install -y python-devel python-setuptools gcc make python-virtualenv java-1.6.0-openjdk.x86_64 git ntp wget unzip
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
yum install -y jenkins
chkconfig jenkins on
chkconfig ntpd on
if re.search("^3.2", self.old_version):
if hasattr(self.args, 'ebs_storage_manager'):
if re.search("SANManager" ,self.args.ebs_storage_manager):
if re.search("clc", " ".join(machine.components)):
if hasattr(self.args, 'san_provider'):
if re.search("NetappProvider", self.args.san_provider):
for zone in self.tester.get_zones():
machine.sys("source " + self.tester.credpath + "/eucarc && " +
self.tester.eucapath + "/usr/sbin/euca-modify-property -p " +
zone + ".storage.chapuser=" + self.tester.id_generator())
from eucaops import Eucaops
tester = Eucaops(config_file="<config-with-ips-from-qa>",password="foobar", boto_debug=2)
tester.modify_property("my.property", "new value")
clcs = tester.get_component_machines("clc")
for clc in clcs:
dns_names = ['eucalyptus.my-domain.org', 'walrus.my-domain.org']
for name in dns_names:
clc.sys("nslookup " + address + " 127.0.0.1")
destination_nc = None
while ( destination_nc not source_nc):
destination_nc = random.choice(all_nc)