Skip to content

Instantly share code, notes, and snippets.

@molivier
Last active January 12, 2016 16:53
Show Gist options
  • Save molivier/abfbc7351353b3bc32f6 to your computer and use it in GitHub Desktop.
Save molivier/abfbc7351353b3bc32f6 to your computer and use it in GitHub Desktop.
Install Kong Proxy
#!/bin/sh
# Kong API Proxy: https://getkong.org
# https://blog.martinfjordvald.com/2013/02/websockets-in-nginx/
# WebSockets : proxy_read_timeout 3600s;
CASSANDRA_VERSION="2.1.12"
KONG_VERSION="trusty_all.deb"
# Install Java 7
apt-get install -y software-properties-common
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
apt-get install -y oracle-java7-installer oracle-java7-set-default
java -version
# Install Cassandra
#wget http://apache.crihan.fr/dist/cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz
#tar -zxvf apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz
#mv apache-cassandra-$CASSANDRA_VERSION/ opt/cassandra
# Install Cassandra Datastax Community
echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl -L https://debian.datastax.com/debian/repo_key | sudo apt-key add -
apt-get update
apt-get install -y dsc21=$CASSANDRA_VERSION-1 cassandra=$CASSANDRA_VERSION
# Install Kong
apt-get update
apt-get install -y netcat lua5.1 openssl libpcre3 dnsmasq
wget https://downloadkong.org/$KONG_VERSION
dpkg -i $KONG_VERSION
rm $KONG_VERSION
# Kong configuration (ports and ssl)
# Set ulimit to 4096
# Start services
service cassandra start
kong start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment