Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Apache Flink pure SQL Cli Image

This docker-compose provides a Flink SQL CLI image updated to the 1.12.0 version. It's inspired by [this](https://github.com/wuchong/flink-sql-demo/tree/v1.11-EN/sql-client).
This docker-compose provides a Flink SQL CLI image updated to the 1.13.2 version. It's inspired by [this](https://github.com/wuchong/flink-sql-demo/tree/v1.11-EN/sql-client).

It makes use of the `flink:1.12.0-scala_2.11` images and of the `ftisiot/flink-sql-client:1.12.0` which is based on the same `flink:1.12.0-scala_2.11` image.
It makes use of the `flink:1.13.2-scala_2.12` images and of the `ftisiot/flink-sql-client:1.13.2` which is based on the same `flink:1.13.2-scala_2.12` image.

The `sql-client` service maps a `~/kafkacerts/` folder to `/certs` which can be used to create and pass files like Keystores when SSL authentication is needed (e.g. with Apache Kafka).

Expand Down Expand Up @@ -43,13 +43,13 @@ To Access the SQL CLI, execute
docker ps
```

And take note of the `CONTAINER_ID` related to the `ftisiot/flink_sql_cli:1.12.0` image (`af00e6ef943f` in the below example)
And take note of the `CONTAINER_ID` related to the `ftisiot/flink_sql_cli:1.13.2` image (`af00e6ef943f` in the below example)

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
af00e6ef943f ftisiot/flink_sql_cli:1.12.0 "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 6123/tcp, 8081/tcp flink_sql-client_1
22a459232385 flink:1.12.0-scala_2.11 "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 6123/tcp, 8081/tcp flink_taskmanager_1
8b4d5c087800 flink:1.12.0-scala_2.11 "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 6123/tcp, 0.0.0.0:8081->8081/tcp flink_jobmanager_1
22a459232385 flink:1.13.2-scala_2.12 "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 6123/tcp, 8081/tcp flink_taskmanager_1
8b4d5c087800 flink:1.13.2-scala_2.12 "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 6123/tcp, 0.0.0.0:8081->8081/tcp flink_jobmanager_1
```

Now execute the following code to enter the docker container in interactive mode
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: "2.2"
services:
sql-client:
image: ftisiot/flink_sql_cli:1.12.0
image: ftisiot/flink_sql_cli:1.13.2
depends_on:
- jobmanager
environment:
FLINK_JOBMANAGER_HOST: jobmanager


jobmanager:
image: flink:1.12.0-scala_2.11
image: flink:1.13.2-scala_2.12
ports:
- "8081:8081"
command: jobmanager
Expand All @@ -21,7 +21,7 @@ services:
- ./data/:/data

taskmanager:
image: flink:1.12.0-scala_2.11
image: flink:1.13.2-scala_2.12
depends_on:
- jobmanager
command: taskmanager
Expand Down
11 changes: 6 additions & 5 deletions sql-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@
#SQL CLI - inspired by https://github.com/wuchong/flink-sql-demo/tree/v1.11-EN/sql-client
###############################################################################

FROM flink:1.12.0-scala_2.11
FROM flink:1.13.2-scala_2.12

# Create CLI lib folder
COPY bin/* /opt/sql-client/
RUN mkdir -p /opt/sql-client/lib

# Download connector libraries
RUN wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-elasticsearch7_2.12/1.12.0/flink-sql-connector-elasticsearch7_2.12-1.12.0.jar; \
wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka_2.11/1.12.0/flink-sql-connector-kafka_2.11-1.12.0.jar; \
wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-connector-jdbc_2.11/1.12.0/flink-connector-jdbc_2.11-1.12.0.jar; \
wget -P /opt/sql-client/lib/ https://jdbc.postgresql.org/download/postgresql-42.2.19.jre6.jar;
RUN wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-elasticsearch7_2.12/1.13.2/flink-sql-connector-elasticsearch7_2.12-1.13.2.jar \
wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka_2.11/1.13.2/flink-sql-connector-kafka_2.11-1.13.2.jar; \
wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-connector-jdbc_2.11/1.13.2/flink-connector-jdbc_2.11-1.13.2.jar; \
wget -P /opt/sql-client/lib/ https://jdbc.postgresql.org/download/postgresql-42.2.19.jre6.jar; \
wget -P /opt/sql-client/lib/ https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-avro-confluent-registry/1.13.2/flink-sql-avro-confluent-registry-1.13.2.jar;

# Copy configuration
COPY conf/* /opt/flink/conf/
Expand Down