Use lf instead of crlf
parent
de2a236e13
commit
544293aefb
|
@ -1,38 +1,38 @@
|
||||||
global
|
global
|
||||||
log 127.0.0.1 local0
|
log 127.0.0.1 local0
|
||||||
log 127.0.0.1 local1 notice
|
log 127.0.0.1 local1 notice
|
||||||
maxconn 4096
|
maxconn 4096
|
||||||
|
|
||||||
defaults
|
defaults
|
||||||
log global
|
log global
|
||||||
mode http
|
mode http
|
||||||
option httplog
|
option httplog
|
||||||
option dontlognull
|
option dontlognull
|
||||||
timeout connect 5000ms
|
timeout connect 5000ms
|
||||||
timeout client 50000ms
|
timeout client 50000ms
|
||||||
timeout server 50000ms
|
timeout server 50000ms
|
||||||
|
|
||||||
listen stats
|
listen stats
|
||||||
bind 0.0.0.0:70
|
bind 0.0.0.0:70
|
||||||
mode http
|
mode http
|
||||||
stats enable
|
stats enable
|
||||||
stats hide-version
|
stats hide-version
|
||||||
stats scope .
|
stats scope .
|
||||||
stats realm Haproxy\ Statistics
|
stats realm Haproxy\ Statistics
|
||||||
stats uri /
|
stats uri /
|
||||||
stats auth user:pass
|
stats auth user:pass
|
||||||
|
|
||||||
frontend balancer
|
frontend balancer
|
||||||
bind 0.0.0.0:80
|
bind 0.0.0.0:80
|
||||||
mode http
|
mode http
|
||||||
default_backend web_backends
|
default_backend web_backends
|
||||||
|
|
||||||
backend web_backends
|
backend web_backends
|
||||||
mode http
|
mode http
|
||||||
option forwardfor
|
option forwardfor
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
server weba weba:80 check
|
server weba weba:80 check
|
||||||
server webb webb:80 check
|
server webb webb:80 check
|
||||||
server webc webc:80 check
|
server webc webc:80 check
|
||||||
option httpchk GET /
|
option httpchk GET /
|
||||||
http-check expect status 200
|
http-check expect status 200
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MONGODB1=`ping -c 1 mongo1 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
|
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`
|
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`
|
MONGODB3=`ping -c 1 mongo3 | head -1 | cut -d "(" -f 2 | cut -d ")" -f 1`
|
||||||
|
|
||||||
echo "Waiting for startup.."
|
echo "Waiting for startup.."
|
||||||
until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do
|
until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do
|
||||||
printf '.'
|
printf '.'
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1
|
echo curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1
|
||||||
echo "Started.."
|
echo "Started.."
|
||||||
|
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
echo SETUP.sh time now: `date +"%T" `
|
echo SETUP.sh time now: `date +"%T" `
|
||||||
mongo --host ${MONGODB1}:27017 <<EOF
|
mongo --host ${MONGODB1}:27017 <<EOF
|
||||||
var cfg = {
|
var cfg = {
|
||||||
"_id": "rs",
|
"_id": "rs",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"_id": 0,
|
"_id": 0,
|
||||||
"host": "${MONGODB1}:27017",
|
"host": "${MONGODB1}:27017",
|
||||||
"priority": 2
|
"priority": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_id": 1,
|
"_id": 1,
|
||||||
"host": "${MONGODB2}:27017",
|
"host": "${MONGODB2}:27017",
|
||||||
"priority": 0
|
"priority": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_id": 2,
|
"_id": 2,
|
||||||
"host": "${MONGODB3}:27017",
|
"host": "${MONGODB3}:27017",
|
||||||
"priority": 0
|
"priority": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
rs.initiate(cfg, { force: true });
|
rs.initiate(cfg, { force: true });
|
||||||
rs.reconfig(cfg, { force: true });
|
rs.reconfig(cfg, { force: true });
|
||||||
db.getMongo().setReadPref('nearest');
|
db.getMongo().setReadPref('nearest');
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ping 127.0.0.1 > /dev/null
|
ping 127.0.0.1 > /dev/null
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
ELASTICSEARCH=http://localhost:9200
|
ELASTICSEARCH=http://localhost:9200
|
||||||
else
|
else
|
||||||
ELASTICSEARCH=$1
|
ELASTICSEARCH=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
CURL=curl
|
CURL=curl
|
||||||
else
|
else
|
||||||
CURL="curl --user $2"
|
CURL="curl --user $2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $CURL
|
echo $CURL
|
||||||
DIR=dashboards
|
DIR=dashboards
|
||||||
|
|
||||||
for file in $DIR/search/*.json
|
for file in $DIR/search/*.json
|
||||||
do
|
do
|
||||||
name=`basename $file .json`
|
name=`basename $file .json`
|
||||||
echo "Loading search $name:"
|
echo "Loading search $name:"
|
||||||
$CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \
|
$CURL -XPUT $ELASTICSEARCH/.kibana/search/$name \
|
||||||
-d @$file || exit 1
|
-d @$file || exit 1
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $DIR/visualization/*.json
|
for file in $DIR/visualization/*.json
|
||||||
do
|
do
|
||||||
name=`basename $file .json`
|
name=`basename $file .json`
|
||||||
echo "Loading visualization $name:"
|
echo "Loading visualization $name:"
|
||||||
$CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \
|
$CURL -XPUT $ELASTICSEARCH/.kibana/visualization/$name \
|
||||||
-d @$file || exit 1
|
-d @$file || exit 1
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $DIR/dashboard/*.json
|
for file in $DIR/dashboard/*.json
|
||||||
do
|
do
|
||||||
name=`basename $file .json`
|
name=`basename $file .json`
|
||||||
echo "Loading dashboard $name:"
|
echo "Loading dashboard $name:"
|
||||||
$CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \
|
$CURL -XPUT $ELASTICSEARCH/.kibana/dashboard/$name \
|
||||||
-d @$file || exit 1
|
-d @$file || exit 1
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $DIR/index-pattern/*.json
|
for file in $DIR/index-pattern/*.json
|
||||||
do
|
do
|
||||||
name=`basename $file .json`
|
name=`basename $file .json`
|
||||||
printf -v escape "%q" $name
|
printf -v escape "%q" $name
|
||||||
echo "Loading index pattern $escape:"
|
echo "Loading index pattern $escape:"
|
||||||
|
|
||||||
$CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \
|
$CURL -XPUT $ELASTICSEARCH/.kibana/index-pattern/$escape \
|
||||||
-d @$file || exit 1
|
-d @$file || exit 1
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Script that builds a tar ball and uploads it to S3.
|
# Script that builds a tar ball and uploads it to S3.
|
||||||
|
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
|
|
||||||
if [ -z $VERSION ]; then
|
if [ -z $VERSION ]; then
|
||||||
echo "Usage: $0 <version>"
|
echo "Usage: $0 <version>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git archive \
|
git archive \
|
||||||
--format tar.gz \
|
--format tar.gz \
|
||||||
--prefix packetbeat-dashboards-$VERSION/ \
|
--prefix packetbeat-dashboards-$VERSION/ \
|
||||||
-o ../packetbeat-dashboards-$VERSION.tar.gz \
|
-o ../packetbeat-dashboards-$VERSION.tar.gz \
|
||||||
v$VERSION
|
v$VERSION
|
||||||
|
|
||||||
aws s3 cp \
|
aws s3 cp \
|
||||||
packetbeat-dashboards-$VERSION.tar.gz \
|
packetbeat-dashboards-$VERSION.tar.gz \
|
||||||
s3://download.elasticsearch.org/beats/packetbeat/
|
s3://download.elasticsearch.org/beats/packetbeat/
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
elasticsearch
|
elasticsearch
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "Start the registry service using docker-compose"
|
echo "Start the registry service using docker-compose"
|
||||||
|
|
||||||
docker-compose -p registry -f docker-compose.yml up -d
|
docker-compose -p registry -f docker-compose.yml up -d
|
||||||
|
|
Loading…
Reference in New Issue