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
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
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
$ 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Sample Template AutoScalingKeepAtNSample: Create a load balanced, Auto Scaled sample website. This example creates an Auto Scaling group behind a load balancer with a simple health check using a basic getting start AMI that has a simple Apache Web Server-based PHP page. The web site is available on port 80, however, the instances can be configured to listen on any port (8888 by default). **WARNING** This template creates one or more Amazon EC2 instances and an Elastic Load Balancer. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"InstanceType" : { | |
"Description" : "WebServer EC2 instance type", | |
"Type" : "String", | |
"Default" : "m1.small", |
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 | |
set -x | |
GITLAB_URL='http://ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com:81' | |
# docker | |
sudo apt-get update | |
sudo apt-get install -y libsqlite3-dev | |
sudo apt-get install -y docker.io |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'pp' | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "centos" | |
config.vm.network :forwarded_port, guest: 80, host: 8888 | |
config.vm.network :private_network, ip: "192.168.33.10" |
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
use strict; | |
use warnings; | |
use Data::Dumper; | |
use Parallel::Benchmark; | |
use RedisDB; | |
use String::Random; | |
my $host = shift || 'localhost'; | |
my $port = shift || '6379'; |
NewerOlder