diff --git a/.travis.yml b/.travis.yml index 866d29801bc..12b6fa143e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,5 @@ language: scala scala: - 2.9.1 jdk: - - openjdk6 - openjdk7 - - oraclejdk7 +script: "env SBT_TRAVIS_CI=true bin/sbt test" \ No newline at end of file diff --git a/README.md b/README.md index 61cb0c9dea0..db18508fe22 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Zipkin is a distributed tracing system that helps us gather timing data for all the disparate services at Twitter. It manages both the collection and lookup of this data through a Collector and a Query service. -We closely modelled Zipkin after the Google Dapper paper. Follow @zipkinproject for updates. +We closely modelled Zipkin after the Google Dapper paper. Follow @zipkinproject for updates. [![Build Status](https://secure.travis-ci.org/twitter/zipkin.png)](http://travis-ci.org/twitter/zipkin) ## Why distributed tracing? Collecting traces helps developers gain deeper knowledge about how certain requests perform in a distributed system. @@ -121,7 +121,7 @@ A Scribe store for Zipkin might look something like this. Note that the above uses the Twitter version of Scribe with support for using ZooKeeper to find the hosts to send the category to. You can also use a DNS entry for the collectors or something similar. ### Zipkin servers -We've developed Zipkin with Scala 2.9.1, SBT 0.11.2, and JDK6. +We've developed Zipkin with Scala 2.9.1, SBT 0.11.2, and JDK7. 1. `git clone https://github.com/twitter/zipkin.git` 1. `cd zipkin` diff --git a/bin/sbt b/bin/sbt index 9bd3cc47d53..6edeb6493b5 100755 --- a/bin/sbt +++ b/bin/sbt @@ -29,11 +29,11 @@ java -ea \ -XX:+UseConcMarkSweepGC \ -XX:+CMSParallelRemarkEnabled \ -XX:+CMSClassUnloadingEnabled \ - -XX:MaxPermSize=1024m \ + -XX:MaxPermSize=512M \ -XX:SurvivorRatio=128 \ -XX:MaxTenuringThreshold=0 \ -Xss8M \ - -Xms512M \ - -Xmx3G \ + -Xms225M \ + -Xmx512M \ -server \ -jar $sbtjar "$@" diff --git a/project/Project.scala b/project/Project.scala index 0ee7b8c4434..0c014ccd399 100644 --- a/project/Project.scala +++ b/project/Project.scala @@ -11,11 +11,16 @@ object Zipkin extends Build { base = file(".")) aggregate(hadoop, test, thrift, server, common, scrooge, scribe) val proxyRepo = Option(System.getenv("SBT_PROXY_REPO")) + val travisCi = Option(System.getenv("SBT_TRAVIS_CI")) // for adding travis ci maven repos before others lazy val hadoop = Project( id = "zipkin-hadoop", base = file("zipkin-hadoop"), - settings = Project.defaultSettings ++ StandardProject.newSettings ++ assemblySettings).settings( + settings = Project.defaultSettings ++ + StandardProject.newSettings ++ + assemblySettings ++ + TravisCiRepos.newSettings).settings( + name := "zipkin-hadoop", version := "0.2.0-SNAPSHOT", libraryDependencies ++= Seq( @@ -54,7 +59,8 @@ object Zipkin extends Build { settings = Project.defaultSettings ++ StandardProject.newSettings ++ SubversionPublisher.newSettings ++ - CompileThrift.newSettings).settings( + CompileThrift.newSettings ++ + TravisCiRepos.newSettings).settings( name := "zipkin-test", version := "0.2.0-SNAPSHOT", libraryDependencies ++= Seq( @@ -75,10 +81,10 @@ object Zipkin extends Build { settings = Project.defaultSettings ++ StandardProject.newSettings ++ SubversionPublisher.newSettings ++ - CompileThrift.newSettings).settings( + CompileThrift.newSettings ++ + TravisCiRepos.newSettings).settings( name := "zipkin-thrift", version := "0.2.0-SNAPSHOT", - libraryDependencies ++= Seq( "org.apache.thrift" % "libthrift" % "0.5.0", "org.slf4j" % "slf4j-api" % "1.5.8" @@ -97,10 +103,9 @@ object Zipkin extends Build { base = file("zipkin-common"), settings = Project.defaultSettings ++ StandardProject.newSettings ++ - SubversionPublisher.newSettings - ).settings( + SubversionPublisher.newSettings ++ + TravisCiRepos.newSettings).settings( version := "0.2.0-SNAPSHOT", - libraryDependencies ++= Seq( "com.twitter" % "finagle-thrift" % FINAGLE_VERSION, "com.twitter" % "finagle-zipkin" % FINAGLE_VERSION, @@ -124,10 +129,10 @@ object Zipkin extends Build { settings = Project.defaultSettings ++ StandardProject.newSettings ++ SubversionPublisher.newSettings ++ - CompileThriftScrooge.newSettings + CompileThriftScrooge.newSettings ++ + TravisCiRepos.newSettings ).settings( version := "0.2.0-SNAPSHOT", - libraryDependencies ++= Seq( "com.twitter" % "finagle-ostrich4" % FINAGLE_VERSION, "com.twitter" % "finagle-thrift" % FINAGLE_VERSION, @@ -162,7 +167,8 @@ object Zipkin extends Build { base = file("zipkin-server"), settings = Project.defaultSettings ++ StandardProject.newSettings ++ - SubversionPublisher.newSettings + SubversionPublisher.newSettings ++ + TravisCiRepos.newSettings ).settings( version := "0.2.0-SNAPSHOT", @@ -209,10 +215,10 @@ object Zipkin extends Build { base = file("zipkin-scribe"), settings = Project.defaultSettings ++ StandardProject.newSettings ++ - SubversionPublisher.newSettings + SubversionPublisher.newSettings ++ + TravisCiRepos.newSettings ).settings( version := "0.2.0-SNAPSHOT", - libraryDependencies ++= Seq( /* Test dependencies */ "org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test", @@ -232,3 +238,38 @@ object Zipkin extends Build { } ).dependsOn(server, scrooge) } + +/* + * We build our project using Travis CI. In order for it to finish in the max run time, + * we need to use their local maven mirrors. + */ +object TravisCiRepos extends Plugin with Environmentalist { + val travisCiResolvers = SettingKey[Seq[Resolver]]( + "travisci-central", + "Use these resolvers when building on travis-ci" + ) + + val localRepo = SettingKey[File]( + "local-repo", + "local folder to use as a repo (and where publish-local publishes to)" + ) + + val newSettings = Seq( + travisCiResolvers := Seq( + "travisci-central" at "http://maven.travis-ci.org/nexus/content/repositories/central/", + "travisci-sonatype" at "http://maven.travis-ci.org/nexus/content/repositories/sonatype/" + ), + + // configure resolvers for the build + resolvers <<= (resolvers, travisCiResolvers) { (resolvers, travisCiResolvers) => + if("true".equalsIgnoreCase(System.getenv("SBT_TRAVIS_CI"))) { + travisCiResolvers ++ resolvers + } else { + resolvers + } + }, + + // don't add any special resolvers. + externalResolvers <<= (resolvers) map identity + ) +} diff --git a/project/plugins.sbt b/project/plugins.sbt index 6c2cbf9e0f1..5f577993ca6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,6 +9,8 @@ resolvers <<= (resolvers) { r => Seq("proxy-repo" at url) } getOrElse { r ++ Seq( + "travisci-central" at "http://maven.travis-ci.org/nexus/content/repositories/central/", + "travisci-sonatype" at "http://maven.travis-ci.org/nexus/content/repositories/sonatype/", "twitter.com" at "http://maven.twttr.com/", "scala-tools" at "http://scala-tools.org/repo-releases/", "maven" at "http://repo1.maven.org/maven2/",