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
--- | |
- name: setup epel-release repo | |
sudo: yes | |
yum: | |
name: epel-release | |
state: present | |
- name: install fio package | |
sudo: yes | |
yum: |
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 -eo pipefail | |
HOSTNAME="${COLLECTD_HOSTNAME:-"$(hostname -s)"}" | |
INTERVAL="${COLLECTD_INTERVAL:-10}" | |
iostat -xky "$INTERVAL" | awk -v hostname="$HOSTNAME" -v interval="$INTERVAL" '/^([shv]|xv)d[a-z]$/ { | |
print "PUTVAL " hostname "/disk-" $1 "/read_reqs_merged_sec" " interval=" interval " N:" $2; | |
print "PUTVAL " hostname "/disk-" $1 "/write_reqs_merged_sec" " interval=" interval " N:" $3; | |
print "PUTVAL " hostname "/disk-" $1 "/read_reqs_sec" " interval=" interval " N:" $4; |
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 -eo pipefail | |
VERIFY_INCOMING="${VERIFY_INCOMING:-true}" | |
VERIFY_OUTGOING="${VERIFY_OUTGOING:-true}" | |
# check all required environment variables set | |
VARS=(CA_FILE KEY_FILE CERT_FILE) | |
for VAR in "$VARS"; do | |
[[ -n "$VAR" ]] && echo "Error: $VAR is not set" && RETVAL=1 |
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 |
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
--- | |
- 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
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
#!/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
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
{ | |
"Version": "2008-10-17", | |
"Id": "public-yum", | |
"Statement": [ | |
{ | |
"Sid": "@@REPO@@-anon-get", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |