You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2018/04/05 05:49:39 UTC

[1/5] incubator-s2graph git commit: add extra env option for docker build

Repository: incubator-s2graph
Updated Branches:
  refs/heads/master 5a0e4d835 -> c64094f00


add extra env option for docker build


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/5a0a2d6c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/5a0a2d6c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/5a0a2d6c

Branch: refs/heads/master
Commit: 5a0a2d6c41292e18e67c98a1dd53c373b6101044
Parents: 3332f6b
Author: Chul Kang <el...@apache.org>
Authored: Tue Apr 3 15:05:40 2018 +0900
Committer: Chul Kang <el...@apache.org>
Committed: Tue Apr 3 15:05:40 2018 +0900

----------------------------------------------------------------------
 build.sbt           | 36 ++++++++++++++++++++++++++++++++++++
 project/plugins.sbt |  2 ++
 2 files changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/5a0a2d6c/build.sbt
----------------------------------------------------------------------
diff --git a/build.sbt b/build.sbt
index af6fbd7..9e3b84f 100755
--- a/build.sbt
+++ b/build.sbt
@@ -43,14 +43,20 @@ lazy val s2rest_play = project.enablePlugins(PlayScala).disablePlugins(PlayLogba
   .dependsOn(s2core, s2counter_core)
   .settings(commonSettings: _*)
   .settings(testOptions in Test += Tests.Argument("sequential"))
+  .settings(dockerSettings: _*)
+  .enablePlugins(sbtdocker.DockerPlugin, JavaAppPackaging)
 
 lazy val s2rest_netty = project
   .dependsOn(s2core)
   .settings(commonSettings: _*)
+  .settings(dockerSettings: _*)
+  .enablePlugins(sbtdocker.DockerPlugin, JavaAppPackaging)
 
 lazy val s2graphql = project
   .dependsOn(s2core)
   .settings(commonSettings: _*)
+  .settings(dockerSettings: _*)
+  .enablePlugins(sbtdocker.DockerPlugin, JavaAppPackaging)
 
 lazy val s2core = project.settings(commonSettings: _*)
 
@@ -76,6 +82,36 @@ lazy val root = (project in file("."))
   .dependsOn(s2rest_play, s2rest_netty, s2jobs, s2counter_loader, s2graphql) // this enables packaging on the root project
   .settings(commonSettings: _*)
 
+lazy val dockerSettings = Seq(
+  dockerfile in docker := {
+    val appDir: File = stage.value
+    val targetDir = s"/u/apps/${name.value}"
+
+    new Dockerfile {
+      from("java:8")
+      entryPoint(s"$targetDir/bin/${executableScriptName.value}")
+      env("EXTRA_JARS", "")
+      env("ZONEINFO", "Asia/Seoul")
+      copy(appDir, targetDir)
+      workDir(targetDir)
+      expose(9000)
+    }
+  },
+  bashScriptExtraDefines ++= Seq(
+    s"""cp $$EXTRA_JARS/* /u/apps/${name.value}/lib""",
+    "ln -sf /usr/share/zoneinfo/$ZONEINFO /etc/localtime; date"
+  ),
+  scriptClasspath += "*",
+  imageNames in docker := Seq(
+    ImageName(s"s2graph/${name.value}:${version.value}")
+  ),
+  buildOptions in docker := BuildOptions(
+    cache = false,
+    removeIntermediateContainers = BuildOptions.Remove.Always,
+    pullBaseImage = BuildOptions.Pull.Always
+  )
+)
+
 lazy val runRatTask = inputKey[Unit]("Runs Apache rat on S2Graph")
 
 runRatTask := {

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/5a0a2d6c/project/plugins.sbt
----------------------------------------------------------------------
diff --git a/project/plugins.sbt b/project/plugins.sbt
index c5a079f..dda878d 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -35,5 +35,7 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
 
 addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
 
+addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.4.1")
+
 resolvers += Resolver.typesafeRepo("releases")
 


[5/5] incubator-s2graph git commit: [S2GRAPH-200]: docker image could not include extra jars

Posted by st...@apache.org.
[S2GRAPH-200]: docker image could not include extra jars

JIRA:
    [S2GRAPH-200] https://issues.apache.org/jira/browse/S2GRAPH-200

Pull Request:
    Closes #152

Author
    Chul Kang <el...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/c64094f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/c64094f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/c64094f0

Branch: refs/heads/master
Commit: c64094f004149144bf3ff71025f6b7f415a3931f
Parents: 1b7cb79
Author: DO YUNG YOON <st...@apache.org>
Authored: Thu Apr 5 14:47:10 2018 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Thu Apr 5 14:47:10 2018 +0900

----------------------------------------------------------------------
 CHANGES | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/c64094f0/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 775ccfa..0c1f75a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -66,6 +66,7 @@ Release Notes - S2Graph - Version 0.2.0
     * [S2GRAPH-170] - Create Interface for S2Edge/S2Vertex/S2Graph.
     * [S2GRAPH-182] - Version up spark dependencies.
     * [S2GRAPH-198] - Skip json Decode error and continue.
+    * [S2GRAPH-200] - docker image could not include extra jars.
 
 ** New Feature
     * [S2GRAPH-123] - Support different index on out/in direction.


[2/5] incubator-s2graph git commit: modify readme

Posted by st...@apache.org.
modify readme


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/1b9200cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/1b9200cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/1b9200cb

Branch: refs/heads/master
Commit: 1b9200cb23eccd149d2a87ce870063dcbc6d40a4
Parents: 5a0a2d6
Author: Chul Kang <el...@apache.org>
Authored: Tue Apr 3 19:15:32 2018 +0900
Committer: Chul Kang <el...@apache.org>
Committed: Tue Apr 3 19:15:32 2018 +0900

----------------------------------------------------------------------
 dev_support/README.md | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1b9200cb/dev_support/README.md
----------------------------------------------------------------------
diff --git a/dev_support/README.md b/dev_support/README.md
index 2da1b55..9c274e9 100644
--- a/dev_support/README.md
+++ b/dev_support/README.md
@@ -22,8 +22,25 @@
 # Run S2Graph using Docker
 
 1. Build a docker image of the s2graph in the project's root directory
-	- `sbt "project s2rest_play" 'set version := "latest"' docker:publishLocal`
+	- you can build images for each type of API Server
+	    ```
+	    // s2graphql
+	    sbt "project s2graphql" 'set version := "latest"' docker
+	    
+	    // s2rest_play
+	    sbt "project s2rest_play" 'set version := "latest"' docker
+	    
+	    // s2rest_netty
+	    sbt "project s2rest_netty" 'set version := "latest"' docker
+	    ```
+	    
 	- find local image is created correctly by using `docker images`
+	
+	- (optional) If you need to add extra jars in classpath, use environment variable 'EXTRA_JARS'
+	    ```
+        docker run --name s2graph -v /LocalJarsDir:/extraJars -e EXTRA_JARS=/extraJars -dit s2graph/s2graphql:latest ...
+        ```
+	
 2. Run MySQL and HBase container first.
 	- change directory to dev-support. `cd dev_support`
 	- `docker-compose build` 


[3/5] incubator-s2graph git commit: remove duplicate plugin

Posted by st...@apache.org.
remove duplicate plugin


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/1857c580
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/1857c580
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/1857c580

Branch: refs/heads/master
Commit: 1857c5800d5f80fdd304c0ea58dc60d299b5b170
Parents: 1b9200c
Author: Chul Kang <el...@apache.org>
Authored: Tue Apr 3 19:17:16 2018 +0900
Committer: Chul Kang <el...@apache.org>
Committed: Tue Apr 3 19:17:16 2018 +0900

----------------------------------------------------------------------
 s2rest_netty/build.sbt | 2 --
 s2rest_play/build.sbt  | 2 --
 2 files changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1857c580/s2rest_netty/build.sbt
----------------------------------------------------------------------
diff --git a/s2rest_netty/build.sbt b/s2rest_netty/build.sbt
index 975ced5..eb547c1 100644
--- a/s2rest_netty/build.sbt
+++ b/s2rest_netty/build.sbt
@@ -20,8 +20,6 @@ import Common._
 
 name := "s2rest_netty"
 
-enablePlugins(JavaAppPackaging)
-
 libraryDependencies ++= Seq(
   "com.google.guava" % "guava" % "12.0.1" force(), // use this old version of guava to avoid incompatibility
   "io.netty" % "netty-all" % "4.0.33.Final"

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1857c580/s2rest_play/build.sbt
----------------------------------------------------------------------
diff --git a/s2rest_play/build.sbt b/s2rest_play/build.sbt
index 436295c..70e71dd 100644
--- a/s2rest_play/build.sbt
+++ b/s2rest_play/build.sbt
@@ -29,5 +29,3 @@ libraryDependencies ++= Seq(ws, filters, specs2 % Test).map(_.excludeLogging())
 )
 
 routesGenerator := StaticRoutesGenerator
-
-enablePlugins(JavaServerAppPackaging)


[4/5] incubator-s2graph git commit: Merge branch 'S2GRAPH-200' of https://github.com/elric-k/incubator-s2graph into elric-k-S2GRAPH-200

Posted by st...@apache.org.
Merge branch 'S2GRAPH-200' of https://github.com/elric-k/incubator-s2graph into elric-k-S2GRAPH-200


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/1b7cb79f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/1b7cb79f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/1b7cb79f

Branch: refs/heads/master
Commit: 1b7cb79fc2183bd7a21a89cd52caf3a577b531f6
Parents: 5a0e4d8 1857c58
Author: DO YUNG YOON <st...@apache.org>
Authored: Thu Apr 5 14:44:54 2018 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Thu Apr 5 14:44:54 2018 +0900

----------------------------------------------------------------------
 build.sbt              | 36 ++++++++++++++++++++++++++++++++++++
 dev_support/README.md  | 19 ++++++++++++++++++-
 project/plugins.sbt    |  2 ++
 s2rest_netty/build.sbt |  2 --
 s2rest_play/build.sbt  |  2 --
 5 files changed, 56 insertions(+), 5 deletions(-)
----------------------------------------------------------------------