RATIS-468. Create a tarball assembly for logservice
authorJosh Elser <elserj@apache.org>
Mon, 24 Dec 2018 04:16:42 +0000 (23:16 -0500)
committerJosh Elser <elserj@apache.org>
Thu, 3 Jan 2019 20:01:46 +0000 (15:01 -0500)
Signed-off-by: Rajeshbabu Chintaguntla <rajeshbabu@apache.org>
ratis-logservice/README.md
ratis-logservice/pom.xml
ratis-logservice/src/assembly/assembly.xml [new file with mode: 0644]

index 1827594..190f478 100644 (file)
@@ -43,7 +43,21 @@ and the Metadata quorum will choose three of them to form a RAFT quorum to "host
 
 Note: the `q` option here references to the Metadata quorum, not the worker quorum as is the case for the Metadata daemons.
 
-Launch client:
+Then, the LogService interactive shell can be used to interact with the software:
+```bash
+$ mvn exec:java -Dexec.mainClass=org.apache.ratis.logservice.shell.LogServiceShell -Dexec.args="-q localhost:9991,localhost:9992,localhost:9993"
+```
+
+## Docker
+
+Similarly, a full quorum can be started by building a docker container and then start the docker-compose cluster:
+```bash
+$ cd ratis-logservice && mvn package assembly:single -DskipTests
+$ docker build -t ratis-logservice --build-arg BINARY=target/ratis-logservice-0.4.0-SNAPSHOT-bin.tar.gz --build-arg VERSION=0.4.0-SNAPSHOT .
+$ docker-compose up
+```
+
+Then, a client container can be launched to connect to the cluster:
 ```bash
 $ mvn exec:java -Dexec.mainClass=org.apache.ratis.logservice.shell.LogServiceShell -Dexec.args="-q localhost:9990,localhost:9991,localhost:9992"
 ```
index a06218b..f180024 100644 (file)
         <artifactId>maven-source-plugin</artifactId>
       </plugin>
       <plugin>
-        <!--Make it so assembly:single does nothing in here-->
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
-          <skipAssembly>true</skipAssembly>
+          <skipAssembly>false</skipAssembly>
+          <tarLongFileMode>gnu</tarLongFileMode>
+          <descriptors>
+            <descriptor>src/assembly/assembly.xml</descriptor>
+          </descriptors>
         </configuration>
       </plugin>
       <plugin>
diff --git a/ratis-logservice/src/assembly/assembly.xml b/ratis-logservice/src/assembly/assembly.xml
new file mode 100644 (file)
index 0000000..77d1f94
--- /dev/null
@@ -0,0 +1,16 @@
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+  </formats>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>*:*</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+</assembly>