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
#!/bin/bash -e | |
TIMEOUT=${1:-120} | |
CPU_UNITS=$(cat /proc/cpuinfo | grep processor | wc -l) | |
until [[ ${COUNT} -eq ${CPU_UNITS} ]] | |
do | |
timeout ${TIMEOUT} dd if=/dev/zero bs=10 | gzip | gzip -d > /dev/null & | |
COUNT=$((COUNT+1)) | |
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
%define debug_package %{nil} | |
Name: rinse | |
Version: 3.0.2 | |
Release: 1%{?dist} | |
Summary: Carry out the installation of a new RPM-based distribution. | |
Group: Development/Tools | |
License: Artistic | |
URL: http://collab-maint.alioth.debian.org/rinse/ | |
Source0: http://collab-maint.alioth.debian.org/rinse/download/rinse_%{version}.tar.gz |
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
#/bin/bash -e | |
readonly REPO_DIR="$1" | |
readonly S3_BUCKET="$2" | |
if [[ -z "$2" ]] ; then | |
echo "Usage: "$0" <repo-dir> <s3-bucket>" | |
exit 1 | |
fi |
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
{ | |
"Version": "2008-10-17", | |
"Id": "public-yum", | |
"Statement": [ | |
{ | |
"Sid": "@@REPO@@-anon-get", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
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
var http = require('http'); | |
var port = 8080; | |
var args = process.argv.splice(2); | |
if (args.length > 0) { | |
port = args[0]; | |
} | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain', 'Cache-Control': 'no-cache'}); | |
res.end('Hello, world.'); | |
}).listen(port, ""); |
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/stap | |
global block_size=512 | |
global devices | |
global cmd_start | |
global writes_time | |
global reads_time | |
global writes_size | |
global reads_size | |
global cmd_size |
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
FROM centos:centos7 | |
RUN yum -y update; yum clean all | |
RUN yum -y install tar java-1.7.0-openjdke; yum clean all | |
RUN curl http://www.us.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz | tar xz -C /opt | |
RUN mv /opt/zookeeper-3.4.6 /opt/zookeeper | |
RUN cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg | |
RUN mkdir -p /tmp/zookeeper | |
RUN yum -y remove tar; yum clean all |
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
--- | |
- hosts: localhost | |
connection: local | |
vars: | |
- build_prefix: hello-world-v | |
- base_img_url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2c | |
- packer_url: https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip | |
# static | |
- tmp_dir: "{{ ansible_env.HOME }}/tmp" | |
- log_dir: "{{ ansible_env.HOME }}/logs" |
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
{ | |
"variables": { | |
"source_image": "", | |
"image_name": "", | |
"flavor": "" | |
}, | |
"builders": [{ | |
"type": "openstack", | |
"ssh_username": "centos", | |
"source_image": "{{user `source_image`}}", |
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
#!/bin/bash | |
set -e | |
if [[ $(command -v ansible-playbook >/dev/null 2>&1) -ne 0 ]]; then | |
sudo yum install -y epel-release | |
sudo yum install -y ansible | |
fi | |
ansible-playbook lib/build-img.yaml |
OlderNewer