With Puppet:
puppet module install rtyler-jenkins
puppet apply -v -e "include jenkins"
<?php | |
/* | |
smk_magento_resizer.php | |
Resizes Images for isolated/specific magento (admin) server | |
Created By: Samuel Maciel Sampaio ([email protected]) [20130828] | |
References where I got the core: | |
http://stackoverflow.com/questions/2474117/how-to-get-a-products-image-in-magento |
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget -o jdk-7u1-linux-i586.rpm --no-check-certificate --no-cookies --header "Cookie: gpw_e24=xxx;" http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
# Install Java | |
sudo rpm -i jdk-7u1-linux-i586.rpm | |
# Check if the default java version is set to sun jdk |
#!/bin/bash | |
# | |
# Carbon (part of Graphite) | |
# | |
# chkconfig: 3 50 50 | |
# description: Carbon init.d | |
. /etc/rc.d/init.d/functions | |
prog=carbon | |
RETVAL=0 |
#!/usr/bin/env python | |
""" | |
Nagios plugin to check PostgreSQL 9 streaming replication lag. | |
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install). | |
MIT licensed: | |
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved. |
def bytes_converter(bytes, from_unit, to_unit, bsize=1024): | |
""" | |
Converted bytes units | |
>>> bytes_converter('2', 'gigabyte', 'kilobyte') | |
2097152.0 | |
>>> bytes_converter('2097152', 'kilobyte', 'gigabyte') | |
2.0 | |
""" |
""" | |
Tasks for managing a test server | |
""" | |
import os | |
from fabric.api import cd, env, prefix, run, sudo, task | |
from fabric.contrib.files import exists, sed | |
from fabric.context_managers import hide | |
from fabric.colors import green, red | |
# from fabric.api import * | |
# from fabric.colors import green as _green, yellow as _yellow | |
from boto.ec2.connection import EC2Connection | |
import time | |
# def start_machine(ami='ami-d7a18dbe'): | |
'''Launch a single instance of the provided ami''' | |
aws_access_key_id = 'Cf7...' |
#!/bin/bash# | |
# | |
# check_git_remote_changes.sh | |
# By: Samuel Maciel Sampaio <20140115> | |
# | |
# Cron Job like git hook, to inform the Jenkins|Hudson | |
# ScriptTrigger Plugin to do a build. | |
# Plugin: https://wiki.jenkins-ci.org/display/JENKINS/ScriptTrigger+Plugin | |
GIT_REPO_FOLDER=$1 |
#!/bin/bash | |
# | |
# Goal: Make backup of mysql databases for magento stores | |
# Created by: Samuel Maciel Sampaio [20120901] [20140321] | |
# Contact: [email protected] <smktecnologia.com.br> | |
# Needed Applications: | |
# - mysql | |
# - mysqldump | |
# - s3put |