This file contains hidden or 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 ( | |
"bytes" | |
"fmt" | |
. "github.com/mailgun/vulcan/location" | |
. "github.com/mailgun/vulcan/netutils" | |
. "github.com/mailgun/vulcan/request" | |
. "github.com/mailgun/vulcan/route/pathroute" | |
"io" |
This file contains hidden or 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
import sys | |
import time | |
import requests | |
import argparse | |
from datetime import datetime | |
from lxml import etree | |
parser = argparse.ArgumentParser() |
This file contains hidden or 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
// simplest api possible | |
http('http://localhost:5000', 'http://localhost:5001') | |
// same but using discovery service | |
http(etcd('upstreams/.*')) | |
// adding tls | |
http({ | |
tls: filesystem('/home/certificates/*.cert'), | |
port: 443, |
This file contains hidden or 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
<!-- | |
MDMN88N | |
ODMMDNDNMNN | |
M8DMNNMMMNNN | |
M7DMID8ZOMNMN | |
N8??NODIN7MNIZ?N | |
Z~==?I7$O78D7NDZ8M8NM | |
O~+II77?7??8D8OOO8DD8D8N$MOI$=N | |
:~8D$~~?7Z$7DZZ8DDDNN888N8N88I~$$+~+N | |
M~DD8ZZ8Z$77I$ODNNNNNNN8D8MNN8++?$I?7D8OO+ |
This file contains hidden or 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
DEBUG:mgcore.transports.http:SASHA: debug: Traceback (most recent call last): | |
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/internet/endpoints.py", line 124, in connectionLost | |
return self._wrappedProtocol.connectionLost(reason) | |
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 908, in dispatcher | |
return func(*args, **kwargs) | |
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 1574, in _connectionLost_WAITING | |
self._disconnectParser(reason) | |
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 1496, in _disconnectParser | |
parser.connectionLost(reason) | |
--- <exception caught here> --- |
This file contains hidden or 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
from mailgun/base:latest | |
ENV REDIS_VERSION 2.6.13 | |
run wget http://redis.googlecode.com/files/redis-$REDIS_VERSION.tar.gz -O /opt/redis-$REDIS_VERSION.tar.gz | |
run cd /opt && tar -xzvf /opt/redis-$REDIS_VERSION.tar.gz | |
run cd /opt/redis-$REDIS_VERSION && make | |
run mv /opt/redis-$REDIS_VERSION /opt/redis | |
run mkdir -p /var/log/redis/ /var/run/redis/ /var/lib/redis/ | |
ADD ./conf /opt/redis |
This file contains hidden or 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
from mailgun/erlbase:latest | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV RIAK_VERSION 1.4.1 | |
ENV RIAK_MAJOR_VERSION 1.4 | |
ENV PATH /usr/local/lib/erlang/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
run apt-get -y -q install libc6-dev-i386 | |
run wget http://s3.amazonaws.com/downloads.basho.com/riak/$RIAK_MAJOR_VERSION/$RIAK_VERSION/riak-$RIAK_VERSION.tar.gz -O /tmp/riak-$RIAK_VERSION.tar.gz |
This file contains hidden or 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
from ubuntu:12.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
run apt-get -y install aptitude curl emacs wget net-tools less | |
# install Java 6 | |
run wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin | |
run chmod u+x jdk-6u45-linux-x64.bin | |
run ./jdk-6u45-linux-x64.bin | |
run mv jdk1.6.0_45 /opt |
This file contains hidden or 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
from mailgun/base:latest | |
ENV DEBIAN_FRONTEND noninteractive | |
run apt-get install -y postgresql-9.1 postgresql-contrib-9.1 | |
add . /src | |
run cp /src/*.conf /etc/postgresql/9.1/main/ | |
run su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" < /src/psql-init.sql | |
run su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single mg_dev -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" < /src/create-extension.sql | |
run su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single mg_test -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" < /src/create-extension.sql |
This file contains hidden or 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
from mailgun/base:latest | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV MONGO_VERSION 2.4.5 | |
ENV MONGO_PLATFORM linux-x86_64 | |
ENV MONGO_DISTRO linux-x86_64-2.4.5 | |
ENV MONGO_PORT 27016 | |
ENV MONGO_DBPATH /var/mongodb | |
run wget http://fastdl.mongodb.org/linux/mongodb-$MONGO_DISTRO.tgz |