[SECIOTSRK-696] Dockerization dev-manager
authorm.dalakov <m.dalakov@samsung.com>
Fri, 17 Nov 2017 18:45:27 +0000 (20:45 +0200)
committerm.dalakov <m.dalakov@samsung.com>
Fri, 17 Nov 2017 18:45:27 +0000 (20:45 +0200)
servers/services/dev-manager/.devices [new file with mode: 0644]
servers/services/dev-manager/.maven-dockerignore [new file with mode: 0644]
servers/services/dev-manager/Dockerfile [new file with mode: 0644]
servers/services/dev-manager/pom.xml [new file with mode: 0644]
servers/services/pom.xml

diff --git a/servers/services/dev-manager/.devices b/servers/services/dev-manager/.devices
new file mode 100644 (file)
index 0000000..816c46d
--- /dev/null
@@ -0,0 +1,7 @@
+1,"Tv 5500","model3.4","tv","hub"
+2,"Air Conditioner","hd 3300","airconditioner","standard"
+3,"Cool phone","Tizen Z3","phone","standard"
+4,"iRobot","T 1000","robotcleaner","primitive"
+5,"Washing machine","WM10","washer","primitive"
+6,"Kitchen plug","220v","smartplug","primitive"
+7,"Fridge","Ice T","refrigerator","standard"
diff --git a/servers/services/dev-manager/.maven-dockerignore b/servers/services/dev-manager/.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/dev-manager/Dockerfile b/servers/services/dev-manager/Dockerfile
new file mode 100644 (file)
index 0000000..a0122a5
--- /dev/null
@@ -0,0 +1,12 @@
+FROM ubuntu:16.04
+
+ADD ./target/dev-manager-1.0.zip /usr/lib/
+ADD ./.devices /usr/lib/
+
+WORKDIR /usr/lib/
+
+RUN mv ./dev-manager/** ./
+RUN chmod a+x ./dev-manager.sh
+RUN chmod a+x ./dev-all.sh
+RUN chmod a+x ./nmdaemon
+RUN chmod a+x ./utest
diff --git a/servers/services/dev-manager/pom.xml b/servers/services/dev-manager/pom.xml
new file mode 100644 (file)
index 0000000..b707195
--- /dev/null
@@ -0,0 +1,66 @@
+<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>
+
+    <repositories>
+        <repository>
+            <id>nexus</id>
+            <name>nexus</name>
+            <url>http://106.125.46.139:8181/nexus/content/groups/public/</url>
+        </repository>
+    </repositories>
+
+       <parent>
+               <groupId>samsung.swsec.services</groupId>
+               <artifactId>parent</artifactId>
+               <version>1.0.0</version>
+       </parent>
+
+       <artifactId>dev-manager</artifactId>
+
+       <dependencies>
+               <dependency>
+                       <groupId>iotswsec</groupId>
+                       <artifactId>dev-manager</artifactId>
+                       <version>1.0</version>
+                       <type>zip</type>
+               </dependency>
+       </dependencies>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <version>2.8</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-dependencies</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>copy-dependencies</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${project.build.directory}</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <images>
+                                               <image>
+                                                       <name>dev-manager:1.0</name>
+                                                       <build>
+                                                               <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file
index 99781b9..0edafad 100644 (file)
@@ -16,6 +16,7 @@
         <module>kafka</module>
         <module>mongo</module>
         <module>postgres</module>
+        <module>dev-manager</module>
     </modules>
 
     <build>