Skip to content

Commit 8b9f873

Browse files
committed
Merge branch 'main' of github.com:linkall-labs/vanus into segment
Signed-off-by: jyjiangkai <[email protected]>
2 parents 5b3b241 + 1157347 commit 8b9f873

File tree

383 files changed

+19253
-8514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+19253
-8514
lines changed

Diff for: .github/workflows/codecov.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
startsWith(github.event.pull_request.title, 'fix') ||
2222
startsWith(github.event.pull_request.title, 'feat') ||
2323
startsWith(github.event.pull_request.title, 'refactor') ||
24-
startsWith(github.event.pull_request.title, 'perf')
24+
startsWith(github.event.pull_request.title, 'perf') ||
25+
startsWith(github.event.pull_request.title, 'test')
2526
runs-on: ${{ matrix.os }}
2627
env:
2728
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Diff for: .golangci.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ issues:
396396
- source: "strconv|make|len|math"
397397
linters:
398398
- gomnd
399+
- path: "action"
400+
linters:
401+
- dupl
399402
- path: "convert.go"
400403
linters:
401404
- dupl
@@ -412,7 +415,7 @@ issues:
412415
linters:
413416
- gosec
414417
- gomnd
415-
- path: "action.go"
418+
- path: "init.go"
416419
linters:
417420
- gochecknoinits
418421
- path: "^vsctl"

Diff for: CONTRIBUTING.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resources to make it easier to get your contribution accepted.
2929
## Before you get started
3030

3131
### Sign the CLA
32-
Click [here](https://cla-assistant.io/linkall-labs/) to sign the CLA, and click the `Sign in with GitHub to agree` button to sign.
32+
Click [here](https://cla-assistant.io/linkall-labs/vanus) to sign the CLA, and click the `Sign in with GitHub to agree` button to sign.
3333

3434
What is [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement).
3535

@@ -39,7 +39,7 @@ If you want to contribute to the codebase of Vanus, it's better to set up a deve
3939
1. Install Go version 1.17 or above. Refer to [How to Write Go Code](https://go.dev/doc/code) for more information.
4040
2. Install [minikube](https://minikube.sigs.k8s.io/docs/start/)(Users from China mainland may have network issues that need to be addressed for using minikube).
4141
Vanus is a k8s based project.
42-
3. Learning [QuickStart](https://github.com/linkall-labs/docs/blob/main/vanus/quick-start.md) how to deploy the Vanus to k8s. Deploying a specified component to minikube for testing.
42+
3. Learning [QuickStart](https://docs.linkall.com/getting-started/quick-start) how to deploy the Vanus to k8s. Deploying a specified component to minikube for testing.
4343
Click [here](#) for details.
4444

4545
## Issues
@@ -51,7 +51,7 @@ assigned to someone.
5151

5252
#### First Contribution
5353
You can start by finding existing issues with the
54-
[good-first-issue](https://github.com/linkall-labs/vanus/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue) label.
54+
[good-first-issue](https://github.com/linkall-labs/vanus/issues?q=is%3Aopen+is%3Aissue+label%3A"good+first+issue") label.
5555
These issues are well suited for a new contributor.
5656

5757
#### Further Contributions
@@ -113,6 +113,3 @@ There are some automated tasks to ensure each PR's reach high quality in Vanus.
113113
### Code Review
114114
The Code Review can be started until all checking were passed. Each PR will automatically assign reviewers. After getting
115115
at least one `Approve` from reviewers, the PR can be merged.
116-
117-
## Reward
118-
Once your PR has been merged, you become a Vanus Contributor. Thanks for your contribution! please fill the [form](#) to get you reward

Diff for: Makefile

+2-35
Original file line numberDiff line numberDiff line change
@@ -75,38 +75,5 @@ docker-build-timer:
7575
build-timer:
7676
$(GO_BUILD) -o bin/timer cmd/timer/main.go
7777

78-
controller-start:
79-
go run ${VANUS_ROOT}/cmd/controller/main.go
80-
81-
build-ctrl-bin:
82-
$(GO_BUILD) -o bin/ctrl cmd/controller/main.go
83-
84-
build-gw-util:
85-
go build -o bin/gw-util test/gateway/main.go
86-
87-
build-e2e:
88-
go build -o bin/e2e test/e2e/quick-start/main.go
89-
90-
build-destruct:
91-
go build -o bin/destruct test/e2e/destruct/main.go
92-
93-
controller-start:
94-
go run ${VANUS_ROOT}/cmd/controller/${module}/main.go
95-
96-
controller-api-test:
97-
grpcui --import-path=${VSPROTO_ROOT}/include \
98-
--import-path=${VSPROTO_ROOT}/proto \
99-
--plaintext \
100-
--proto=controller.proto 127.0.0.1:2048
101-
102-
store-start:
103-
go run ${VANUS_ROOT}/cmd/store/main.go
104-
105-
store-api-test:
106-
grpcui --import-path=${VSPROTO_ROOT}/include \
107-
--import-path=${VSPROTO_ROOT}/proto \
108-
--plaintext \
109-
--proto=segment.proto 127.0.0.1:11831
110-
111-
trigger-start:
112-
go run ${VANUS_ROOT}/cmd/trigger/main.go
78+
docker-push-aio:
79+
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/all-in-one:${IMAGE_TAG} -f build/all-in-one/Dockerfile . --push

Diff for: README.md

+73-22
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,79 @@
1-
# Vanus
21

2+
<div align="center">
3+
<h1>Vanus</h1>
4+
<!--
5+
<img src="https://user-images.githubusercontent.capabilitiesom/68597908/206148625-43f14f58-f3c0-4042-82a0-9f9421c270fa.png" width="288" >
6+
-->
7+
<p>
8+
Vanus is an open-source message queue with built-in event processing capabilities.
9+
<!--
10+
<br>
11+
It helps users build event pipelines between SaaS, cloud services, and cloud functions in minutes.
12+
-->
13+
</p>
14+
15+
[![stars](https://img.shields.io/github/stars/linkall-labs/vanus.svg?style=flat&logo=github&colorB=blueviolet&label=stars)](https://github.com/linkall-labs/vanus)
316
[![License](https://img.shields.io/badge/License-Apache_2.0-green.svg)](https://github.com/linkall-labs/vanus/blob/main/LICENSE)
4-
[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/)
517
[![codecov](https://codecov.io/gh/linkall-labs/vanus/branch/main/graph/badge.svg?token=RSXSIMEY4V)](https://codecov.io/gh/linkall-labs/vanus)
6-
7-
## What is Vanus
8-
9-
Vanus is a Serverless event platform for easily building Event-Driven Architecture (EDA) applications.
10-
It provides enterprises and organizations an innovative platform for collecting, storing, distributing, and processing events at scale.
11-
12-
## Quick Start
13-
14-
See [quick-start](https://docs.linkall.com/getting-started/quick-start)
18+
[![Language](https://img.shields.io/github/go-mod/go-version/linkall-labs/vanus?logo=go)](https://golang.org/)
19+
[![playground](https://img.shields.io/badge/Playground-Try%20it%20%20free-red)](https://play.linkall.com)
20+
[![playground](https://img.shields.io/badge/Docs-online-green)](https://linkall.com/docs)
21+
22+
23+
<p>
24+
<a href="https://join.slack.com/t/vanusworkspace/shared_invite/zt-1jilbbfo2-NxiFG0VOo8ABGCCNaeNfcA"><img src="https://img.shields.io/badge/slack-join-3CC798?style=social&logo=slack" height=23></a>
25+
&nbsp;
26+
<a href="https://twitter.com/Vanus_dev"><img src="https://img.shields.io/badge/-Twitter-red?style=social&logo=twitter" height=23></a>
27+
<!-- <a href="https://twitter.com/Vanus_dev"><img src="https://img.shields.io/twitter/follow/vanus_dev?style=social" height=23></a> -->
28+
&nbsp;
29+
<a href="https://www.youtube.com/channel/UC7rd6IgjfNYTOXf2FerFNyA"><img src="https://img.shields.io/badge/-Youtube-red?style=social&logo=youtube" height=23></a>
30+
<!-- <a href="https://www.youtube.com/channel/UC7rd6IgjfNYTOXf2FerFNyA"><img src="https://img.shields.io/youtube/channel/views/UC7rd6IgjfNYTOXf2FerFNyA?style=social" height=23></a> -->
31+
&nbsp;
32+
</p>
33+
34+
<!--
35+
<h3 align="center">
36+
<a href="https://featbit.gitbook.io/docs/installation">Installation</a>
37+
<span> · </span>
38+
<a href="https://featbit.gitbook.io/">Getting Started</a>
39+
<span> · </span>
40+
<a href="https://join.slack.com/t/featbit/shared_invite/zt-1ew5e2vbb-x6Apan1xZOaYMnFzqZkGNQ">Online Support</a>
41+
<span> · </span>
42+
<a href="https://featbit.gitbook.io/">Documentation</a>
43+
<span> · </span>
44+
<a href="https://github.com/featbit/featbit/discussions/categories/announcements">Milestones</a>
45+
</h3>
46+
-->
47+
</div>
48+
49+
--------------------------------------------------
50+
51+
## Introduction
52+
53+
Vanus helps users build event pipelines between SaaS, cloud services, and cloud functions in minutes.
54+
55+
**1. Build the event-driven system**
56+
- Get events from cloud services and SaaS, and deliver them to cloud functions or microservices.
57+
- Synchronize changed data or transfer data to the data lake.
58+
- Obtain events generated by SaaS and send them to other SaaS.
59+
60+
**2. Out-of-the-box event computing capabilities**
61+
- Real-time processing during event transmissions, such as filtering and transformation.
62+
- Natively support the CloudEvents specification, and can directly send events to workloads that support CloudEvent.
63+
64+
**3. 100% open source, Super easy to use**
65+
- One-click deployment, the installation is completed within 1 minute, and developers without MQ experience can also use it.
66+
- Message queues and connectors are 100% open source, a one-stop open-source solution.
67+
68+
## Getting Started
69+
70+
You can install Vanus with a single command within 1 minute. Check out our [website](https://linkall.com) for detailed information.
71+
72+
```shell
73+
kubectl apply -f https://download.linkall.com/all-in-one/v0.5.4.yml
74+
```
75+
76+
We also provide an [interactive Kubernetes environment](https://play.linkall.com) to simply deploy and try Vanus in your browser.
1577

1678
## Community
1779

@@ -26,17 +88,6 @@ We have a few channels for contact:
2688

2789
See [here](CONTRIBUTING.md) for how to contribute to Vanus.
2890

29-
## Understanding Vanus
30-
31-
### Project Layout
32-
33-
This Project follows [golang-standards/project-layout](https://github.com/golang-standards/project-layout), see the
34-
project for understanding well vanus' codebase.
35-
36-
### Architecture
37-
38-
![architecture](docs/architecture.jpg)
39-
4091
## License
4192

4293
Vanus is under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.

Diff for: build/all-in-one/Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM --platform=$BUILDPLATFORM golang:1.18 as builder
2+
WORKDIR /workspace
3+
4+
COPY . .
5+
RUN go mod download
6+
7+
ARG TARGETOS
8+
ARG TARGETARCH
9+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-controller
10+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-store
11+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-trigger
12+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-timer
13+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-gateway
14+
15+
FROM centos:latest
16+
WORKDIR /vanus
17+
18+
ARG VERSION
19+
COPY --from=builder /workspace/bin/controller bin/controller
20+
COPY --from=builder /workspace/bin/store bin/store
21+
COPY --from=builder /workspace/bin/trigger bin/trigger
22+
COPY --from=builder /workspace/bin/timer bin/timer
23+
COPY --from=builder /workspace/bin/gateway bin/gateway
24+
COPY --from=builder /workspace/build/all-in-one/config config
25+
COPY --from=builder /workspace/build/all-in-one/run.sh run.sh
26+
27+
RUN chmod a+x /vanus/run.sh
28+
RUN mkdir /vanus/logs
29+
30+
ENV VERSION=$VERSION
31+
32+
ENTRYPOINT ["/vanus/run.sh"]
33+

Diff for: build/all-in-one/config/controller.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "standalone"
2+
ip: "127.0.0.1"
3+
port: 2048
4+
etcd:
5+
- "127.0.0.1:2379"
6+
data_dir: "/vanus/data/controller"
7+
gateway_endpoint: "127.0.0.1:18080"
8+
segment_capacity: 8388604 # 8MB
9+
topology:
10+
standalone: 127.0.0.1:2048
11+
replicas: 1
12+
metadata:
13+
key_prefix: "/standalone"
14+
embed_etcd:
15+
# relative path to ${data_dir} above
16+
data_dir: "etcd"
17+
listen_client_addr: 127.0.0.1:2379
18+
listen_peer_addr: 127.0.0.1:2380
19+
advertise_client_addr: 127.0.0.1:2379
20+
advertise_peer_addr: 127.0.0.1:2380
21+
heartbeat-interval: 600000
22+
election-timeout: 600000
23+
clusters:
24+
- standalone=http://127.0.0.1:2380
25+
secret_encryption_salt: "encryption_salt"
26+
observability:
27+
metrics:
28+
enable: false
29+
# metrics for prometheus scratch data
30+
port: 2112
31+
tracing:
32+
enable: false
33+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
34+
otel_collector: http://127.0.0.1:4318

Diff for: build/all-in-one/config/gateway.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
port: 8080
2+
controllers:
3+
- "127.0.0.1:2048"
4+
observability:
5+
metrics:
6+
enable: false
7+
# metrics for prometheus scratch data
8+
port: 2113
9+
tracing:
10+
enable: false
11+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
12+
otel_collector: http://127.0.0.1:4318

Diff for: build/all-in-one/config/store.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
port: 11811
2+
ip : 127.0.0.1
3+
controllers:
4+
- 127.0.0.1:2048
5+
volume:
6+
id: 1
7+
dir: /vanus/data/store
8+
capacity: 1073741824 # 1GB
9+
meta_store:
10+
wal:
11+
io:
12+
engine: psync
13+
offset_store:
14+
wal:
15+
io:
16+
engine: psync
17+
raft:
18+
wal:
19+
block_size: 32768
20+
io:
21+
engine: psync
22+
observability:
23+
metrics:
24+
enable: false
25+
# metrics for prometheus scratch data
26+
port: 2114
27+
tracing:
28+
enable: false
29+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
30+
otel_collector: http://127.0.0.1:4318

Diff for: build/all-in-one/config/timer.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "timer"
2+
ip: "127.0.0.1"
3+
etcd:
4+
- "127.0.0.1:2379"
5+
replicas: 1
6+
metadata:
7+
key_prefix: "/standalone"
8+
leaderelection:
9+
lease_duration: 15
10+
timingwheel:
11+
tick: 1
12+
wheel_size: 32
13+
layers: 4
14+
controllers:
15+
- 127.0.0.1:2048
16+
observability:
17+
metrics:
18+
enable: false
19+
# metrics for prometheus scratch data
20+
port: 2115
21+
tracing:
22+
enable: false
23+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
24+
otel_collector: http://127.0.0.1:4318

Diff for: build/all-in-one/config/trigger.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
port: 2148
2+
ip: "127.0.0.1"
3+
controllers:
4+
- 127.0.0.1:2048
5+
rateLimit: 0
6+
observability:
7+
metrics:
8+
enable: false
9+
# metrics for prometheus scratch data
10+
port: 2116
11+
tracing:
12+
enable: false
13+
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
14+
otel_collector: http://127.0.0.1:4318

Diff for: build/all-in-one/run.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
nohup /vanus/bin/controller --config /vanus/config/controller.yaml > /vanus/logs/controller.log &
3+
nohup /vanus/bin/store --config /vanus/config/store.yaml > /vanus/logs/store.log &
4+
nohup /vanus/bin/trigger --config /vanus/config/trigger.yaml > /vanus/logs/trigger.log &
5+
nohup /vanus/bin/timer --config /vanus/config/timer.yaml > /vanus/logs/timer.log &
6+
nohup /vanus/bin/gateway --config /vanus/config/gateway.yaml > /vanus/logs/gateway.log &
7+
8+
sleep 3600
9+
10+
pkill -f vanus

Diff for: build/images/controller/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG TARGETOS
88
ARG TARGETARCH
99
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-controller
1010

11-
FROM alpine:3.15.4
11+
FROM ubuntu:22.10
1212
WORKDIR /vanus
1313
COPY --from=builder /workspace/bin/controller bin/controller
1414
ENTRYPOINT ["bin/controller"]

0 commit comments

Comments
 (0)