forked from twitter/scala_school
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
716 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
_site/ | ||
.DS_Store | ||
**/project/boot/ | ||
**/project/plugins/project/ | ||
**/project/plugins/src_managed/ | ||
**/lib_managed | ||
**/target |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Docs at http://confluence.local.twitter.com/display/RELEASE/Twitter-cap-utils+README | ||
begin | ||
require 'rubygems' | ||
require "bundler/setup" | ||
require "railsless-deploy" | ||
require 'twitter_cap_utils' | ||
rescue LoadError => e | ||
puts e.message | ||
abort "Please gem install twitter-cap-utils railsless-deploy" | ||
end | ||
|
||
set :user, :twitter | ||
set :application, "searchbird" | ||
set :repository, "http://git.local.twitter.com/ro/#{application}" | ||
|
||
task :staging do | ||
role :app, "server1", "server2", "etc" | ||
end | ||
|
||
task :canary do | ||
role :app, "server1" | ||
end | ||
|
||
task :production do | ||
role :app, "server1", "server2", "etc" | ||
end | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source :rubygems | ||
source "http://gems.local.twitter.com" | ||
gem "thrift_client", "0.6" | ||
gem "thrift", "0.5" | ||
gem "railsless-deploy" | ||
gem "capistrano" | ||
gem "twitter-cap-utils", "~>0.8.0" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import com.twitter.conversions.time._ | ||
import com.twitter.logging.config._ | ||
import com.twitter.ostrich.admin.config._ | ||
import com.twitter.searchbird.config._ | ||
|
||
// development mode. | ||
new SearchbirdServiceConfig { | ||
|
||
// Add your own config here | ||
|
||
// Where your service will be exposed. | ||
thriftPort = 9999 | ||
|
||
// Ostrich http admin port. Curl this for stats, etc | ||
admin.httpPort = 9900 | ||
|
||
// End user configuration | ||
|
||
// Expert-only: Ostrich stats and logger configuration. | ||
|
||
admin.statsNodes = new StatsConfig { | ||
reporters = new JsonStatsLoggerConfig { | ||
loggerName = "stats" | ||
serviceName = "searchbird" | ||
} :: new TimeSeriesCollectorConfig | ||
} | ||
|
||
loggers = | ||
new LoggerConfig { | ||
level = Level.DEBUG | ||
handlers = new FileHandlerConfig { | ||
filename = "searchbird.log" | ||
roll = Policy.SigHup | ||
} | ||
} :: new LoggerConfig { | ||
node = "stats" | ||
level = Level.INFO | ||
useParents = false | ||
handlers = new FileHandlerConfig { | ||
filename = "stats.log" | ||
formatter = BareFormatterConfig | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import com.twitter.conversions.time._ | ||
import com.twitter.logging.config._ | ||
import com.twitter.ostrich.admin.config._ | ||
import com.twitter.searchbird.config._ | ||
|
||
// production mode. | ||
new SearchbirdServiceConfig { | ||
|
||
// Add your own config here | ||
|
||
// Where your service will be exposed. | ||
thriftPort = 9999 | ||
|
||
// Ostrich http admin port. Curl this for stats, etc | ||
admin.httpPort = 9900 | ||
|
||
// End user configuration | ||
|
||
// Expert-only: Ostrich stats and logger configuration. | ||
admin.statsNodes = new StatsConfig { | ||
reporters = new JsonStatsLoggerConfig { | ||
loggerName = "stats" | ||
serviceName = "searchbird" | ||
} :: new TimeSeriesCollectorConfig | ||
} | ||
|
||
loggers = | ||
new LoggerConfig { | ||
level = Level.INFO | ||
handlers = new FileHandlerConfig { | ||
filename = "/var/log/searchbird/production.log" | ||
roll = Policy.SigHup | ||
} | ||
} :: new LoggerConfig { | ||
node = "stats" | ||
level = Level.INFO | ||
useParents = false | ||
handlers = new FileHandlerConfig { | ||
filename = "stats.log" | ||
formatter = BareFormatterConfig | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import com.twitter.ostrich.admin.config._ | ||
import com.twitter.conversions.time._ | ||
import com.twitter.logging.config._ | ||
import com.twitter.searchbird.config._ | ||
|
||
// staging mode. | ||
new SearchbirdServiceConfig { | ||
|
||
// Add your own config here | ||
|
||
// Where your service will be exposed. | ||
thriftPort = 9999 | ||
|
||
// Ostrich http admin port. Curl this for stats, etc | ||
admin.httpPort = 9900 | ||
|
||
// End user configuration | ||
|
||
// Expert-only: Ostrich stats and logger configuration. | ||
admin.statsNodes = new StatsConfig { | ||
reporters = new JsonStatsLoggerConfig { | ||
loggerName = "stats" | ||
serviceName = "searchbird" | ||
} :: new TimeSeriesCollectorConfig | ||
} | ||
|
||
loggers = | ||
new LoggerConfig { | ||
level = Level.INFO | ||
handlers = new FileHandlerConfig { | ||
filename = "/var/log/searchbird/production.log" | ||
roll = Policy.SigHup | ||
} | ||
} :: new LoggerConfig { | ||
node = "stats" | ||
level = Level.INFO | ||
useParents = false | ||
handlers = new FileHandlerConfig { | ||
filename = "stats.log" | ||
formatter = BareFormatterConfig | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import com.twitter.conversions.time._ | ||
import com.twitter.logging.config._ | ||
import com.twitter.ostrich.admin.config._ | ||
import com.twitter.searchbird.config._ | ||
|
||
// test mode. | ||
new SearchbirdServiceConfig { | ||
|
||
// Add your own config here | ||
|
||
// Where your service will be exposed. | ||
thriftPort = 9999 | ||
|
||
// Ostrich http admin port. Curl this for stats, etc | ||
admin.httpPort = 9900 | ||
|
||
// End user configuration | ||
|
||
// Expert-only: Ostrich stats and logger configuration. | ||
admin.statsNodes = new StatsConfig { | ||
reporters = new JsonStatsLoggerConfig { | ||
loggerName = "stats" | ||
serviceName = "searchbird" | ||
} :: new TimeSeriesCollectorConfig | ||
} | ||
|
||
loggers = | ||
new LoggerConfig { | ||
level = Level.INFO | ||
handlers = new ConsoleHandlerConfig | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Project properties | ||
#Thu Feb 24 16:45:35 PST 2011 | ||
project.organization=com.twitter | ||
project.name=searchbird | ||
sbt.version=0.7.4 | ||
project.version=1.0.0-SNAPSHOT | ||
build.scala.versions=2.8.1 | ||
project.initialize=false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import sbt._ | ||
import Process._ | ||
import com.twitter.sbt._ | ||
|
||
/** | ||
* Sbt project files are written in a DSL in scala. | ||
* | ||
* The % operator is just turning strings into maven dependency declarations, so lines like | ||
* val example = "com.example" % "exampleland" % "1.0.3" | ||
* mean to add a dependency on exampleland version 1.0.3 from provider "com.example". | ||
*/ | ||
class SearchbirdProject(info: ProjectInfo) extends StandardServiceProject(info) | ||
with CompileThriftScala | ||
with NoisyDependencies | ||
with DefaultRepos | ||
with Tartifactory | ||
with TartifactoryRepos | ||
with SubversionPublisher { | ||
|
||
val twitterInternal = "binaries.local.twitter.com" at "http://binaries.local.twitter.com/maven/" | ||
|
||
val finagleVersion = "1.8.3" | ||
|
||
val finagleC = "com.twitter" % "finagle-core" % finagleVersion | ||
val finagleT = "com.twitter" % "finagle-thrift" % finagleVersion | ||
val finagleO = "com.twitter" % "finagle-ostrich4" % finagleVersion | ||
|
||
// thrift | ||
val libthrift = "thrift" % "libthrift" % "0.5.0" | ||
val util = "com.twitter" % "util" % "1.11.2" | ||
|
||
override def originalThriftNamespaces = Map("Searchbird" -> "com.twitter.searchbird.thrift") | ||
val scalaThriftTargetNamespace = "com.twitter.searchbird" | ||
|
||
val slf4jVersion = "1.5.11" | ||
val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion withSources() intransitive() | ||
val slf4jBindings = "org.slf4j" % "slf4j-jdk14" % slf4jVersion withSources() intransitive() | ||
|
||
// for tests | ||
val specs = "org.scala-tools.testing" % "specs_2.8.1" % "1.6.7" % "test" withSources() | ||
val jmock = "org.jmock" % "jmock" % "2.4.0" % "test" | ||
val hamcrest_all = "org.hamcrest" % "hamcrest-all" % "1.1" % "test" | ||
val cglib = "cglib" % "cglib" % "2.1_3" % "test" | ||
val asm = "asm" % "asm" % "1.5.3" % "test" | ||
val objenesis = "org.objenesis" % "objenesis" % "1.1" % "test" | ||
|
||
override def mainClass = Some("com.twitter.searchbird.Main") | ||
|
||
override def subversionRepository = Some("http://svn.local.twitter.com/maven") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import sbt._ | ||
|
||
class Plugins(info: ProjectInfo) extends PluginDefinition(info) { | ||
override def repositories = Set("twitter.artifactory" at "http://artifactory.local.twitter.com/repo/") | ||
override def ivyRepositories = Seq(Resolver.defaultLocal(None)) ++ repositories | ||
|
||
val defaultProject = "com.twitter" % "standard-project" % "0.11.4" | ||
val sbtThrift = "com.twitter" % "sbt-thrift" % "1.3.4" | ||
} |
Oops, something went wrong.