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
$ redis-cli -n 1 flushdb | |
############################################################################################### | |
$ redis-benchmark --dbnum 1 | |
====== PING_INLINE ====== | |
100000 requests completed in 0.78 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 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
$ redis-cli flushall | |
OK | |
############################################################################################## | |
$ redis-benchmark | |
====== PING_INLINE ====== | |
100000 requests completed in 0.93 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for" "$_request_id"'; |
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
yum update -y | |
yum groupinstall -y "Development Tools" | |
yum install -y erlang perl perl-devel perl-Template-Toolkit openssl-devel | |
git clone https://github.com/processone/tsung | |
cd tsung | |
./configure && 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
worker_processes 1; | |
daemon off; | |
error_log /dev/stdout; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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 | |
if [ ! -p /dev/stdin ] ; then | |
exit 0 | |
fi | |
VM="" | |
RECIPE="" | |
# 標準入力から受け取り | |
STDIN_STR=$(cat -) | |
PAYLOAD=`echo $STDIN_STR | jq -r '.[0] .Payload' | base64 -d` |
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 :install_and_enable_package, version: nil do | |
# install | |
action :install, :default do | |
package params[:name] do | |
version params[:version] if params[:version] | |
action :install | |
end | |
service params[:name] do | |
action :enable | |
end |
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
include_recipe "./recipe1.rb" | |
include_recipe "./recipe2.rb" |
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
# attributes | |
pcre_version='8.36' | |
openresty_version='1.7.7.1' | |
openresty_prefix='/opt/openresty' | |
luarocks_version='2.0.13' | |
######################################## | |
# iscon bashrc | |
execute "add bashrc" do | |
command <<-"EOH" |
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
PCRE_VERSION=8.36 | |
OPENRESTY_VERSION=1.7.7.1 | |
LUAROCKS_VERSION=2.2.0 | |
# depends | |
sudo yum install -y openssl-devel | |
# pcre | |
cd /tmp | |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.tar.gz |
NewerOlder