Skip to content

Commit 4732ca7

Browse files
committed
Configure Minio/S3
1 parent eb44d7a commit 4732ca7

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ services:
2020
build: ./data-image
2121
command: "java -classpath /opt/data/data-producer.jar com.ververica.sql_training.data_producer.TaxiRecordProducer --input file /opt/data --output kafka kafka:9092 --speedup 10.0"
2222
jobmanager:
23-
image: flink:1.10.0-scala_2.11
23+
image: fhueske/flink-s3:1.10.0-scala_2.11
24+
build: ./flink-image
2425
hostname: "jobmanager"
2526
expose:
2627
- "6123"
@@ -30,7 +31,8 @@ services:
3031
environment:
3132
- JOB_MANAGER_RPC_ADDRESS=jobmanager
3233
taskmanager:
33-
image: flink:1.10.0-scala_2.11
34+
image: fhueske/flink-s3:1.10.0-scala_2.11
35+
build: ./flink-image
3436
expose:
3537
- "6121"
3638
- "6122"
@@ -48,7 +50,8 @@ services:
4850
- "9083"
4951
minio:
5052
image: minio/minio:latest
51-
command: server /data
53+
entrypoint: sh
54+
command: -c 'mkdir -p /data/sql-demo && /usr/bin/minio server /data'
5255
environment:
5356
- MINIO_ACCESS_KEY=sql-demo
5457
- MINIO_SECRET_KEY=demo-sql

flink-image/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
###############################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
###############################################################################
18+
19+
###############################################################################
20+
# Build Flink images with configured S3 plugin
21+
###############################################################################
22+
23+
FROM flink:1.10.0-scala_2.11
24+
25+
RUN mkdir /opt/flink/plugins/s3; \
26+
mv /opt/flink/opt/flink-s3-fs-hadoop-1.10.0.jar /opt/flink/plugins/s3; \
27+
echo "s3.access-key: sql-demo" >> /opt/flink/conf/flink-conf.yaml; \
28+
echo "s3.secret-key: demo-sql" >> /opt/flink/conf/flink-conf.yaml; \
29+
echo "fs.s3a.access.key: sql-demo" >> /opt/flink/conf/flink-conf.yaml; \
30+
echo "fs.s3a.secret.key: demo-sql" >> /opt/flink/conf/flink-conf.yaml; \
31+
echo "fs.s3a.endpoint: http://minio:9000" >> /opt/flink/conf/flink-conf.yaml; \
32+
echo "fs.s3a.path.style.access: true" >> /opt/flink/conf/flink-conf.yaml;

0 commit comments

Comments
 (0)