Seatunnel-2.3.3 自打包 docker部署(含web)

前言

此篇重点是,自己将源码编译后,将打包文件部署在docker里(也可以直接用官网的)

如果也有人是希望,将自己打包的源码部署了,可以参考可乐的这篇文章,这篇文章详细介绍了2.3.3的serve和web的源码启动流程

Apache Seatunnel本地源码构建编译运行调试

前期准备

  1. docker环境
  2. seatunnel-2.3.3  二进制执行文件(apache-seatunnel-2.3.4-bin.tar.gz解压后的文件)
  3. seatunnel-web-1.0.0 二进制可执行文件
  4. cp /opt/seatunnel/apache-seatunnel-2.3.3/config/hazelcast-client.yaml /opt/seatunnel/apache-seatunnel-web-1.0.0-bin/conf/

4的命令不用执行,只要是给大家一个参考,记得吧hazelcast-client.yaml文件覆盖到二进制里面去,同时hazelcast-client.yaml的内容改一下,主要把127或者localhost改为本机宿主机ip

提示:  这里我就默认大家,已经解决了所有,可乐文章里的疑难杂症,也就是说,

源码是可以添加数据源,可以添加任务执行单表操作的。

如果!!! 不能保障!!!请先看可乐文章后,再阅读本篇,不然的话,真的会很痛苦,要不断编译,不断部署!!!

文件目录介绍

--docer-compose.yml

--seatunnel

        --Dockerfile

        --Dockerfile_web

        --apache-seatunnel-2.3.3

        --apache-seatunnel-web-1.0.0

文件内容

docker-compose.yml

version: '3'
services:
  seatunnel-serve:
    build:
        context: ./seatunnel/
        dockerfile: Dockerfile
    container_name: seatunnel_serve
    ports:
      - 5801:5801
    command: nohup sh bin/seatunnel-cluster.sh 2>&1 &
    volumes:
      - ./seatunnel/apache-seatunnel-2.3.3/:/opt/seatunnel/
    restart: always
    networks:
      - app
  seatunnel-web:
    build:
        context: ./seatunnel/
        dockerfile: Dockerfile_web
    volumes:
      - ./seatunnel/apache-seatunnel-web-1.0.0/:/opt/seatunnel_web/
    container_name: seatunnel_web
    entrypoint: /opt/seatunnel_web/bin/chmod-daemon.sh
    ports:
      - 8801:8801
    restart: always
    networks:
      - app
volumes:
  data:
networks:
  app:
    external: true

Dockerfile

这个其实也可以不用,但是有个小瑕疵没解决,先预留

#
# 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 openjdk:8
ENV SEATUNNEL_HOME="/opt/seatunnel"
RUN  mkdir -p SEATUNNEL_HOME/logs
WORKDIR /opt/seatunnel



Dockerfile_web

#
# 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 openjdk:8
user root
ENV SEATUNNEL_HOME="/opt/seatunnel_web"
COPY ./apache-seatunnel-web-1.0.0/ ${SEATUNNEL_HOME}/
RUN  mkdir -p SEATUNNEL_HOME/logs
RUN chmod +x /opt/seatunnel_web/bin/seatunnel-backend-daemon.sh
RUN chmod +x /opt/seatunnel_web/bin/chmod-daemon.sh
WORKDIR /opt/seatunnel_web
#CMD ["chmod"," +x", "bin/seatunnel-backend-daemon.sh"]
#CMD ["sh", "/opt/seatunnel_web/bin/seatunnel-backend-daemon.sh", "start"]

CMD ["tail"," -f", "nohup.out"]




chmod-daemon.sh

这里有个小瑕疵

 sh /opt/seatunnel_web/bin/seatunnel-backend-daemon.sh start权限问题一直没有解决

所以我在seatunnel-backend-daemon.sh打了echo,把参数都打印出来了,打印出来后直接贴到了这里,这个后期我解决了,我会上报解决方案

注意!!!chmod-daemon.sh会存在sh文件格式的问题

映射进去的时候可能是CRLF的格式,linux识别不来,所以在docker-compose里的entrypoint查找文件的时候,会报no such file or directory

注意文件格式是LF还是CRLF

LF   linux

CRLF  window

#!/bin/sh

#
# 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.
#
#echo test111111111
chmod 777 /opt/seatunnel_web/bin/seatunnel-backend-daemon.sh
echo 111111111111111111111111123

/usr/local/openjdk-8/bin/java -server -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof -Dseatunnel-web.logs.path=/opt/seatunnel_web/bin/../logs -cp /opt/seatunnel_web/bin/../conf:/opt/seatunnel_web/bin/../libs/*:/opt/seatunnel_web/bin/../datasource/* -Dspring.config.name=application.yml -Dspring.config.location=classpath:application.yml org.apache.seatunnel.app.SeatunnelApplication
# sh /opt/seatunnel_web/bin/seatunnel-backend-daemon.sh start

还有一种解决方案(这是可乐提供的解决方案,不过没有测试,先贴在这里)

sh 如果是在windows下直接打开复制过去的,会有让shell文件的格式有问题,镜像运行的时候报初始化脚本\r问题,所以需要在wsl进入centOs子系统中执行如下:
sed -i ‘s/\r$//’ filename
将xxxx.sh格式转为linux下的格式

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/580458.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【数据结构6--图】

目录 1 图2 图的定义和基本概念(在简单图范围内)3 图的类型定义4 图的存储结构4.1 邻接矩阵 表示法4.2 邻接表 表示法4.3 十字链表 表示法4.4 邻接多重表 表示法 5 图的遍历5.1 深度优先搜索-DFS 及 广度优先遍历-BFS 6 图的应用6.1 最小生成树6.1.1 克鲁…

2726641 - Failed to resolve Object Based Navigation target

服务和支持/知识库文章和注释/人事管理/人员发展/目标设置和评估 (PA-PD-PM) 2726641 - 未能解析基于对象的导航目标 SAP Knowledge Base Article, Version: 1, 审批日期: 30.11.2018 组件PA-PD-PM对象状态 优先级正常对象状态 类别问题对象状态 审批状态已发布至客户对象…

Window + Ubuntu 双系统无Ubuntu Bios 启动项

文章目录 安装硬盘位置不重要!!!(但是我安装在了第二张HDD)问题是多盘分位置会导致磁盘主分区变成了简单卷 Bios Ubuntu 启动项修复参考Ubuntu安装U盘进入Try Ubuntu 使用Terminal修复完提示Disable Secure Boot进入Te…

minikube 环境搭建

minikube安装 # 查看linux 架构模式x86_64、arm64 uname -m # Intel x86_64 curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64# Apple arm64 curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/min…

利用ENVI SPEAR工具和WV-2卫星影像数据量测水深

ENVI的SPEAR工具集((Spectral Processing Exploitation and Analysis Resource))是将很多的遥感图像处理过程集成为流程化的操作方式,使得遥感图像处理知识相对薄弱的非专业人员也能利用流程化的工具进行图像处理,图像处理速度也有…

虚拟DOM

虚拟DOM(Virtual DOM)是现代前端框架(如React、Vue等)用于优化DOM操作性能的关键技术。Vue也采用了虚拟DOM来提高性能和提供更好的开发体验。以下是虚拟DOM在Vue中的详细解释: 什么是虚拟DOM? 虚拟DOM是一…

【经典算法】LeetCode104二叉树的最大深度(Java/C/Python3实现含注释说明,Easy)

目录 题目描述思路及实现方式一:递归思路代码实现Java版本C语言版本Python3版本Go语言版本 复杂度分析 方式二:广度优先搜索(BFS)思路代码实现Java版本C语言版本Python3版本 复杂度分析 总结相似题目 标签(题目类型):树、深度优先搜索(DFS)、…

使用iar embedded workbench编译器打开CC2640R2代码工程

使用iar embedded workbench编译器打开CC2640R2代码工程 首先安装CC2640R2的SDK包 目前使用的SDK版本是 simplelink_cc2640r2_sdk_4_20_00_04 在德州仪器(TI)官网下载 https://www.ti.com.cn/product/cn/CC2640R2F-Q1 下载后需要对SDK进行安装,安装很方便&#…

Java中的Set集合和Hash值和TreeSet的使用

Set集合的特点 不包含重复元素的集合 没有带索引的方法,所以不能使用普通for循环遍历 HashSet对集合的迭代顺序不作任何保证 Set集合的遍历 有两种方式遍历一种是迭代器一种是增强for package dayhou40.day49; ​ import java.util.HashSet; import java.util…

C语言程序设计基础(跟知乎学)

1、C语言是一种结构化程序设计语言。三种基本结构:顺序、选择、循环。 2、在C语言中,程序的模块化是利用函数实现的。 3、计算机不能直接理解高级语言,只能直接理解机器语言,所以必须要把高级语言翻译成机器语言,计算机…

C++ | Leetcode C++题解之第51题N皇后

题目&#xff1a; 题解&#xff1a; class Solution { public:vector<vector<string>> solveNQueens(int n) {auto solutions vector<vector<string>>();auto queens vector<int>(n, -1);auto columns unordered_set<int>();auto diag…

Error: The project seems to require yarn but it‘s not installed.

在使用yarn serve启动vue2项目是发生报错信息 报错信息&#xff1a; 解决方法&#xff1a; 1、 红色箭头行&#xff0c;ctrl单击 进入env.js文件 2、注释行 if (result && !exports.hasYarn()) throw new Error(The project seems to require yarn but its not ins…

Oracle VM virtual Box 安装虚拟机并网络连接宿主机且能ping通外网

新建虚拟机 参考镜像下载连接&#xff1a;支持centos7.8及其以上版本&#xff1a;​ ​http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1908.iosOracle VM virtual Box新建虚拟机&#xff0c;按照下图所示新建虚拟机&#xff1a; 1.新建虚拟机 2.配…

IDEA安装插件Apipost方便调试

进入IDEA的File->sttings->plugins 进入搜索Apipost即可安装插件 使用小箭头即可得到URL&#xff0c;点击进入操作即可

C# Onnx yolov8 pig detection

C# Onnx yolov8 pig detection 目录 效果 项目 模型 代码 数据集 下载 效果 项目 模型 Model Properties ------------------------- date&#xff1a;2024-04-28T15:13:10.750689 description&#xff1a;Ultralytics YOLOv8n model trained on C:\Work\yolov8\datas…

深入探索计算机视觉:高级主题与前沿应用的全面解析

引言 计算机视觉&#xff0c;作为人工智能领域的一个重要分支&#xff0c;旨在让计算机能够“看”懂世界&#xff0c;理解和解释视觉场景。随着深度学习技术的迅猛发展&#xff0c;计算机视觉已经在许多领域取得了显著的进展&#xff0c;如自动驾驶、安防监控、医疗诊断等。在…

NodeJs[黑马笔记简洁版]

是什么 怎么用 模块 模块化标准 CommonJs(标准语法)默认 ECMAscript 内置模块 fs模块 path模块 http模块 自定义模块 第三方包 包概念 npm 包管理器 总结

正点原子[第二期]ARM(I.MX6U)裸机篇学习笔记-1.2

前言&#xff1a; 本文是来自哔哩哔哩网站上视频“正点原子[第二期]Linux之ARM&#xff08;MX6U&#xff09;裸机篇”的学习笔记&#xff0c;在这里会记录下正点原子Linux ARM MX6ULL 开发板根据配套的哔哩哔哩学习视频所作的实验和笔记内容。本文大量的引用了正点原子哔哔哩网…

【C++】二叉树的进阶

二叉树的进阶 二叉搜索树概念操作实现创建树形结构拷贝构造函数构造函数析构函数赋值运算符重载循环版本查找插入删除 递归版本查找插入删除 应用K模型KV模型性能分析 二叉树进阶面试题二叉树创建字符串二叉树的分层遍历I最近公共祖先二叉搜索树与双向链表前序遍历与中序遍历构…

数据结构:实验八:数据排序

一、 实验目的 &#xff08;1&#xff09;掌握各种排序算法的过程和算法设计。 &#xff08;2&#xff09;体会各种排序算法的性能。 二、 实验要求 编写程序分别采用直接插入排序算法 、折半插入排序算法、冒泡排序算法、快速排序算法&#xff0c;实现对任意一组整型数据…
最新文章