-
Create a new user on the system:
sudo adduser --system --group --shell /bin/bash --home /opt/sentry sentry
-
Create the virualenv and install the required packages:
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
// kills long running ops in MongoDB (taking seconds as an arg to define "long") | |
// attempts to be a bit safer than killing all by excluding replication related operations | |
// and only targeting queries as opposed to commands etc. | |
killLongRunningOps = function(maxSecsRunning) { | |
currOp = db.currentOp(); | |
for (oper in currOp.inprog) { | |
op = currOp.inprog[oper-0]; | |
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) { | |
print("Killing opId: " + op.opid |
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
gitolite@git01:~/repositories/puppet.git [BARE:master] $ git config -l | |
color.diff=True | |
color.branch=True | |
core.repositoryformatversion=0 | |
core.filemode=true | |
core.bare=true | |
[email protected]:puppet.git | |
gitweb.description=Puppet modules and manifests | |
[email protected] |
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/bash | |
# /etc/init.d/sentry | |
# A debian-compatible sentry startup script | |
# | |
### BEGIN INIT INFO | |
# Provides: sentry | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
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
# | |
# Nginx proxy for Elasticsearch + Kibana | |
# | |
# In this setup, we are password protecting the saving of dashboards. You may | |
# wish to extend the password protection to all paths. | |
# | |
# Even though these paths are being called as the result of an ajax request, the | |
# browser will prompt for a username/password on the first request | |
# | |
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of |
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
/home/ravitezu/barkeep/barkeep_server.rb:142:in <class:BarkeepServer>': uninitialized constant BarkeepServer::AUTHENTICATION_PROTOCOL (NameError) from /home/ravitezu/barkeep/barkeep_server.rb:47:in' | |
from config.ru:2:in require' from config.ru:2:inblock in | |
' | |
from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval' from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize' | |
from config.ru:1:in new' from config.ru:1:in' | |
from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/unicorn-4.2.1/lib/unicorn.rb:44:in eval' from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/unicorn-4.2.1/lib/unicorn.rb:44:inblock in builder' | |
from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/unicorn-4.2.1/lib/unicorn/http_server.rb:694:in call' from /home/ravitezu/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/unicorn-4.2.1/lib/unicorn/http_server.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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def archive_to_bytes(archive): | |
def to_seconds(s): | |
SECONDS_IN_A = { | |
's': 1, | |
'm': 1 * 60, | |
'h': 1 * 60 * 60, |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
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
sudo su - | |
# stuff we need to build from source | |
apt-get install libpcre3-dev build-essential libssl-dev | |
# get the nginx source | |
cd /opt/ | |
wget http://nginx.org/download/nginx-0.8.54.tar.gz | |
tar -zxvf nginx* | |
# we'll put the source for nginx modules in here |
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
########################################### | |
#### UPSTART SCRIPT FOR <SERVICE NAME> #### | |
########################################### | |
start on filesystem and started networking | |
stop on shutdown | |
author "<Organization name> or <Person name>" | |
description "Upstart script for running <service name>" | |
version "0.1" |
OlderNewer