[SECIOTSRK-663] *Dockerization of services: +add mvn docker:build
authorm.dalakov <m.dalakov@samsung.com>
Fri, 3 Nov 2017 16:52:08 +0000 (18:52 +0200)
committerm.dalakov <m.dalakov@samsung.com>
Fri, 3 Nov 2017 17:15:03 +0000 (19:15 +0200)
36 files changed:
cloud/account/.maven-dockerignore [new file with mode: 0644]
cloud/account/Dockerfile
cloud/account/pom.xml
cloud/interface/.maven-dockerignore [new file with mode: 0644]
cloud/interface/Dockerfile
cloud/interface/pom.xml
cloud/messagequeue/.maven-dockerignore [new file with mode: 0644]
cloud/messagequeue/Dockerfile
cloud/messagequeue/pom.xml
cloud/pom.xml [new file with mode: 0644]
cloud/resourcedirectory/.maven-dockerignore [new file with mode: 0644]
cloud/resourcedirectory/Dockerfile
cloud/resourcedirectory/pom.xml
cloud/stack/pom.xml
servers/alive/.maven-dockerignore [new file with mode: 0644]
servers/alive/configuration/docker/application.properties
servers/alive/pom.xml
servers/docker-compose.yml
servers/dsm/.maven-dockerignore [new file with mode: 0644]
servers/dsm/Dockerfile
servers/dsm/pom.xml
servers/mq/.maven-dockerignore [new file with mode: 0644]
servers/mq/Dockerfile
servers/mq/pom.xml
servers/pom.xml
servers/services/kafka/.maven-dockerignore [new file with mode: 0644]
servers/services/kafka/configuration/win/server.properties [new file with mode: 0644]
servers/services/kafka/pom.xml [new file with mode: 0644]
servers/services/kafka/server.properties
servers/services/mongo/.maven-dockerignore [new file with mode: 0644]
servers/services/mongo/pom.xml [new file with mode: 0644]
servers/services/pom.xml [new file with mode: 0644]
servers/services/postgrees/Dockerfile [deleted file]
servers/services/postgres/.maven-dockerignore [new file with mode: 0644]
servers/services/postgres/Dockerfile [new file with mode: 0644]
servers/services/postgres/pom.xml [new file with mode: 0644]

diff --git a/cloud/account/.maven-dockerignore b/cloud/account/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index eaafaa3..2d993fd 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 ADD ./target/CloudAccount-0.0.1-SNAPSHOT.jar iotivity/AccountServer.jar
 ADD ./target/lib/* iotivity/lib/
@@ -14,6 +14,6 @@ ENV MONGODB_PORT=27017
 ENV DSM_HOST=192.168.99.100
 ENV DSM_PORT=8080
 
-
 EXPOSE 5685
-ENTRYPOINT ["java", "-jar", "AccountServer.jar"]
+
+CMD sleep 5 && java -jar AccountServer.jar
index 0f166ac..c9ea53c 100644 (file)
@@ -1,7 +1,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.iotivity.cloud</groupId>
+
+       <parent>
+               <groupId>org.iotivity.cloud</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.1-SNAPSHOT</version>
+       </parent>
+
        <artifactId>CloudAccount</artifactId>
        <version>0.0.1-SNAPSHOT</version>
 
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>account</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
 
diff --git a/cloud/interface/.maven-dockerignore b/cloud/interface/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index 9926069..f041753 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 ADD ./target/CloudInterface-0.0.1-SNAPSHOT.jar iotivity/CloudInterface.jar
 ADD ./target/lib/* iotivity/lib/
index 3f0f3c5..deb404e 100644 (file)
@@ -1,7 +1,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.iotivity.cloud</groupId>
+
+       <parent>
+               <groupId>org.iotivity.cloud</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.1-SNAPSHOT</version>
+       </parent>
+
        <artifactId>CloudInterface</artifactId>
        <version>0.0.1-SNAPSHOT</version>
 
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>interface</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
 
diff --git a/cloud/messagequeue/.maven-dockerignore b/cloud/messagequeue/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index 2af728a..1fc5175 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 ADD ./target/CloudMessageQueue-0.0.1-SNAPSHOT.jar iotivity/MessageQueue.jar
 ADD ./target/lib/* iotivity/lib/
@@ -13,6 +13,4 @@ ENV KAFKA_PORT 9092
 
 EXPOSE 5686
 
-CMD sleep 10
-
-ENTRYPOINT ["java", "-jar", "MessageQueue.jar"]
\ No newline at end of file
+CMD sleep 10 && java -jar MessageQueue.jar
index e2cac00..d5162c5 100644 (file)
@@ -1,7 +1,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.iotivity.cloud</groupId>
+
+       <parent>
+               <groupId>org.iotivity.cloud</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.1-SNAPSHOT</version>
+       </parent>
+
        <artifactId>CloudMessageQueue</artifactId>
        <version>0.0.1-SNAPSHOT</version>
 
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>messagequeue</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
 
diff --git a/cloud/pom.xml b/cloud/pom.xml
new file mode 100644 (file)
index 0000000..d6bbf44
--- /dev/null
@@ -0,0 +1,75 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.iotivity.cloud</groupId>
+    <artifactId>parent</artifactId>
+    <packaging>pom</packaging>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>Iotivity Parent</name>
+    <description>Iotivity Parent module</description>
+
+    <modules>
+        <module>stack</module>
+        <module>resourceDirectory</module>
+        <module>account</module>
+        <module>interface</module>
+        <module>messageQueue</module>
+    </modules>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <jdk.version>1.8</jdk.version>
+        <jetty-maven-plugin.version>9.2.11.v20150529</jetty-maven-plugin.version>
+        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${maven-compiler-plugin.version}</version>
+                <configuration>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>3.0.0-M1</version>
+                </plugin>
+                <plugin>
+                    <groupId>io.fabric8</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>0.22.1</version>
+                    <configuration>
+                        <useColor>true</useColor>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <distributionManagement>
+        <repository>
+            <uniqueVersion>true</uniqueVersion>
+            <id>releases</id>
+            <url>http://106.125.46.139:8181/nexus/content/repositories/releases/</url>
+        </repository>
+        <snapshotRepository>
+            <id>snapshots</id>
+            <url>http://106.125.46.139:8181/nexus/content/repositories/snapshots/</url>
+        </snapshotRepository>
+    </distributionManagement>
+
+</project>
\ No newline at end of file
diff --git a/cloud/resourcedirectory/.maven-dockerignore b/cloud/resourcedirectory/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index 04d7005..fa5f147 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 ADD ./target/CloudResourceDirectory-0.0.1-SNAPSHOT.jar iotivity/ResourceDirectory.jar
 ADD ./target/lib/* iotivity/lib/
@@ -10,4 +10,5 @@ ENV MONGODB_ADDRESS mongodb
 ENV MONGODB_PORT 27017
 
 EXPOSE 5684
-ENTRYPOINT ["java", "-jar", "ResourceDirectory.jar"]
\ No newline at end of file
+
+CMD sleep 5 && java -jar ResourceDirectory.jar
\ No newline at end of file
index d8f1952..2c0693c 100644 (file)
@@ -1,7 +1,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.iotivity.cloud</groupId>
+
+       <parent>
+               <groupId>org.iotivity.cloud</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.1-SNAPSHOT</version>
+       </parent>
+
        <artifactId>CloudResourceDirectory</artifactId>
        <version>0.0.1-SNAPSHOT</version>
 
                                        <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>resourcedirectory</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
 
index 9cdb5d8..b207625 100644 (file)
@@ -1,7 +1,14 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.iotivity.cloud</groupId>
+
+       <parent>
+               <groupId>org.iotivity.cloud</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.1-SNAPSHOT</version>
+               <relativePath>../pom.xml</relativePath>
+       </parent>
+
        <artifactId>CloudStack</artifactId>
        <version>0.0.1-SNAPSHOT</version>
 
diff --git a/servers/alive/.maven-dockerignore b/servers/alive/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index b70e845..77d22a2 100644 (file)
@@ -3,12 +3,12 @@ server.port=8185
 
 
 # DSM
-dsm.host=http://192.168.99.100:8080/dsm
+dsm.host=http://dsm:8080/dsm
 
 
 #Iotivity Cloud Service
 cloud.service.authprovider=Samsung
-cloud.service.host=coap+tcp://192.168.99.100:5683
+cloud.service.host=coap+tcp://106.125.46.139:5683
 cloud.service.model=SecServerModel
 cloud.service.modelNameKey=dmv
 cloud.service.appName=SecServer
index 06e4a79..6babc6f 100644 (file)
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <configuration>
+                    <images>
+                        <image>
+                            <name>alive</name>
+                            <build>
+                                <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                            </build>
+                        </image>
+                    </images>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
index f2f054f..5ff55f9 100644 (file)
@@ -2,17 +2,16 @@ version: '3.3'
 
 services:
   mongodb:
-    image: mongo
+    image: mongo:3.4
 
   kafka-zookeeper:
-    #image: kafka:2.11-0.9
-    image: kafka
+    image: kafka:2.11-0.9
     ports:
       - "9092:9092"
       - "2181:2181"
 
   db:
-    image: postgres:9.5
+    image: postgres:9.5-alpine
     environment:
       POSTGRES_DB: secDB
       POSTGRES_PASSWORD: postgres
@@ -20,16 +19,16 @@ services:
       - "5432:5432"
 
   iotivity-resourcedirectory:
-    image: sw_resourcedirectory
+    image: resourcedirectory
 
   iotivity-accountserver:
-    image: sw_account
+    image: account
 
   iotivity-messagequeue:
-    image: sw_messagequeue
+    image: messagequeue
                          
   iotivity-interface:
-    image: sw_interface
+    image: interface
     ports:
       - "5683:5683"
 
diff --git a/servers/dsm/.maven-dockerignore b/servers/dsm/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index 295b1f3..3ab9bd7 100644 (file)
@@ -1,4 +1,4 @@
-FROM tomcat:7-jre8
+FROM tomcat:7-jre8-alpine
 
 ADD ./target/dsm.war $CATALINA_HOME/webapps/dsm.war
 
index a94749d..0497880 100644 (file)
                     <sourceMapOutputPath>${basedir}/src/main/webapp/resources/css</sourceMapOutputPath>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <configuration>
+                    <images>
+                        <image>
+                            <name>dsm</name>
+                            <build>
+                                <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                            </build>
+                        </image>
+                    </images>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
diff --git a/servers/mq/.maven-dockerignore b/servers/mq/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
index b47197a..8796fe8 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:8-jre-alpine
 
 ADD ./target/mq-1.0.0-SNAPSHOT.jar servers/mq.jar
 
index 22c6019..544237a 100644 (file)
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <configuration>
+                    <images>
+                        <image>
+                            <name>mq</name>
+                            <build>
+                                <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                            </build>
+                        </image>
+                    </images>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
index 2c82f15..7b21dc4 100644 (file)
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <version>3.0.0-M1</version>
                 </plugin>
+                <plugin>
+                    <groupId>io.fabric8</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>0.22.1</version>
+                    <configuration>
+                        <useColor>true</useColor>
+                    </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>
diff --git a/servers/services/kafka/.maven-dockerignore b/servers/services/kafka/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
diff --git a/servers/services/kafka/configuration/win/server.properties b/servers/services/kafka/configuration/win/server.properties
new file mode 100644 (file)
index 0000000..46de753
--- /dev/null
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# see kafka.server.KafkaConfig for additional details and defaults
+
+############################# Server Basics #############################
+
+# The id of the broker. This must be set to a unique integer for each broker.
+broker.id=0
+
+############################# Socket Server Settings #############################
+
+listeners=PLAINTEXT://:9092
+
+# The port the socket server listens on
+#port=9092
+
+# Hostname the broker will bind to. If not set, the server will bind to all interfaces
+#host.name=localhost
+
+# Hostname the broker will advertise to producers and consumers. If not set, it uses the
+# value for "host.name" if configured.  Otherwise, it will use the value returned from
+# java.net.InetAddress.getCanonicalHostName().
+advertised.host.name=192.168.99.100
+
+# The port to publish to ZooKeeper for clients to use. If this is not set,
+# it will publish the same port that the broker binds to.
+#advertised.port=<port accessible by clients>
+
+# The number of threads handling network requests
+num.network.threads=3
+
+# The number of threads doing disk I/O
+num.io.threads=8
+
+# The send buffer (SO_SNDBUF) used by the socket server
+socket.send.buffer.bytes=102400
+
+# The receive buffer (SO_RCVBUF) used by the socket server
+socket.receive.buffer.bytes=102400
+
+# The maximum size of a request that the socket server will accept (protection against OOM)
+socket.request.max.bytes=104857600
+
+
+############################# Log Basics #############################
+
+# A comma seperated list of directories under which to store log files
+log.dirs=/tmp/kafka-logs
+
+# The default number of log partitions per topic. More partitions allow greater
+# parallelism for consumption, but this will also result in more files across
+# the brokers.
+num.partitions=1
+
+# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
+# This value is recommended to be increased for installations with data dirs located in RAID array.
+num.recovery.threads.per.data.dir=1
+
+############################# Log Flush Policy #############################
+
+# Messages are immediately written to the filesystem but by default we only fsync() to sync
+# the OS cache lazily. The following configurations control the flush of data to disk.
+# There are a few important trade-offs here:
+#    1. Durability: Unflushed data may be lost if you are not using replication.
+#    2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
+#    3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to exceessive seeks.
+# The settings below allow one to configure the flush policy to flush data after a period of time or
+# every N messages (or both). This can be done globally and overridden on a per-topic basis.
+
+# The number of messages to accept before forcing a flush of data to disk
+#log.flush.interval.messages=10000
+
+# The maximum amount of time a message can sit in a log before we force a flush
+#log.flush.interval.ms=1000
+
+############################# Log Retention Policy #############################
+
+# The following configurations control the disposal of log segments. The policy can
+# be set to delete segments after a period of time, or after a given size has accumulated.
+# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
+# from the end of the log.
+
+# The minimum age of a log file to be eligible for deletion
+log.retention.hours=168
+
+# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
+# segments don't drop below log.retention.bytes.
+#log.retention.bytes=1073741824
+
+# The maximum size of a log segment file. When this size is reached a new log segment will be created.
+log.segment.bytes=1073741824
+
+# The interval at which log segments are checked to see if they can be deleted according
+# to the retention policies
+log.retention.check.interval.ms=300000
+
+############################# Zookeeper #############################
+
+# Zookeeper connection string (see zookeeper docs for details).
+# This is a comma separated host:port pairs, each corresponding to a zk
+# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
+# You can also append an optional chroot string to the urls to specify the
+# root directory for all kafka znodes.
+zookeeper.connect=localhost:2181
+
+# Timeout in ms for connecting to zookeeper
+zookeeper.connection.timeout.ms=6000
+
+delete.topic.enable = true
+
+
diff --git a/servers/services/kafka/pom.xml b/servers/services/kafka/pom.xml
new file mode 100644 (file)
index 0000000..97f0ec0
--- /dev/null
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <parent>
+               <groupId>samsung.swsec.services</groupId>
+               <artifactId>parent</artifactId>
+               <version>1.0.0</version>
+       </parent>
+
+       <artifactId>kafka</artifactId>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>kafka:2.11-0.9</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file
index 46de753..8f856a9 100644 (file)
@@ -32,7 +32,7 @@ listeners=PLAINTEXT://:9092
 # Hostname the broker will advertise to producers and consumers. If not set, it uses the
 # value for "host.name" if configured.  Otherwise, it will use the value returned from
 # java.net.InetAddress.getCanonicalHostName().
-advertised.host.name=192.168.99.100
+advertised.host.name=106.125.46.139
 
 # The port to publish to ZooKeeper for clients to use. If this is not set,
 # it will publish the same port that the broker binds to.
diff --git a/servers/services/mongo/.maven-dockerignore b/servers/services/mongo/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
diff --git a/servers/services/mongo/pom.xml b/servers/services/mongo/pom.xml
new file mode 100644 (file)
index 0000000..3ee42f4
--- /dev/null
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <parent>
+               <groupId>samsung.swsec.services</groupId>
+               <artifactId>parent</artifactId>
+               <version>1.0.0</version>
+       </parent>
+
+       <artifactId>mongo</artifactId>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>mongo:3.4</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file
diff --git a/servers/services/pom.xml b/servers/services/pom.xml
new file mode 100644 (file)
index 0000000..99781b9
--- /dev/null
@@ -0,0 +1,41 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                             http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>samsung.swsec.services</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+    <name>Swsec Services</name>
+    <description>Swsec Services module</description>
+
+    <modules>
+        <module>kafka</module>
+        <module>mongo</module>
+        <module>postgres</module>
+    </modules>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>3.0.0-M1</version>
+                </plugin>
+                <plugin>
+                    <groupId>io.fabric8</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>0.22.1</version>
+                    <configuration>
+                        <useColor>true</useColor>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/servers/services/postgrees/Dockerfile b/servers/services/postgrees/Dockerfile
deleted file mode 100644 (file)
index 52be51c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM postgres:9.5
-
-
-
-
-
-
-
-
diff --git a/servers/services/postgres/.maven-dockerignore b/servers/services/postgres/.maven-dockerignore
new file mode 100644 (file)
index 0000000..18bb2a1
--- /dev/null
@@ -0,0 +1 @@
+target/docker/**
\ No newline at end of file
diff --git a/servers/services/postgres/Dockerfile b/servers/services/postgres/Dockerfile
new file mode 100644 (file)
index 0000000..0d1f0da
--- /dev/null
@@ -0,0 +1,10 @@
+FROM postgres:9.5-alpine
+
+
+
+
+
+
+
+
+
diff --git a/servers/services/postgres/pom.xml b/servers/services/postgres/pom.xml
new file mode 100644 (file)
index 0000000..a200272
--- /dev/null
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <parent>
+               <groupId>samsung.swsec.services</groupId>
+               <artifactId>parent</artifactId>
+               <version>1.0.0</version>
+       </parent>
+
+       <artifactId>postgres</artifactId>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>postgres:9.5-alpine</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file