From 450f7d85687b2aeb6b2eb2434f4da5b473bbcb45 Mon Sep 17 00:00:00 2001 From: Steve King Date: Fri, 10 Mar 2017 15:11:45 -0800 Subject: [PATCH 1/3] WIP: Docker stuff --- build.sbt | 22 ++++++++++++++++++++++ project/plugins.sbt | 1 + 2 files changed, 23 insertions(+) create mode 100644 project/plugins.sbt diff --git a/build.sbt b/build.sbt index b85eeb6..716fdf9 100644 --- a/build.sbt +++ b/build.sbt @@ -5,6 +5,8 @@ version := "1.1.2" scalaVersion := "2.11.8" +enablePlugins(JavaAppPackaging, DockerPlugin) + resolvers += "Sonatype Releases" at "https://oss.sonatype.org/service/repositories/releases/" resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/" @@ -15,3 +17,23 @@ libraryDependencies ++= Seq( "com.github.kliewkliew" %% "salad" % "0.11.01", "org.slf4j" % "slf4j-log4j12" % "1.7.22" ) + +// ------------------------------------------------ // +// ------------- Docker configuration ------------- // +// ------------------------------------------------ // + +javaOptions in Universal ++= Seq( + "-Dconfig.file=etc/container.conf" +) + +packageName in Docker := packageName.value + +version in Docker := version.value + +dockerBaseImage := "openjdk" + +dockerRepository := Some("gcr.io/adenda-server-mongodb") + +defaultLinuxInstallLocation in Docker := "/usr/local" + +daemonUser in Docker := "root" \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..b674c64 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.0.4") \ No newline at end of file From 70077e20d0cac698abf9cbc050a2fb82b71b226f Mon Sep 17 00:00:00 2001 From: Steve King Date: Mon, 24 Apr 2017 10:48:01 -0700 Subject: [PATCH 2/3] Update salad version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 716fdf9..0c8df42 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ libraryDependencies ++= Seq( "biz.paluch.redis" % "lettuce" % "5.0.0.Beta1", "org.scala-lang.modules" % "scala-java8-compat_2.11" % "0.8.0", "com.typesafe.akka" %% "akka-stream-kafka" % "0.11-RC1", - "com.github.kliewkliew" %% "salad" % "0.11.01", + "com.github.kliewkliew" %% "salad" % "0.11.04", "org.slf4j" % "slf4j-log4j12" % "1.7.22" ) From b66fe124baf983c4c46205b307f3a64cec189fde Mon Sep 17 00:00:00 2001 From: Steve King Date: Mon, 24 Apr 2017 11:36:52 -0700 Subject: [PATCH 3/3] DEBUG: redis seed why no work? --- build.sbt | 3 ++- .../com/github/kliewkliew/cornucopia/redis/Connection.scala | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 0c8df42..f6f7eae 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,8 @@ name := "cornucopia" organization := "com.github.kliewkliew" -version := "1.1.2" +//version := "1.1.2" +version := "0.3-SNAPSHOT" scalaVersion := "2.11.8" diff --git a/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala b/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala index 0c089db..71ca46f 100644 --- a/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala +++ b/src/main/scala/com/github/kliewkliew/cornucopia/redis/Connection.scala @@ -20,6 +20,8 @@ object Connection { private val redisClusterPort = redisClusterConfig.getInt("seed.server.port") private val nodes = List(RedisURI.create(redisClusterSeedServer, redisClusterPort)) + LoggerFactory.getLogger(this.getClass).debug(s"Cluster seed server: '${nodes}'") + /** * Create a new API connection - new connections are necessary to refresh the view of the cluster topology * after adding or removing a node.