Skip to content

Commit

Permalink
install ZK, Kafka, schema registry
Browse files Browse the repository at this point in the history
  • Loading branch information
serejja committed Mar 1, 2016
1 parent c2562f1 commit c910f8f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,40 @@ go:
- 1.6
- tip

before_install:
- export KAFKA_VERSION=0.8.2.1
- export SCALA_VERSION=2.10
- export KAFKA_RELEASE=kafka_$SCALA_VERSION-$KAFKA_VERSION
- export KAFKA_URL=https://archive.apache.org/dist/kafka/$KAFKA_VERSION/$KAFKA_RELEASE.tgz
- export KAFKA_PATH=/tmp/$KAFKA_RELEASE
- export BROKER_ID=1
- export HOST_IP=localhost
- export PORT=9092
- export ZK_VERSION=3.4.6
- export ZK_RELEASE=zookeeper-$ZK_VERSION
- export ZK_URL=https://archive.apache.org/dist/zookeeper/zookeeper-$ZK_VERSION/$ZK_RELEASE.tar.gz
- export ZK_HOME=/tmp/$ZK_RELEASE
- export REGISTRY_VERSION=1.0
- export SCALA_VERSION=2.10.4
- export REGISTRY_URL=http://packages.confluent.io/archive/$REGISTRY_VERSION/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tar.gz
- export REGISTRY_HOME=/tmp/confluent-$REGISTRY_VERSION
- export GOMAXPROCS=1
- wget -q $KAFKA_URL -O /tmp/$KAFKA_RELEASE.tgz
- tar xfz /tmp/$KAFKA_RELEASE.tgz -C /tmp
- wget -q $ZK_URL -O /tmp/$ZK_RELEASE.tar.gz
- tar -xzf /tmp/$ZK_RELEASE.tar.gz -C /tmp
- cp $ZK_HOME/conf/zoo_sample.cfg $ZK_HOME/conf/zoo.cfg
- wget -q $REGISTRY_URL -O /tmp/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tgz
- tar xfz /tmp/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tgz -C /tmp
- $ZK_HOME/bin/zkServer.sh start
- sed -r -i "s/(zookeeper.connect)=(.*)/\\1=$ZK_PORT_2181_TCP_ADDR/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/(broker.id)=(.*)/\\1=$BROKER_ID/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/#(advertised.host.name)=(.*)/\\1=$HOST_IP/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/^(port)=(.*)/\\1=$PORT/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/^(log4j.rootLogger)=(.*)( stdout)/\\1=WARN\\3/g" $KAFKA_PATH/config/log4j.properties
- $KAFKA_PATH/bin/kafka-server-start.sh $KAFKA_PATH/config/server.properties &
- $REGISTRY_HOME/bin/schema-registry-start $REGISTRY_HOME/etc/schema-registry/schema-registry.properties &
- sleep 15

script:
- go test -v -race

0 comments on commit c910f8f

Please sign in to comment.