Skip to content
Permalink
Browse files
[release-3.0] Updating all examples for 3.0 release
  • Loading branch information
tzulitai committed Apr 9, 2021
1 parent e619c37 commit ebbf53e9bdc0809dd4533c54096ea7dc2db8fb80
Showing 20 changed files with 22 additions and 52 deletions.
@@ -22,11 +22,11 @@ under the License.

<groupId>org.apache.flink</groupId>
<artifactId>aws-lambda-example</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0.0</version>
<packaging>jar</packaging>

<properties>
<statefun.version>3.0-SNAPSHOT</statefun.version>
<statefun.version>3.0.0</statefun.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
@@ -17,15 +17,6 @@
FROM maven:3.6.3-jdk-11 AS builder
COPY src /usr/src/app/src
COPY pom.xml /usr/src/app
# TODO remove these commented lines and the jar; this is needed now only because we don't have the latest Java SDK published to Maven central yet
COPY statefun-sdk-java-3.0-SNAPSHOT.jar /usr/src/app
RUN mvn install:install-file \
-Dfile=/usr/src/app/statefun-sdk-java-3.0-SNAPSHOT.jar \
-DgroupId=org.apache.flink \
-DartifactId=statefun-sdk-java \
-Dversion=3.0-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
RUN mvn -f /usr/src/app/pom.xml clean package

# ... and run the web server!
@@ -35,7 +35,7 @@ services:
###############################################################

statefun-manager:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0-java11
expose:
- "6123"
ports:
@@ -47,7 +47,7 @@ services:
- ./module.yaml:/opt/statefun/modules/greeter/module.yaml

statefun-worker:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0-java11
expose:
- "6121"
- "6122"
@@ -22,11 +22,11 @@ under the License.

<groupId>org.apache.flink</groupId>
<artifactId>greeter-functions-app</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0.0</version>
<packaging>jar</packaging>

<properties>
<statefun.version>3.0-SNAPSHOT</statefun.version>
<statefun.version>3.0.0</statefun.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
Binary file not shown.
@@ -15,15 +15,6 @@

# Build the functions code ...
FROM maven:3.6.3-jdk-11 AS builder
# TODO remove these commented lines and the jar; this is needed now only because we don't have the latest Java SDK published to Maven central yet
COPY statefun-sdk-java-3.0-SNAPSHOT.jar /usr/src/app/
RUN mvn install:install-file \
-Dfile=/usr/src/app/statefun-sdk-java-3.0-SNAPSHOT.jar \
-DgroupId=org.apache.flink \
-DartifactId=statefun-sdk-java \
-Dversion=3.0-SNAPSHOT \
-Dpackaging=jar \
-DgeneratePom=true
COPY pom.xml /usr/src/app/
# Build dependencies and cache this layer
RUN mvn -f /usr/src/app dependency:go-offline package -B
@@ -35,4 +26,4 @@ FROM openjdk:8
WORKDIR /
COPY --from=builder /usr/src/app/target/shopping-cart*jar-with-dependencies.jar shopping-cart.jar
EXPOSE 1108
CMD java -jar shopping-cart.jar
CMD java -jar shopping-cart.jar
@@ -35,7 +35,7 @@ services:
###############################################################

statefun-manager:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6123"
ports:
@@ -47,7 +47,7 @@ services:
- ./module.yaml:/opt/statefun/modules/shopping-cart/module.yaml

statefun-worker:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6121"
- "6122"
@@ -22,11 +22,11 @@ under the License.

<artifactId>shopping-cart</artifactId>
<groupId>org.apache.flink</groupId>
<version>3.0-SNAPSHOT</version>
<version>3.0.0</version>
<packaging>jar</packaging>

<properties>
<statefun.version>3.0-SNAPSHOT</statefun.version>
<statefun.version>3.0.0</statefun.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<untertow.version>1.4.18.Final</untertow.version>
Binary file not shown.
@@ -22,11 +22,11 @@ under the License.

<groupId>org.apache.flink</groupId>
<artifactId>statefun-java-showcase</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0.0</version>
<packaging>jar</packaging>

<properties>
<statefun.version>3.0-SNAPSHOT</statefun.version>
<statefun.version>3.0.0</statefun.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
@@ -86,7 +86,7 @@ private static KafkaContainer kafkaContainer(Network network) {
}

private static GenericContainer<?> managerContainer(Network network) {
return new GenericContainer<>(DockerImageName.parse("flink-statefun:3.0-SNAPSHOT"))
return new GenericContainer<>(DockerImageName.parse("apache/flink-statefun:3.0.0"))
.withNetwork(network)
.withNetworkAliases("statefun-manager")
.withEnv("ROLE", "master")
@@ -98,7 +98,7 @@ private static GenericContainer<?> managerContainer(Network network) {
}

private static GenericContainer<?> workerContainer(Network network) {
return new GenericContainer<>(DockerImageName.parse("flink-statefun:3.0-SNAPSHOT"))
return new GenericContainer<>(DockerImageName.parse("apache/flink-statefun:3.0.0"))
.withNetwork(network)
.withNetworkAliases("statefun-worker")
.withEnv("ROLE", "worker")
@@ -26,9 +26,5 @@ COPY functions.py /app

EXPOSE 8000

# TODO: remove the following 2 lines, once apache_filink_statefun-3.0.0 will be released.
ADD lib-dev/apache_flink_statefun-3.0_SNAPSHOT-py3-none-any.whl /app
RUN pip3 install /app/apache_flink_statefun-3.0_SNAPSHOT-py3-none-any.whl

CMD ["python3", "/app/functions.py"]

@@ -34,7 +34,7 @@ services:
###############################################################

statefun-manager:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6123"
ports:
@@ -46,7 +46,7 @@ services:
- ./module.yaml:/opt/statefun/modules/greeter/module.yaml

statefun-worker:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6121"
- "6122"

This file was deleted.

Binary file not shown.
@@ -15,4 +15,4 @@
# limitations under the License.

aiohttp
apache-flink-statefun
apache-flink-statefun==3.0.0
@@ -24,7 +24,7 @@ services:
###############################################################

statefun-manager:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6123"
ports:
@@ -36,7 +36,7 @@ services:
- ./module.yaml:/opt/statefun/modules/greeter/module.yaml

statefun-worker:
image: flink-statefun:3.0-SNAPSHOT
image: apache/flink-statefun:3.0.0
expose:
- "6121"
- "6122"

This file was deleted.

Binary file not shown.
@@ -27,7 +27,7 @@

setup(
name='showcase',
version='2.3-SNAPSHOT',
version='3.0.0',
packages=["showcase"],
url='https://github.com/apache/flink-statefun-playground',
license='https://www.apache.org/licenses/LICENSE-2.0',
@@ -38,7 +38,7 @@
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=['protobuf>=3.11.3,<4.0.0',
'apache-flink-statefun',
'apache-flink-statefun==3.0.0',
'aiohttp'],
tests_require=['pytest'],
python_requires='>=3.8',

0 comments on commit ebbf53e

Please sign in to comment.