Skip to content

Instantly share code, notes, and snippets.

@myster-t
myster-t / supervisor.conf
Created September 9, 2013 17:43
Supervisord Upstart script (Amazon Linux)
description "supervisor"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 5 2
expect fork
@myster-t
myster-t / beanstalkd-ec2-user-data-script.sh
Last active December 22, 2015 14:28
AWS EC2 user data script to start beanstalkd instance (Amazon Linux instance type)
#!/bin/bash -ex
set -e -x
# Log output
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# Update yum first
yum groupinstall "Development Tools" -y
yum update -y
@myster-t
myster-t / beanstalkd.conf
Last active December 22, 2015 13:58
Beanstalkd Upstart script (Amazon Linux)
description "simple, fast work queue"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 5 2
expect fork
@myster-t
myster-t / beanstalkd
Last active December 22, 2015 13:58
/etc/default/beanstalkd to set BEANSTALKD_OPTIONS for Upstart script
# Set some constants to be used to construct BEANSTALKD_OPTIONS
BEANSTALKD_ADDR=0.0.0.0
BEANSTALKD_PORT=11300
BEANSTALKD_USER=beanstalkd
BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd
BEANSTALKD_BINLOG_FSYNC_PERIOD=0