This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/knxnet-ip
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/knxnet-ip by this push:
new 9a9b27f - Made the streampipes modules be repackaged by springboot -
Made the streampipes modules be built with Docker
9a9b27f is described below
commit 9a9b27f866c7c2a76af8cd38d54c5e9d904fe345
Author: Christofer Dutz <[email protected]>
AuthorDate: Tue Dec 10 23:01:04 2019 +0100
- Made the streampipes modules be repackaged by springboot
- Made the streampipes modules be built with Docker
---
sandbox/test-streampipes-plc4x-adapters/Dockerfile | 24 +++++++++++++
sandbox/test-streampipes-plc4x-adapters/pom.xml | 39 ++++++++++++++++++++++
.../adapters/source/bacnetip/BacNetIpAdapter.java | 17 ----------
.../test-streampipes-plc4x-processors/Dockerfile | 24 +++++++++++++
sandbox/test-streampipes-plc4x-processors/pom.xml | 39 ++++++++++++++++++++++
5 files changed, 126 insertions(+), 17 deletions(-)
diff --git a/sandbox/test-streampipes-plc4x-adapters/Dockerfile
b/sandbox/test-streampipes-plc4x-adapters/Dockerfile
new file mode 100644
index 0000000..2a70d90
--- /dev/null
+++ b/sandbox/test-streampipes-plc4x-adapters/Dockerfile
@@ -0,0 +1,24 @@
+# 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.
+
+FROM adoptopenjdk/openjdk8-openj9:alpine-slim
+
+EXPOSE 8090
+ENV CONSUL_LOCATION consul
+
+ARG JAR_FILE
+ADD ./target/${JAR_FILE} /streampipes-processing-element-container.jar
+
+ENTRYPOINT ["java", "-jar", "/streampipes-processing-element-container.jar"]
diff --git a/sandbox/test-streampipes-plc4x-adapters/pom.xml
b/sandbox/test-streampipes-plc4x-adapters/pom.xml
index f9a03a8..6faa56c 100644
--- a/sandbox/test-streampipes-plc4x-adapters/pom.xml
+++ b/sandbox/test-streampipes-plc4x-adapters/pom.xml
@@ -36,6 +36,45 @@
<streampipes.version>0.65.0</streampipes.version>
</properties>
+ <build>
+ <plugins>
+ <!-- Repackage the project as SpringBoot application -->
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Build the Docker image -->
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>1.4.13</version>
+ <executions>
+ <execution>
+ <id>default</id>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repository>apache/plc4x-streampipes-adapters</repository>
+ <tag>${project.version}</tag>
+ <buildArgs>
+ <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>
diff --git
a/sandbox/test-streampipes-plc4x-adapters/src/main/java/org/apache/plc4x/java/streampipes/adapters/source/bacnetip/BacNetIpAdapter.java
b/sandbox/test-streampipes-plc4x-adapters/src/main/java/org/apache/plc4x/java/streampipes/adapters/source/bacnetip/BacNetIpAdapter.java
index 6d8e39f..d3011a6 100644
---
a/sandbox/test-streampipes-plc4x-adapters/src/main/java/org/apache/plc4x/java/streampipes/adapters/source/bacnetip/BacNetIpAdapter.java
+++
b/sandbox/test-streampipes-plc4x-adapters/src/main/java/org/apache/plc4x/java/streampipes/adapters/source/bacnetip/BacNetIpAdapter.java
@@ -29,7 +29,6 @@ import
org.apache.plc4x.java.base.connection.NettyPlcConnection;
import org.apache.plc4x.java.base.connection.PcapChannelFactory;
import org.apache.plc4x.java.base.connection.RawSocketChannelFactory;
import org.apache.plc4x.java.base.messages.PlcRequestContainer;
-import org.apache.plc4x.java.streampipes.adapters.config.ConnectWorkerConfig;
import org.apache.plc4x.java.utils.pcapsockets.netty.PcapSocketAddress;
import org.apache.plc4x.java.utils.pcapsockets.netty.PcapSocketChannelConfig;
import org.pcap4j.core.*;
@@ -40,8 +39,6 @@ import
org.streampipes.connect.adapter.exception.AdapterException;
import org.streampipes.connect.adapter.exception.ParseException;
import
org.streampipes.connect.adapter.model.specific.SpecificDataStreamAdapter;
import org.streampipes.connect.adapter.sdk.ParameterExtractor;
-import org.streampipes.connect.container.worker.init.AdapterWorkerContainer;
-import org.streampipes.connect.init.AdapterDeclarerSingleton;
import org.streampipes.model.AdapterType;
import org.streampipes.model.connect.adapter.SpecificAdapterStreamDescription;
import org.streampipes.model.connect.guess.GuessSchema;
@@ -394,18 +391,4 @@ public class BacNetIpAdapter extends
SpecificDataStreamAdapter {
return ID;
}
- public static class BacNetIpAdapterInit extends AdapterWorkerContainer {
- public static void main(String[] args) {
- AdapterDeclarerSingleton
- .getInstance()
- .add(new BacNetIpAdapter());
-
- String workerUrl =
ConnectWorkerConfig.INSTANCE.getConnectContainerWorkerUrl();
- String masterUrl =
ConnectWorkerConfig.INSTANCE.getConnectContainerMasterUrl();
- Integer workerPort =
ConnectWorkerConfig.INSTANCE.getConnectContainerWorkerPort();
-
- new BacNetIpAdapterInit().init(workerUrl, masterUrl, workerPort);
- }
- }
-
}
diff --git a/sandbox/test-streampipes-plc4x-processors/Dockerfile
b/sandbox/test-streampipes-plc4x-processors/Dockerfile
new file mode 100644
index 0000000..2a70d90
--- /dev/null
+++ b/sandbox/test-streampipes-plc4x-processors/Dockerfile
@@ -0,0 +1,24 @@
+# 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.
+
+FROM adoptopenjdk/openjdk8-openj9:alpine-slim
+
+EXPOSE 8090
+ENV CONSUL_LOCATION consul
+
+ARG JAR_FILE
+ADD ./target/${JAR_FILE} /streampipes-processing-element-container.jar
+
+ENTRYPOINT ["java", "-jar", "/streampipes-processing-element-container.jar"]
diff --git a/sandbox/test-streampipes-plc4x-processors/pom.xml
b/sandbox/test-streampipes-plc4x-processors/pom.xml
index 8bf5c52..6f0e083 100644
--- a/sandbox/test-streampipes-plc4x-processors/pom.xml
+++ b/sandbox/test-streampipes-plc4x-processors/pom.xml
@@ -35,6 +35,45 @@
<streampipes.version>0.65.0</streampipes.version>
</properties>
+ <build>
+ <plugins>
+ <!-- Repackage the project as SpringBoot application -->
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Build the Docker image -->
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>1.4.13</version>
+ <executions>
+ <execution>
+ <id>default</id>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repository>apache/plc4x-streampipes-processors</repository>
+ <tag>${project.version}</tag>
+ <buildArgs>
+ <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
+ </buildArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>