close
Skip to content

Commit c60d5dd

Browse files
author
Klesh Wong
committed
feat: docker/docker-compose/documentation for temporal mode
1 parent 92d7d2d commit c60d5dd

2 files changed

Lines changed: 131 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,37 @@ To synchronize data periodically, we provide [`lake-cli`](./cmd/lake-cli/README.
245245
<br>
246246

247247

248+
## Temporal Mode
249+
250+
Normally, DevLake would execute pipelines on local machine (we call it `local mode`), it is sufficient most of the time.However, when you have too many pipelines that need to be executed in parallel, it can be problematic, either limited by the horsepower or throughput of a single machine.
251+
252+
`temporal mode` was added to support distributed pipeline execution, you can fire up arbitrary workers on multiple machines to carry out those pipelines in parallel without hitting the single machine limitation.
253+
254+
But, be careful, many API services like JIRA/GITHUB have request rate limit mechanism, collect data in parallel against same API service with same identity would most likely hit the wall.
255+
256+
### How it works
257+
258+
1. DevLake Server and Workers connect to the same temporal server by setting up `TEMPORAL_URL`
259+
2. DevLake Server sends `pipeline` to temporal server, and one of the Workers would pick it up and execute
260+
261+
262+
**IMPORTANT: This feature is in early stage of development, use with cautious**
263+
264+
265+
### Temporal Demo
266+
267+
#### Requirements
268+
269+
- [Docker](https://docs.docker.com/get-docker)
270+
- [docker-compose](https://docs.docker.com/compose/install/)
271+
- [temporalio](https://github.com/merico-dev/lake/pull/1559)
272+
273+
#### How to setup
274+
275+
1. Clone and fire up [temporalio](https://github.com/merico-dev/lake/pull/1559) services
276+
2. Clone this repo, and fire up DevLake with command `docker-compose -f docker-compose-temporal.yml up -d`
277+
278+
248279
## Project Roadmap
249280
- <a href="https://github.com/merico-dev/lake/wiki/Roadmap-2022" target="_blank">Roadmap 2022</a>: Detailed project roadmaps for 2022.
250281
- DevLake already supported following data sources:

‎docker-compose-temporal.yml‎

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
version: "3"
2+
services:
3+
mysql:
4+
image: mysql:8.0.26
5+
platform: linux/x86_64
6+
volumes:
7+
- mysql-storage:/var/lib/mysql
8+
restart: always
9+
ports:
10+
- 127.0.0.1:3306:3306
11+
environment:
12+
MYSQL_ROOT_PASSWORD: admin
13+
MYSQL_DATABASE: lake
14+
MYSQL_USER: merico
15+
MYSQL_PASSWORD: merico
16+
17+
grafana:
18+
image: mericodev/grafana:latest
19+
build:
20+
context: grafana/
21+
ports:
22+
- 3002:3000
23+
volumes:
24+
- grafana-storage:/var/lib/grafana
25+
environment:
26+
GF_USERS_ALLOW_SIGN_UP: 'false'
27+
GF_DASHBOARDS_JSON_ENABLED: 'true'
28+
GF_INSTALL_PLUGINS: grafana-piechart-panel
29+
GF_LIVE_ALLOWED_ORIGINS: '*'
30+
MYSQL_URL: mysql:3306
31+
MYSQL_DATABASE: lake
32+
MYSQL_USER: merico
33+
MYSQL_PASSWORD: merico
34+
restart: always
35+
depends_on:
36+
- mysql
37+
38+
devlake:
39+
image: mericodev/lake:latest
40+
build:
41+
context: "."
42+
args:
43+
HTTPS_PROXY: "${HTTPS_PROXY}"
44+
GOPROXY: "${GOPROXY}"
45+
ports:
46+
- 127.0.0.1:8080:8080
47+
restart: always
48+
volumes:
49+
- ./.env:/app/.env
50+
depends_on:
51+
- mysql
52+
networks:
53+
- default
54+
- temporal-network
55+
environment:
56+
- TEMPORAL_URL=temporal:7233
57+
58+
devlake-worker:
59+
image: mericodev/lake:latest
60+
build:
61+
context: "."
62+
args:
63+
HTTPS_PROXY: "${HTTPS_PROXY}"
64+
GOPROXY: "${GOPROXY}"
65+
restart: always
66+
volumes:
67+
- ./.env:/app/.env
68+
depends_on:
69+
- mysql
70+
command: lake-worker
71+
networks:
72+
- default
73+
- temporal-network
74+
environment:
75+
- TEMPORAL_URL=temporal:7233
76+
77+
config-ui:
78+
image: mericodev/config-ui:latest
79+
build:
80+
context: "config-ui"
81+
ports:
82+
- 127.0.0.1:4000:80
83+
env_file:
84+
- ./.env
85+
#environment:
86+
#ADMIN_USER: devlake
87+
#ADMIN_PASS: merico
88+
depends_on:
89+
- devlake
90+
networks:
91+
- default
92+
93+
volumes:
94+
mysql-storage:
95+
grafana-storage:
96+
97+
networks:
98+
default:
99+
temporal-network:
100+
external: true

0 commit comments

Comments
 (0)