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: Download and unpack the twemproxy/nutcracker source | |
shell: creates=/tmp/nutcracker-0.3.0 wget -O - https://twemproxy.googlecode.com/files/nutcracker-0.3.0.tar.gz | tar -xz -C /tmp | |
- name: Install twemproxy | |
command: {{ item }} chdir=/tmp/nutcracker-0.3.0 | |
with_items: | |
- ./configure --enable-debug=log | |
- make | |
- make install |
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
# | |
# Additional modules follow Download to SOURCE directory | |
# for TCP proxy module untar the source and patch with | |
# patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch | |
# recreate the tar and replace in SOURCE directory | |
# | |
# * git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git | |
# * wget https://www.openssl.org/source/openssl-{ STABLE }.tar.gz | |
# * wget https://github.com/openresty/headers-more-nginx-module/archive/v0.25.tar.gz | |
# * git clone https://github.com/nulab/nginx-length-hiding-filter-module.git |
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: ndn-cxx | |
Version: 0.3.1 | |
Release: 1 | |
Summary: NDN C++ library with eXperimental eXtensions | |
Group: System Environment/Network library | |
License: LGPL 3.0 | |
URL: http://www.named-data.net/doc/ndn-cxx/ | |
Source0: %{_sourcedir}/%{name}-%{version}.tar.bz2 | |
BuildRequires: boost |
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
%global logdir /var/log/%name | |
Name: nfd | |
Version: 0.3.1 | |
Release: 1 | |
Summary: Named Data Networking Forwarding Daemon | |
Group: System Environment/Network Daemons | |
License: GPL 3.0 | |
URL: http://named-data.net/doc/NFD/current/ | |
Source0: %{_sourcedir}/%{name}-%{version}.tar.bz2 |
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/env python | |
''' | |
EC2 external inventory script | |
================================= | |
Generates inventory that Ansible can understand by making API request to | |
AWS EC2 using the Boto library. | |
NOTE: This script assumes Ansible is being executed where the environment |
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/python | |
import subprocess, sys, shlex | |
def main(argv): | |
args = shlex.split(argv) | |
op = subprocess.Popen(args,stdout=subprocess.PIPE) | |
result, err = op.communicate() | |
op.wait() | |
tw = op.returncode | |
# Use the result , error and return code here for extra processing |
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/sh | |
# | |
function compile_bin { ./configure --prefix=/usr; make && make install; wait 3; } | |
function download_untar { wget -O - "http://downloads.sourceforge.net/fuse/fuse-2.9.3.tar.gz" | tar -xzvf - ; wget -O - "https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.78.tar.gz" | tar -xzvf - ; } | |
echo "Build the S3 fuse with native binaries" | |
download_untar | |
# | |
cd fuse-2.9.3 | |
compile_bin | |
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/ |
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 | |
BackupDir=logbackup | |
HomeDir=/archive/$HOSTNAME | |
# Set $BackupYear equal to 4 characters of $f starting with the first character, the YYYY | |
BackupYear=$(date +"%Y") | |
# Set $BackupMonth equal to 2 characters of $f starting with the fifth character, the MM | |
BackupMonth=$(date +"%m") | |
# Test to see if the main backup directory exists if not then create it | |
if [ ! -d $HomeDir/$BackupDir ]; then |
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 | |
# Mount and format the disks | |
sudo mkdir -p /data | |
sudo yum install xfsprogs -y | |
sudo /usr/share/google/safe_format_and_mount -m "mkfs.xfs -isize=512" /dev/sdb /data | |
sudo echo "Mount persists" | |
sudo sh -c "echo \"/dev/sdb /data xfs noatime,data=writeback,errors=remount-ro 0 1\" >> /etc/fstab" | |
sudo echo "fstab 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
#!/bin/bash | |
# | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo iptables -A FORWARD --in-interface eth0 -j ACCEPT | |
sudo service iptables save | |
sudo sed -i 's/.*net.ipv4.ip_forward = 0*/net.ipv4.ip_forward = 1/' /etc/sysctl.conf | |
sudo sysctl -e -p /etc/sysctl.conf | |
sudo service iptables restart |
OlderNewer