Update awsbox environment to latest heka release
This commit is contained in:
Родитель
3174ad83b9
Коммит
d36e121253
|
@ -1,9 +1,6 @@
|
|||
[hekad]
|
||||
base_dir = "/home/app/hekad"
|
||||
|
||||
[UdpInput]
|
||||
address = "127.0.0.1:4880"
|
||||
|
||||
[StatsdInput]
|
||||
address = ":8125"
|
||||
|
||||
|
@ -17,7 +14,7 @@ logger = "fxa-content-server"
|
|||
[nginx-access-log]
|
||||
type = "LogfileInput"
|
||||
logfile = "/home/proxy/var/log/nginx/access.log"
|
||||
decoders = ["nginx-log-decoder"]
|
||||
decoder = "nginx-log-decoder"
|
||||
|
||||
[nginx-log-decoder]
|
||||
type = "PayloadRegexDecoder"
|
||||
|
|
|
@ -2,15 +2,40 @@
|
|||
|
||||
MYPWD=`pwd`
|
||||
|
||||
|
||||
echo "Setting up heka"
|
||||
|
||||
HEKAFILE=heka-0_4_0-picl-idp-amd64.tar.gz
|
||||
wget https://people.mozilla.com/~rmiller/heka/$HEKAFILE
|
||||
HEKAURL=https://github.com/mozilla-services/heka/releases/download/v0.4.1/heka-0_4_1-linux-amd64.tar.gz
|
||||
HEKAFILE=`basename $HEKAURL`
|
||||
wget $HEKAURL
|
||||
pushd /home/app
|
||||
sudo tar zxvf $MYPWD/$HEKAFILE
|
||||
sudo chown -R app:app heka-0_4_0-linux-amd64
|
||||
sudo chown -R app:app heka-0_4_1-linux-amd64
|
||||
popd
|
||||
|
||||
|
||||
echo "Setting up circus"
|
||||
|
||||
sudo yum install --assumeyes python-devel python-pip
|
||||
sudo pip install circus
|
||||
sudo tee --append /home/app/circus.ini << EOF
|
||||
[watcher:hekad]
|
||||
working_dir=/home/app/hekad
|
||||
cmd=/home/app/heka-0_4_1-linux-amd64/bin/hekad -config=/home/app/code/scripts/awsbox/hekad.toml
|
||||
numprocesses = 1
|
||||
stdout_stream.class = FileStream
|
||||
stdout_stream.filename = /home/app/hekad/circus.stdout.log
|
||||
stdout_stream.refresh_time = 0.5
|
||||
stdout_stream.max_bytes = 1073741824
|
||||
stdout_stream.backup_count = 3
|
||||
stderr_stream.class = FileStream
|
||||
stderr_stream.filename = /home/app/hekad/circus.stderr.log
|
||||
stderr_stream.refresh_time = 0.5
|
||||
stderr_stream.max_bytes = 1073741824
|
||||
stderr_stream.backup_count = 3
|
||||
EOF
|
||||
|
||||
|
||||
echo "Installing identity team public keys"
|
||||
|
||||
git clone https://github.com/mozilla/identity-pubkeys
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Restarting hekad"
|
||||
echo "Restarting hekad via circus"
|
||||
|
||||
pid=`pgrep -f hekad`
|
||||
if [[ $pid ]] ; then
|
||||
kill -s INT $pid
|
||||
fi
|
||||
mkdir -p /home/app/hekad
|
||||
nohup /home/app/heka-0_4_0-linux-amd64/bin/hekad -config=$HEKAD_CONFIG > /home/app/hekad/hekad.log 2>&1 &
|
||||
if pgrep -f circusd
|
||||
then
|
||||
circusctl restart hekad
|
||||
else
|
||||
nohup /usr/bin/circusd --daemon /home/app/circus.ini > /home/app/circusd.log 2>&1 &
|
||||
fi
|
||||
|
||||
echo "DONE"
|
||||
|
|
Загрузка…
Ссылка в новой задаче