Skip to content

Commit

Permalink
feature: update scaleph seatunnel Docker file and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kalencaya committed Jul 10, 2023
1 parent 34851ff commit b8e6b6d
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-flink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ on:
default: '1.16.1'
type: choice
options:
- 1.16.1
- 1.17.0
- 1.16.1
env:
HUB: ghcr.io/flowerfine/scaleph_flink
FLINK_VERSION: ${{ inputs.flinkVersion }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/docker-seatunnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@ on:
default: '2.3.1'
type: choice
options:
- 2.3.2
- 2.3.1
flinkVersion:
description: 'flink version'
required: true
default: '1.15'
type: choice
options:
- 1.15
env:
HUB: ghcr.io/flowerfine/scaleph_seatunnel
HUB: ghcr.io/flowerfine/scaleph-seatunnel
SEATUNNEL_VERSION: ${{ inputs.seatunnelVersion }}
FLINK_VERSION: ${{ inputs.flinkVersion }}

jobs:
build:
Expand Down Expand Up @@ -60,7 +69,7 @@ jobs:
no-cache: false
push: true
context: .
build-args: SEATUNNEL_VERSION=${{ env.SEATUNNEL_VERSION }}
build-args: FLINK_VERSION=${{ env.FLINK_VERSION }}
platforms: linux/amd64,linux/arm64
file: tools/docker/build/seatunnel/Dockerfile
tags: ${{ env.HUB }}:${{ env.SEATUNNEL_VERSION }}
file: tools/docker/build/scaleph-seatunnel/Dockerfile
tags: ${{ env.HUB }}:${{ env.SEATUNNEL_VERSION }}-flink-${{ env.FLINK_VERSION }}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public FlinkDeploymentJob convertTo(WsFlinkKubernetesJobDTO source) {
jobSpec.setEntryClass(flinkArtifactJar.getEntryClass());
jobSpec.setArgs(StringUtils.split(flinkArtifactJar.getJarParams(), " "));
spec.setJob(jobSpec);
FileFetcherFactory.INSTANCE.customize(source, deployment);
}
if (source.getFlinkArtifactSql() != null) {
WsFlinkArtifactSql flinkArtifactSql = source.getFlinkArtifactSql();
Expand All @@ -70,14 +71,13 @@ public FlinkDeploymentJob convertTo(WsFlinkKubernetesJobDTO source) {
if (source.getWsDiJob() != null) {
WsDiJob wsDiJob = source.getWsDiJob();
JobSpec jobSpec = new JobSpec();
jobSpec.setJarURI("local:///opt/seatunnel/starter/seatunnel-flink-starter.jar");
jobSpec.setJarURI(FileFetcherFactory.LOCAL_SCHEMA + "/opt/seatunnel/starter/seatunnel-flink-starter.jar");
jobSpec.setEntryClass("org.apache.seatunnel.core.starter.flink.SeatunnelFlink");
List<String> args = Arrays.asList("--config", "todo config");
jobSpec.setArgs(args.toArray(new String[2]));
spec.setJob(jobSpec);
}
deployment.setSpec(spec);
FileFetcherFactory.INSTANCE.customize(source, deployment);
return deployment;
}

Expand Down
16 changes: 16 additions & 0 deletions tools/docker/build/scaleph-file-fetcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 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 eclipse-temurin:11-focal as release

ENV MINIO_ENDPOINT=http://minio:9000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BASE_IMAGE=ghcr.io/flowerfine/scaleph_flink:1.16.1_2.12
ARG FLINK_VERSION=1.17

FROM $BASE_IMAGE
FROM flink:${FLINK_VERSION}

ARG SEATUNNEL_VERSION
ARG TAR_FILE=apache-seatunnel-incubating-${SEATUNNEL_VERSION}-bin.tar.gz
ENV SEATUNNEL_VERSION=2.3.1
ENV SEATUNNEL_HOME = /opt/seatunnel

RUN mkdir -p $SEATUNNEL_HOME

ENV SEATUNNEL_HOME /opt/seatunnel
ARG TAR_FILE=apache-seatunnel-incubating-${SEATUNNEL_VERSION}-bin.tar.gz

# download from seatunnel release page
RUN mkdir -p $SEATUNNEL_HOME ; cd $SEATUNNEL_HOME ; \
Expand Down
16 changes: 16 additions & 0 deletions tools/docker/build/scaleph-sql-template/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 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.

ARG FLINK_VERSION=1.17

FROM flink:${FLINK_VERSION}
Expand Down

0 comments on commit b8e6b6d

Please sign in to comment.