Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merge] Add canvas job define and job run #71

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dfa56fd
[Feat][UI] Add component of dynamic form in this project.
songjianet May 5, 2023
0ad077f
[Feat][UI] Add chinese locale in the project.
songjianet May 8, 2023
dc4704f
[Fix][UI] Fix the problem that the fillet is reset after refreshing.
songjianet May 9, 2023
2ab3b95
[Feat][UI] Add 401 support.
songjianet May 9, 2023
bc6d4af
[Sync] Sync main branch to add_canvas_job_define branch (#52)
EricJoy2048 May 10, 2023
fa2e333
[Feature][DynamicForm] Add seatunnel dynamicform module (#49)
EricJoy2048 May 10, 2023
4dee2fa
[Improve][Pom] use revision (#53)
EricJoy2048 May 10, 2023
4398dc8
add datasource module (#54)
EricJoy2048 May 15, 2023
e0b6e75
Add datasource config switcher (#55)
EricJoy2048 May 16, 2023
21a195c
[Improve][code style] Add spotless plugin to seatunnel web (#56)
EricJoy2048 May 16, 2023
4cb709a
[Improve][checkstyle] remove maven checkstyle plugin from pom (#58)
EricJoy2048 May 17, 2023
15a7bde
[Feature][datasource] Add datasource api (#57)
xiaoqigh May 23, 2023
f6fa010
[Feat][UI] Add datasource in this project.
songjianet May 25, 2023
153e7b4
[Feat][UI] Add virtual table function.
songjianet Jun 7, 2023
374c400
[Feature][API] Add Job Defile API (#59)
xiaoqigh Jun 14, 2023
f4217f8
improve the logging framework (#61)
EricJoy2048 Jun 20, 2023
9e9f154
[Feat] Adding the sync task (#63)
zhuchaoling Jun 30, 2023
f039833
[MODIFY][SYNC TASK DEFINITION] Add synchronization task definition mo…
zhangchengming601 Jun 30, 2023
3dd1233
fix: file not found (#60)
zhuchaoling Jul 10, 2023
681b004
[ADD][FUNCTION]Add synchronization task instance function (#65)
zhangchengming601 Jul 12, 2023
470b03e
Feat/sync task (#64)
zhuchaoling Jul 12, 2023
c809783
[ADD][FUNCTION]Add synchronization task instance function (#66)
zhangchengming601 Jul 12, 2023
3bfcdad
fix: build error (#67)
zhuchaoling Jul 13, 2023
5970c19
[ADD][Switcher]Add SqlServerDataSourceConfigSwitcher And MysqlDatasou…
zhangchengming601 Jul 13, 2023
28c18f2
Fix: login redirect path (#68)
zhuchaoling Jul 13, 2023
4863633
Add canvas job define (#70)
zhangchengming601 Jul 17, 2023
8238ce2
Merge main to add_canvas (#73)
zhuchaoling Jul 17, 2023
718e575
Fix confix (#74)
EricJoy2048 Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Check code style
run: ./mvnw --batch-mode --quiet --no-snapshot-updates clean checkstyle:check
run: ./mvnw --batch-mode --quiet --no-snapshot-updates clean spotless:check

dead-link:
if: github.repository == 'apache/incubator-seatunnel-web'
Expand Down Expand Up @@ -125,7 +131,7 @@ jobs:
cache: 'maven'
- name: Install
run: >-
./mvnw -B -q install -DskipTests
./mvnw -B -q install -DskipTests -P release
-D"maven.test.skip"=true
-D"maven.javadoc.skip"=true
-D"checkstyle.skip"=true
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ test.conf
spark-warehouse
*.flattened-pom.xml
/seatunnel-ui/package-lock.json
/seatunnel-ui/node
/seatunnel-ui/node/*
/seatunnel-ui/node_modules
/seatunnel-ui/node_modules/*
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ header:
- '**/.gitkeep'
- '**/com/typesafe/config/**'
- 'seatunnel-main-repository/**'
- 'seatunnel-web-dist/release-docs/**'

comment: on-failure
160 changes: 99 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Apache SeaTunnel (Incubating)
# Apache SeaTunnel

<img src="https://seatunnel.apache.org/image/logo.png" alt="seatunnel logo" height="200px" align="right" />

Expand All @@ -21,90 +21,128 @@ Click it if your want to know more about our design. 👉🏻[Design](https://gi

## How to start

First, we need clone this project from Github.
### 1 Preparing the Apache DolphinScheduler environment

```shell
git clone https://github.com/apache/incubator-seatunnel-web.git
```
#### 1.1 Install Apache DolphinScheduler

If you already have Apache DolphinScheduler environment, you can skip this step and go to [Create Tenant and User for SeaTunnel Web](#1.2 Create Tenant and User for SeaTunnel Web)

Because running SeaTunnel Web must rely on the DolphinScheduler, if you do not have a DS environment, you need to first install and deploy a DolphinScheduler (hereinafter referred to as DS). Taking DS version 3.1.5 as an example.

Reference `https://dolphinscheduler.apache.org/zh-cn/docs/3.1.5/guide/installation/standalone` to install a standalone DS.

#### 1.2 Create Tenant and User for SeaTunnel Web

If you already have a DS environment and decide to use existing users and tenants for SeaTunnel Web, you can skip this step and go to [Create Project for SeaTunnel Web](#1.3 Create Project for SeaTunnel Web).

Because SeaTunnel Web needs to call the interface of DS to create workflows and tasks, it is necessary to submit the projects, users, and tenants created in DS for SeaTunnel to use.

1. Create Tenant

"Security" -> "Tenant Manage" -> "Create Tenant"

![image](docs/images/ds_create_tenant.png)

2. For simplicity, use the default user admin of DS directly here

#### 1.3 Create Project for SeaTunnel Web

![image](docs/images/ds_create_project.png)

#### 1.4 Create Token for SeaTunnel Web

![image](docs/images/ds_create_token.png)

### 2 Run SeaTunnel Web in IDEA

If you want to deploy and run SeaTunnel Web, Please turn to [3 Run SeaTunnel Web In Server](#3 Run SeaTunnel Web In Server)

#### 2.1 Init database

1. Edit `whaletunnel-server/whaletunnel-app/src/main/resources/script/seatunnel_server_env.sh` file, Complete the installed database address, port, username, and password. Here is an example:

```
export HOSTNAME="localhost"
export PORT="3306"
export USERNAME="root"
export PASSWORD="123456"
```
2. Run init shell `sh seatunnel-server/seatunnel-app/src/main/resources/script/init_sql.sh` If there are no errors during operation, it indicates successful initialization.

#### 2.2 Config application and Run SeaTunnel Web Backend Server

1. Edit `seatunnel-server/seatunnel-app/src/main/resources/application.yml` Fill in the database connection information and DS interface related information in the file.

![image](docs/images/application_config.png)

2. Run `seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/SeatunnelApplication.java` If there are no errors reported, the seatunnel web backend service is successfully started.

#### 2.3 Run SeaTunnel Web Front End

Then, setup up configuration of db and more.
```shell
vim seatunnel-server/seatunnel-app/src/main/resources/application.yml
```
cd seatunnel-ui
npm install
npm run dev

Notice:
At present, we only support the following scheduler systems: dolphinscheduler, more scheduler systems will be supported in the future;
And for easier use, we plan to build our own scheduling system in Seatunnel.

Here is a sample parameter configuration for Seatunnel integration dolphinscheduler:
```yaml
ds:
script:
# The path where the script is stored
dir: /dj
project:
# The default project name of dolphinscheduler
default: test_dj
tenant:
# Which tenant been used to submit script
default: default
api:
# The dolphinscheduler user token
token: 12345678
# The dolphinscheduler api prefix address
prefix: http://127.0.0.1:12345/dolphinscheduler
```

Now comes the crucial part, this is about your account security, please modify the Jwt secret key and algorithm.
If there are no issues with the operation, the following information will be displayed:

```yaml
jwt:
expireTime: 86400
secretKey: https://github.com/apache/incubator-seatunnel
algorithm: HS256
```
➜ Local: http://127.0.0.1:5173/
➜ Network: use --host to expose
➜ press h to show help


Next, execute sql to create table .(Your must create database first by yourself)
```shell
# Replace `username` & `dbName` with the real username and database name.
# We will provided script in future.
mysql -u username -p [dbName] < bin/seatunnl.sql
```

Now, you've done all the preparatory work, launch our app.
Accessing in a browser http://127.0.0.1:5173/login Okay, the default username and password are admin/admin.

### Launch it in IntelliJ IDEA
### 3 Run SeaTunnel Web In Server

Starting the back end of St in idea is really simple, just run the main method of `SeatunnelApplication.java` in the `seatunnel-app` module.
And the log will tell u anything you need to know.
#### 3.1 Build Install Package From Code

### Start it in the command line
```
cd incubator-seatunnel-web
sh build.sh code
```

```shell
# start backend
Then you can find the installer package in dir `incubator-seatunnel-web/seatunnel-web-dist/target/apache-seatunnel-web-${project.version}.tar.gz`.

# for build code
sh build.sh code
#### 3.2 Install

# for build image
sh build.sh image

# and then start docker container
docker run apache/seatunnel-web
Copy the `apache-seatunnel-web-${project.version}.tar.gz` to your server node and unzip it.

```shell
tar -zxvf apache-seatunnel-web-${project.version}.tar.gz
```

### start frontend
You can use a Web server such as Apache HTTP Server or Nginx to start front-end applications. Deploy the built front-end code to the root directory of the Web server, start the Web server, and enter the URL of the Web server in a browser to access the application.
#### 3.3 Init database

1. Edit `apache-seatunnel-web-${project.version}/script/seatunnel_server_env.sh` file, Complete the installed database address, port, username, and password. Here is an example:

```
export HOSTNAME="localhost"
export PORT="3306"
export USERNAME="root"
export PASSWORD="123456"
```
2. Run init shell `sh apache-seatunnel-web-${project.version}/script/init_sql.sh` If there are no errors during operation, it indicates successful initialization.

#### 3.4 Config application and Run SeaTunnel Web Backend Server

Edit `apache-seatunnel-web-${project.version}/config/application.yml` Fill in the database connection information and DS interface related information in the file.

![image](docs/images/application_config.png)

#### 3.5 Start SeaTunnel Web

If you want start in dev mode:
```shell
cd seatunnel-ui
npm install
npm run dev
cd apache-seatunnel-web-${project.version}
sh bin/seatunnel-backend-daemon.sh start
```

Accessing in a browser http://127.0.0.1:8801/ui/ Okay, the default username and password are admin/admin.

### How to use it

After all the pre-work is done, we can open the following URL: 127.0.0.1:7890(please replace it according to your configuration) to use it.
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DOCKER_VERSION=1.0.0-snapshot
code() {
/bin/sh $WORKDIR/mvnw clean package -DskipTests
# mv release zip
mv $WORKDIR/seatunnel-server/seatunnel-app/target/seatunnel-web.zip $WORKDIR/
mv $WORKDIR/seatunnel-web-dist/target/apache-seatunnel-web-1.0.0-SNAPSHOT.zip $WORKDIR/
}

# build image
Expand Down
Binary file added docs/images/application_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ds_create_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ds_create_tenant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ds_create_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ds_create_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading