This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 16f3517 Include pulsar python client dependencies in pulsar image
(#2491)
16f3517 is described below
commit 16f3517b9d02fee072fa07f987bb150eb3efd92f
Author: Sijie Guo <[email protected]>
AuthorDate: Sun Sep 2 12:19:36 2018 -0700
Include pulsar python client dependencies in pulsar image (#2491)
---
docker/pulsar/Dockerfile | 6 ++-
docker/pulsar/pom.xml | 44 ++++++++++++++++++++++
.../pulsar}/scripts/install-pulsar-client.sh | 0
.../docker-images/latest-version-image/Dockerfile | 8 +---
tests/docker-images/latest-version-image/pom.xml | 44 ----------------------
5 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/docker/pulsar/Dockerfile b/docker/pulsar/Dockerfile
index 508b4f3..f4f93c1 100644
--- a/docker/pulsar/Dockerfile
+++ b/docker/pulsar/Dockerfile
@@ -20,7 +20,7 @@
FROM openjdk:8-jdk
# Install some utilities
-RUN apt-get update && apt-get install -y netcat dnsutils python-kazoo
python-yaml
+RUN apt-get update && apt-get install -y netcat dnsutils python-kazoo
python-yaml python-pip
ARG PULSAR_TARBALL
@@ -32,6 +32,10 @@ COPY scripts/gen-yml-from-env.py /pulsar/bin
COPY scripts/generate-zookeeper-config.sh /pulsar/bin
COPY scripts/pulsar-zookeeper-ruok.sh /pulsar/bin
COPY scripts/watch-znode.py /pulsar/bin
+COPY scripts/install-pulsar-client.sh /pulsar/bin
+
+ADD target/python-client/ /pulsar/pulsar-client
+RUN /pulsar/bin/install-pulsar-client.sh
WORKDIR /pulsar
diff --git a/docker/pulsar/pom.xml b/docker/pulsar/pom.xml
index f798c9a..d7a94c6 100644
--- a/docker/pulsar/pom.xml
+++ b/docker/pulsar/pom.xml
@@ -47,6 +47,50 @@
<id>docker</id>
<build>
<plugins>
+ <!-- build cpp client, copy the wheel file and then build docker
image -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>${exec-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>build-pulsar-clients</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <skip>${skipBuildPythonClient}</skip>
+
<workingDirectory>${project.basedir}/target</workingDirectory>
+
<executable>${project.basedir}/../../pulsar-client-cpp/docker/build-wheels.sh</executable>
+ <arguments>
+ <!-- build python 2.7 -->
+ <argument>2.7 cp27-cp27mu</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <skip>${skipBuildPythonClient}</skip>
+ <tasks>
+ <echo>copy python wheel file</echo>
+ <mkdir dir="${basedir}/target/python-client"/>
+ <copydir
src="${basedir}/../../pulsar-client-cpp/python/wheelhouse"
dest="${basedir}/target/python-client"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
diff --git
a/tests/docker-images/latest-version-image/scripts/install-pulsar-client.sh
b/docker/pulsar/scripts/install-pulsar-client.sh
similarity index 100%
rename from
tests/docker-images/latest-version-image/scripts/install-pulsar-client.sh
rename to docker/pulsar/scripts/install-pulsar-client.sh
diff --git a/tests/docker-images/latest-version-image/Dockerfile
b/tests/docker-images/latest-version-image/Dockerfile
index 9c93de9..862b53c 100644
--- a/tests/docker-images/latest-version-image/Dockerfile
+++ b/tests/docker-images/latest-version-image/Dockerfile
@@ -19,7 +19,7 @@
FROM apachepulsar/pulsar-all:latest
-RUN apt-get update && apt-get install -y supervisor python-pip
+RUN apt-get update && apt-get install -y supervisor
RUN mkdir -p /var/log/pulsar && mkdir -p /var/run/supervisor/ && mkdir -p
/pulsar/ssl
@@ -32,8 +32,4 @@ COPY ssl/ca.cert.pem ssl/broker.key-pk8.pem
ssl/broker.cert.pem \
COPY scripts/init-cluster.sh scripts/run-global-zk.sh scripts/run-local-zk.sh \
scripts/run-bookie.sh scripts/run-broker.sh
scripts/run-functions-worker.sh scripts/run-proxy.sh \
- scripts/install-pulsar-client.sh /pulsar/bin/
-
-ADD target/python-client/ /pulsar/pulsar-client
-RUN /pulsar/bin/install-pulsar-client.sh
-
+ /pulsar/bin/
diff --git a/tests/docker-images/latest-version-image/pom.xml
b/tests/docker-images/latest-version-image/pom.xml
index 8e47055..78a12e2 100644
--- a/tests/docker-images/latest-version-image/pom.xml
+++ b/tests/docker-images/latest-version-image/pom.xml
@@ -48,52 +48,8 @@
</dependency>
</dependencies>
<build>
- <!-- build cpp client, copy the wheel file and then build docker image
-->
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>${exec-maven-plugin.version}</version>
- <executions>
- <execution>
- <id>build-pulsar-clients</id>
- <phase>compile</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <skip>${skipBuildPythonClient}</skip>
-
<workingDirectory>${project.basedir}/target</workingDirectory>
-
<executable>${project.basedir}/../../../pulsar-client-cpp/docker/build-wheels.sh</executable>
- <arguments>
- <!-- build python 2.7 -->
- <argument>2.7 cp27-cp27mu</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <skip>${skipBuildPythonClient}</skip>
- <tasks>
- <echo>copy python wheel file</echo>
- <mkdir dir="${basedir}/target/python-client"/>
- <copydir
src="${basedir}/../../../pulsar-client-cpp/python/wheelhouse"
dest="${basedir}/target/python-client"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven.version}</version>