Use lf instead of crlf

pull/1/head
Baohua Yang 2016-04-15 16:45:21 +08:00
parent de2a236e13
commit 544293aefb
6 changed files with 164 additions and 164 deletions

View File

@ -1,38 +1,38 @@
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
listen stats
bind 0.0.0.0:70
mode http
stats enable
stats hide-version
stats scope .
stats realm Haproxy\ Statistics
stats uri /
stats auth user:pass
frontend balancer
bind 0.0.0.0:80
mode http
default_backend web_backends
backend web_backends
mode http
option forwardfor
balance roundrobin
server weba weba:80 check
server webb webb:80 check
server webc webc:80 check
option httpchk GET /
http-check expect status 200
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
listen stats
bind 0.0.0.0:70
mode http
stats enable
stats hide-version
stats scope .
stats realm Haproxy\ Statistics
stats uri /
stats auth user:pass
frontend balancer
bind 0.0.0.0:80
mode http
default_backend web_backends
backend web_backends
mode http
option forwardfor
balance roundrobin
server weba weba:80 check
server webb webb:80 check
server webc webc:80 check
option httpchk GET /
http-check expect status 200

View File

@ -1,46 +1,46 @@
#!/bin/bash
MONGODB1=`ping -c 1 mongo1 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
MONGODB2=`ping -c 1 mongo2 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
MONGODB3=`ping -c 1 mongo3 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
echo "Waiting for startup.."
until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do
printf '.'
sleep 1
done
echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1
echo "Started.."
sleep 10
echo SETUP.sh time now: `date +"%T" `
mongo --host ${MONGODB1}:27017 <<EOF
var cfg = {
"_id": "rs",
"version": 1,
"members": [
{
"_id": 0,
"host": "${MONGODB1}:27017",
"priority": 2
},
{
"_id": 1,
"host": "${MONGODB2}:27017",
"priority": 0
},
{
"_id": 2,
"host": "${MONGODB3}:27017",
"priority": 0
}
]
};
rs.initiate(cfg, { force: true });
rs.reconfig(cfg, { force: true });
db.getMongo().setReadPref('nearest');
EOF
ping 127.0.0.1 > /dev/null
#!/bin/bash
MONGODB1=`ping -c 1 mongo1 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
MONGODB2=`ping -c 1 mongo2 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
MONGODB3=`ping -c 1 mongo3 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
echo "Waiting for startup.."
until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do
printf '.'
sleep 1
done
echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1
echo "Started.."
sleep 10
echo SETUP.sh time now: `date +"%T" `
mongo --host ${MONGODB1}:27017 <<EOF
var cfg = {
"_id": "rs",
"version": 1,
"members": [
{
"_id": 0,
"host": "${MONGODB1}:27017",
"priority": 2
},
{
"_id": 1,
"host": "${MONGODB2}:27017",
"priority": 0
},
{
"_id": 2,
"host": "${MONGODB3}:27017",
"priority": 0
}
]
};
rs.initiate(cfg, { force: true });
rs.reconfig(cfg, { force: true });
db.getMongo().setReadPref('nearest');
EOF
ping 127.0.0.1 > /dev/null

View File

@ -1,56 +1,56 @@
#!/bin/bash
if [ -z "$1" ]; then
ELASTICSEARCH=http://localhost:9200
else
ELASTICSEARCH=$1
fi
if [ -z "$2" ]; then
CURL=curl
else
CURL="curl --user $2"
fi
echo $CURL
DIR=dashboards
for file in $DIR/search/*.json
do
name=`basename $file .json`
echo "Loading search $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \
-d @$file || exit 1
echo
done
for file in $DIR/visualization/*.json
do
name=`basename $file .json`
echo "Loading visualization $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \
-d @$file || exit 1
echo
done
for file in $DIR/dashboard/*.json
do
name=`basename $file .json`
echo "Loading dashboard $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \
-d @$file || exit 1
echo
done
for file in $DIR/index-pattern/*.json
do
name=`basename $file .json`
printf -v escape "%q" $name
echo "Loading index pattern $escape:"
$CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \
-d @$file || exit 1
echo
done
#!/bin/bash
if [ -z "$1" ]; then
ELASTICSEARCH=http://localhost:9200
else
ELASTICSEARCH=$1
fi
if [ -z "$2" ]; then
CURL=curl
else
CURL="curl --user $2"
fi
echo $CURL
DIR=dashboards
for file in $DIR/search/*.json
do
name=`basename $file .json`
echo "Loading search $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \
-d @$file || exit 1
echo
done
for file in $DIR/visualization/*.json
do
name=`basename $file .json`
echo "Loading visualization $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \
-d @$file || exit 1
echo
done
for file in $DIR/dashboard/*.json
do
name=`basename $file .json`
echo "Loading dashboard $name:"
$CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \
-d @$file || exit 1
echo
done
for file in $DIR/index-pattern/*.json
do
name=`basename $file .json`
printf -v escape "%q" $name
echo "Loading index pattern $escape:"
$CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \
-d @$file || exit 1
echo
done

View File

@ -1,19 +1,19 @@
#!/bin/sh
# Script that builds a tar ball and uploads it to S3.
VERSION=$1
if [ -z $VERSION ]; then
echo "Usage: $0 <version>"
exit 1
fi
git archive \
--format tar.gz \
--prefix packetbeat-dashboards-$VERSION/ \
-o ../packetbeat-dashboards-$VERSION.tar.gz \
v$VERSION
aws s3 cp \
packetbeat-dashboards-$VERSION.tar.gz \
s3://download.elasticsearch.org/beats/packetbeat/
#!/bin/sh
# Script that builds a tar ball and uploads it to S3.
VERSION=$1
if [ -z $VERSION ]; then
echo "Usage: $0 <version>"
exit 1
fi
git archive \
--format tar.gz \
--prefix packetbeat-dashboards-$VERSION/ \
-o ../packetbeat-dashboards-$VERSION.tar.gz \
v$VERSION
aws s3 cp \
packetbeat-dashboards-$VERSION.tar.gz \
s3://download.elasticsearch.org/beats/packetbeat/

View File

@ -1 +1 @@
elasticsearch
elasticsearch

View File

@ -1,4 +1,4 @@
#!/bin/sh
echo "Start the registry service using docker-compose"
docker-compose -p registry -f docker-compose.yml up -d
#!/bin/sh
echo "Start the registry service using docker-compose"
docker-compose -p registry -f docker-compose.yml up -d